doc-next-gen

Mathlib.Topology.PartialHomeomorph

Module docstring

{"# Partial homeomorphisms

This file defines homeomorphisms between open subsets of topological spaces. An element e of PartialHomeomorph X Y is an extension of PartialEquiv X Y, i.e., it is a pair of functions e.toFun and e.invFun, inverse of each other on the sets e.source and e.target. Additionally, we require that these sets are open, and that the functions are continuous on them. Equivalently, they are homeomorphisms there.

As in equivs, we register a coercion to functions, and we use e x and e.symm x throughout instead of e.toFun x and e.invFun x.

Main definitions

  • Homeomorph.toPartialHomeomorph: associating a partial homeomorphism to a homeomorphism, with source = target = Set.univ;
  • PartialHomeomorph.symm: the inverse of a partial homeomorphism
  • PartialHomeomorph.trans: the composition of two partial homeomorphisms
  • PartialHomeomorph.refl: the identity partial homeomorphism
  • PartialHomeomorph.const: a partial homeomorphism which is a constant map, whose source and target are necessarily singleton sets
  • PartialHomeomorph.ofSet: the identity on a set s
  • PartialHomeomorph.restr s: restrict a partial homeomorphism e to e.source ∩ interior s
  • PartialHomeomorph.EqOnSource: equivalence relation describing the \"right\" notion of equality for partial homeomorphisms
  • PartialHomeomorph.prod: the product of two partial homeomorphisms, as a partial homeomorphism on the product space
  • PartialHomeomorph.pi: the product of a finite family of partial homeomorphisms
  • PartialHomeomorph.disjointUnion: combine two partial homeomorphisms with disjoint sources and disjoint targets
  • PartialHomeomorph.lift_openEmbedding: extend a partial homeomorphism X → Y under an open embedding X → X', to a partial homeomorphism X' → Z. (This is used to define the disjoint union of charted spaces.)

Implementation notes

Most statements are copied from their PartialEquiv versions, although some care is required especially when restricting to subsets, as these should be open subsets.

For design notes, see PartialEquiv.lean.

Local coding conventions

If a lemma deals with the intersection of a set with either source or target of a PartialEquiv, then it should use e.source ∩ s or e.target ∩ t, not s ∩ e.source or t ∩ e.target. ","Basic properties; inverse (symm instance) ","### PartialHomeomorph.IsImage relation

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).

This definition is a restatement of PartialEquiv.IsImage for partial homeomorphisms. In this section we transfer API about PartialEquiv.IsImage to partial homeomorphisms and add a few PartialHomeomorph-specific lemmas like PartialHomeomorph.IsImage.closure. ","const: PartialEquiv.const as a partial homeomorphism ","ofSet: the identity on a set s ","trans: composition of two partial homeomorphisms ","EqOnSource: equivalence on their source ","product of two partial homeomorphisms ","finite product of partial homeomorphisms ","combining two partial homeomorphisms using Set.piecewise ","inclusion of an open set in a topological space ","subtypeRestr: restriction to a subtype "}

PartialHomeomorph structure
(X : Type*) (Y : Type*) [TopologicalSpace X] [TopologicalSpace Y] extends PartialEquiv X Y
Full source
/-- Partial homeomorphisms, defined on open subsets of the space -/
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
Partial Homeomorphism
Informal description
A partial homeomorphism between topological spaces $X$ and $Y$ is a structure consisting of two open sets $e.source \subseteq X$ and $e.target \subseteq Y$, along with continuous functions $e \colon e.source \to e.target$ and $e.symm \colon e.target \to e.source$ that are inverses of each other. More formally, a partial homeomorphism is an extension of a partial equivalence (bijective partial function) where the source and target are required to be open subsets, and the functions are required to be continuous on these subsets.
PartialHomeomorph.toFun' definition
: X → Y
Full source
/-- 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 := e.toFun
Coercion to function for partial homeomorphisms
Informal description
The coercion function from a partial homeomorphism `e` between topological spaces `X` and `Y` to a function from `X` to `Y`. This function is defined to be `e.toFun`, which is the forward map of the partial homeomorphism.
PartialHomeomorph.instCoeFunForall instance
: CoeFun (PartialHomeomorph X Y) fun _ => X → Y
Full source
/-- Coercion of a `PartialHomeomorph` to function.
Note that a `PartialHomeomorph` is not `DFunLike`. -/
instance : CoeFun (PartialHomeomorph X Y) fun _ => X → Y :=
  ⟨fun e => e.toFun'⟩
Coercion of Partial Homeomorphisms to Functions
Informal description
A partial homeomorphism $e$ between topological spaces $X$ and $Y$ can be coerced to a function from $X$ to $Y$, where the function is defined to be $e.toFun$ (the forward map of the partial homeomorphism). This coercion allows us to write $e(x)$ instead of $e.toFun(x)$ when applying the partial homeomorphism to a point $x \in X$.
PartialHomeomorph.symm definition
: PartialHomeomorph Y X
Full source
/-- The inverse of a partial homeomorphism -/
@[symm]
protected def symm : PartialHomeomorph Y X where
  toPartialEquiv := e.toPartialEquiv.symm
  open_source := e.open_target
  open_target := e.open_source
  continuousOn_toFun := e.continuousOn_invFun
  continuousOn_invFun := e.continuousOn_toFun
Inverse of a partial homeomorphism
Informal description
The inverse of a partial homeomorphism $e$ between topological spaces $X$ and $Y$ is a partial homeomorphism $e^{-1}$ from $Y$ to $X$ defined by: - Swapping the source and target sets: $e^{-1}.\text{source} = e.\text{target}$ and $e^{-1}.\text{target} = e.\text{source}$ - Interchanging the forward and inverse functions: $e^{-1}.\text{toFun} = e.\text{invFun}$ and $e^{-1}.\text{invFun} = e.\text{toFun}$ - Maintaining continuity: $e^{-1}$ is continuous on its source (which was $e$'s target) and its inverse is continuous on its target (which was $e$'s source) This inverse partial homeomorphism satisfies $e^{-1} \circ e = \text{id}$ on $e.\text{source}$ and $e \circ e^{-1} = \text{id}$ on $e.\text{target}$.
PartialHomeomorph.Simps.apply definition
(e : PartialHomeomorph X Y) : X → Y
Full source
/-- 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 := e
Forward map of a partial homeomorphism
Informal description
The forward map of a partial homeomorphism $e$ between topological spaces $X$ and $Y$, which is a function from $X$ to $Y$ that is continuous on the open subset $e.source \subseteq X$ and bijective onto the open subset $e.target \subseteq Y$ with continuous inverse $e.symm$.
PartialHomeomorph.Simps.symm_apply definition
(e : PartialHomeomorph X Y) : Y → X
Full source
/-- See Note [custom simps projection] -/
def Simps.symm_apply (e : PartialHomeomorph X Y) : Y → X := e.symm
Inverse map of a partial homeomorphism
Informal description
The inverse map of a partial homeomorphism \( e \) between topological spaces \( X \) and \( Y \), which is a function from \( Y \) to \( X \) that is continuous on the open subset \( e.\text{target} \subseteq Y \) and bijective onto the open subset \( e.\text{source} \subseteq X \) with continuous inverse \( e \).
PartialHomeomorph.continuousOn theorem
: ContinuousOn e e.source
Full source
protected theorem continuousOn : ContinuousOn e e.source :=
  e.continuousOn_toFun
Continuity of Partial Homeomorphism on Source Set
Informal description
The forward map $e \colon X \to Y$ of a partial homeomorphism is continuous on its source set $e.source \subseteq X$.
PartialHomeomorph.continuousOn_symm theorem
: ContinuousOn e.symm e.target
Full source
theorem continuousOn_symm : ContinuousOn e.symm e.target :=
  e.continuousOn_invFun
Continuity of Inverse Partial Homeomorphism on Target Set
Informal description
The inverse map $e^{-1} \colon Y \to X$ of a partial homeomorphism $e$ is continuous on its target set $e.\text{target} \subseteq Y$.
PartialHomeomorph.mk_coe theorem
(e : PartialEquiv X Y) (a b c d) : (PartialHomeomorph.mk e a b c d : X → Y) = e
Full source
@[simp, mfld_simps]
theorem mk_coe (e : PartialEquiv X Y) (a b c d) : (PartialHomeomorph.mk e a b c d : X → Y) = e :=
  rfl
Coercion of Partial Homeomorphism Construction Matches Partial Equivalence
Informal description
Given a partial equivalence $e$ between topological spaces $X$ and $Y$, and additional data $(a, b, c, d)$ required to construct a partial homeomorphism, the forward map of the constructed partial homeomorphism $\text{PartialHomeomorph.mk}\ e\ a\ b\ c\ d$ coincides with the forward map of $e$ when viewed as functions from $X$ to $Y$.
PartialHomeomorph.mk_coe_symm theorem
(e : PartialEquiv X Y) (a b c d) : ((PartialHomeomorph.mk e a b c d).symm : Y → X) = e.symm
Full source
@[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 :=
  rfl
Inverse Function Consistency in Partial Homeomorphism Construction
Informal description
For any partial equivalence $e$ between topological spaces $X$ and $Y$, and any additional data $(a, b, c, d)$ required to construct a partial homeomorphism, the inverse function of the constructed partial homeomorphism $\text{PartialHomeomorph.mk}\ e\ a\ b\ c\ d$ coincides with the inverse function of $e$ when viewed as functions from $Y$ to $X$.
PartialHomeomorph.toPartialEquiv_injective theorem
: Injective (toPartialEquiv : PartialHomeomorph X Y → PartialEquiv X Y)
Full source
theorem toPartialEquiv_injective :
    Injective (toPartialEquiv : PartialHomeomorph X Y → PartialEquiv X Y)
  | ⟨_, _, _, _, _⟩, ⟨_, _, _, _, _⟩, rfl => rfl
Injectivity of Partial Homeomorphism to Partial Equivalence Map
Informal description
The function that maps a partial homeomorphism between topological spaces $X$ and $Y$ to its underlying partial equivalence is injective. In other words, if two partial homeomorphisms have the same partial equivalence structure, then they are equal as partial homeomorphisms.
PartialHomeomorph.toFun_eq_coe theorem
(e : PartialHomeomorph X Y) : e.toFun = e
Full source
@[simp, mfld_simps]
theorem toFun_eq_coe (e : PartialHomeomorph X Y) : e.toFun = e :=
  rfl
Forward Function Equals Coerced Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the forward function $e.toFun$ is equal to $e$ when coerced to a function from $X$ to $Y$.
PartialHomeomorph.invFun_eq_coe theorem
(e : PartialHomeomorph X Y) : e.invFun = e.symm
Full source
@[simp, mfld_simps]
theorem invFun_eq_coe (e : PartialHomeomorph X Y) : e.invFun = e.symm :=
  rfl
Inverse Function Equals Symmetric Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the inverse function $e.invFun$ is equal to the inverse partial homeomorphism $e.symm$ when viewed as a function from $Y$ to $X$.
PartialHomeomorph.coe_coe theorem
: (e.toPartialEquiv : X → Y) = e
Full source
@[simp, mfld_simps]
theorem coe_coe : (e.toPartialEquiv : X → Y) = e :=
  rfl
Coercion of Partial Homeomorphism via Partial Equivalence Equals Original Function
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the coercion of $e$ to a function via its underlying partial equivalence equals $e$ itself as a function. In other words, $(e.toPartialEquiv : X \to Y) = e$.
PartialHomeomorph.coe_coe_symm theorem
: (e.toPartialEquiv.symm : Y → X) = e.symm
Full source
@[simp, mfld_simps]
theorem coe_coe_symm : (e.toPartialEquiv.symm : Y → X) = e.symm :=
  rfl
Coercion of Inverse Partial Equivalence Equals Inverse Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the coercion of the inverse of $e$'s underlying partial equivalence to a function equals the inverse of $e$ itself as a function. In other words, $(e.toPartialEquiv.symm : Y \to X) = e^{-1}$.
PartialHomeomorph.map_source theorem
{x : X} (h : x ∈ e.source) : e x ∈ e.target
Full source
@[simp, mfld_simps]
theorem map_source {x : X} (h : x ∈ e.source) : e x ∈ e.target :=
  e.map_source' h
Image of Source Point Lies in Target for Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and for any point $x \in X$ in the source set $e.source$, the image $e(x)$ lies in the target set $e.target$.
PartialHomeomorph.map_source'' theorem
: e '' e.source ⊆ e.target
Full source
/-- Variant of `map_source`, stated for images of subsets of `source`. -/
lemma map_source'' : e '' e.sourcee '' e.source ⊆ e.target :=
  fun _ ⟨_, hx, hex⟩ ↦ mem_of_eq_of_mem (id hex.symm) (e.map_source' hx)
Image of Source Set Under Partial Homeomorphism is Contained in Target
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the image of the source set $e.source$ under $e$ is contained in the target set $e.target$, i.e., $e(e.source) \subseteq e.target$.
PartialHomeomorph.map_target theorem
{x : Y} (h : x ∈ e.target) : e.symm x ∈ e.source
Full source
@[simp, mfld_simps]
theorem map_target {x : Y} (h : x ∈ e.target) : e.symm x ∈ e.source :=
  e.map_target' h
Inverse Image of Target Point Lies in Source for Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and for any point $y \in Y$ in the target set $e.\text{target}$, the inverse image $e^{-1}(y)$ lies in the source set $e.\text{source}$.
PartialHomeomorph.left_inv theorem
{x : X} (h : x ∈ e.source) : e.symm (e x) = x
Full source
@[simp, mfld_simps]
theorem left_inv {x : X} (h : x ∈ e.source) : e.symm (e x) = x :=
  e.left_inv' h
Left Inverse Property of Partial Homeomorphisms
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and for any point $x \in e.\text{source}$, the composition of $e$ with its inverse satisfies $e^{-1}(e(x)) = x$.
PartialHomeomorph.right_inv theorem
{x : Y} (h : x ∈ e.target) : e (e.symm x) = x
Full source
@[simp, mfld_simps]
theorem right_inv {x : Y} (h : x ∈ e.target) : e (e.symm x) = x :=
  e.right_inv' h
Right Inverse Property of Partial Homeomorphisms
Informal description
For any point $x$ in the target set of a partial homeomorphism $e$ (i.e., $x \in e.\text{target}$), the composition of $e$ with its inverse $e^{-1}$ satisfies $e(e^{-1}(x)) = x$.
PartialHomeomorph.mapsTo theorem
: MapsTo e e.source e.target
Full source
protected theorem mapsTo : MapsTo e e.source e.target := fun _ => e.map_source
Partial Homeomorphism Maps Source to Target
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the forward map $e$ sends every point in its source set $e.source \subseteq X$ to a point in its target set $e.target \subseteq Y$. In other words, $e$ restricts to a map $e.source \to e.target$.
PartialHomeomorph.symm_mapsTo theorem
: MapsTo e.symm e.target e.source
Full source
protected theorem symm_mapsTo : MapsTo e.symm e.target e.source :=
  e.symm.mapsTo
Inverse of Partial Homeomorphism Maps Target to Source
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the inverse map $e^{-1}$ sends every point in the target set $e.\text{target} \subseteq Y$ back to the source set $e.\text{source} \subseteq X$. In other words, $e^{-1}$ restricts to a map $e.\text{target} \to e.\text{source}$.
PartialHomeomorph.leftInvOn theorem
: LeftInvOn e.symm e e.source
Full source
protected theorem leftInvOn : LeftInvOn e.symm e e.source := fun _ => e.left_inv
Left Inverse Property of Partial Homeomorphisms on Source Set
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the inverse function $e^{-1}$ is a left inverse of $e$ on the source set $e.\text{source} \subseteq X$. That is, for every $x \in e.\text{source}$, we have $e^{-1}(e(x)) = x$.
PartialHomeomorph.rightInvOn theorem
: RightInvOn e.symm e e.target
Full source
protected theorem rightInvOn : RightInvOn e.symm e e.target := fun _ => e.right_inv
Right Inverse Property of Partial Homeomorphisms on Target Set
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the inverse function $e^{-1}$ is a right inverse of $e$ on the target set $e.\text{target} \subseteq Y$. That is, for every $y \in e.\text{target}$, we have $e(e^{-1}(y)) = y$.
PartialHomeomorph.invOn theorem
: InvOn e.symm e e.source e.target
Full source
protected theorem invOn : InvOn e.symm e e.source e.target :=
  ⟨e.leftInvOn, e.rightInvOn⟩
Inverse Property of Partial Homeomorphisms on Source and Target Sets
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the inverse function $e^{-1}$ is both a left inverse on the source set $e.\text{source} \subseteq X$ and a right inverse on the target set $e.\text{target} \subseteq Y$. That is: 1. For every $x \in e.\text{source}$, we have $e^{-1}(e(x)) = x$. 2. For every $y \in e.\text{target}$, we have $e(e^{-1}(y)) = y$.
PartialHomeomorph.injOn theorem
: InjOn e e.source
Full source
protected theorem injOn : InjOn e e.source :=
  e.leftInvOn.injOn
Injectivity of Partial Homeomorphisms on Source Set
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the forward map $e$ is injective on its source set $e.\text{source} \subseteq X$. That is, for any $x_1, x_2 \in e.\text{source}$, if $e(x_1) = e(x_2)$, then $x_1 = x_2$.
PartialHomeomorph.bijOn theorem
: BijOn e e.source e.target
Full source
protected theorem bijOn : BijOn e e.source e.target :=
  e.invOn.bijOn e.mapsTo e.symm_mapsTo
Bijectivity of Partial Homeomorphisms on Source and Target Sets
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the forward map $e$ is a bijection from its source set $e.\text{source} \subseteq X$ to its target set $e.\text{target} \subseteq Y$. That is: 1. $e$ is injective on $e.\text{source}$ (distinct points map to distinct points). 2. $e$ is surjective from $e.\text{source}$ to $e.\text{target}$ (every point in $e.\text{target}$ has a preimage in $e.\text{source}$).
PartialHomeomorph.surjOn theorem
: SurjOn e e.source e.target
Full source
protected theorem surjOn : SurjOn e e.source e.target :=
  e.bijOn.surjOn
Surjectivity of Partial Homeomorphisms on Target Set
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the forward map $e$ is surjective from its source set $e.\text{source} \subseteq X$ to its target set $e.\text{target} \subseteq Y$. That is, for every $y \in e.\text{target}$, there exists an $x \in e.\text{source}$ such that $e(x) = y$.
Homeomorph.toPartialHomeomorphOfImageEq definition
(e : X ≃ₜ Y) (s : Set X) (hs : IsOpen s) (t : Set Y) (h : e '' s = t) : PartialHomeomorph X Y
Full source
/-- Interpret a `Homeomorph` as a `PartialHomeomorph` by restricting it
to an open set `s` in the domain and to `t` in the codomain. -/
@[simps! -fullyApplied apply symm_apply toPartialEquiv,
  simps! -isSimp 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 where
  toPartialEquiv := e.toPartialEquivOfImageEq s t h
  open_source := hs
  open_target := by simpa [← h]
  continuousOn_toFun := e.continuous.continuousOn
  continuousOn_invFun := e.symm.continuous.continuousOn
Restriction of a homeomorphism to open subsets with matching image
Informal description
Given a homeomorphism $e \colon X \simeq Y$ between topological spaces $X$ and $Y$, an open subset $s \subseteq X$, and a subset $t \subseteq Y$ such that the image of $s$ under $e$ equals $t$ (i.e., $e(s) = t$), this constructs a partial homeomorphism where: - The source is $s$, - The target is $t$, - The forward map is $e$ restricted to $s$, - The inverse map is $e^{-1}$ restricted to $t$. Both $e$ and $e^{-1}$ are continuous on their respective domains by virtue of being homeomorphisms.
Homeomorph.toPartialHomeomorph definition
(e : X ≃ₜ Y) : PartialHomeomorph X Y
Full source
/-- A homeomorphism induces a partial homeomorphism on the whole space -/
@[simps! (config := mfld_cfg)]
def _root_.Homeomorph.toPartialHomeomorph (e : X ≃ₜ Y) : PartialHomeomorph X Y :=
  e.toPartialHomeomorphOfImageEq univ isOpen_univ univ <| by rw [image_univ, e.surjective.range_eq]
Global homeomorphism as a partial homeomorphism
Informal description
Given a homeomorphism $e \colon X \simeq Y$ between topological spaces $X$ and $Y$, this constructs a partial homeomorphism where: - The source is the entire space $X$, - The target is the entire space $Y$, - The forward map is $e$, - The inverse map is $e^{-1}$. Both $e$ and $e^{-1}$ are continuous on their respective domains by virtue of being homeomorphisms.
PartialHomeomorph.replaceEquiv definition
(e : PartialHomeomorph X Y) (e' : PartialEquiv X Y) (h : e.toPartialEquiv = e') : PartialHomeomorph X Y
Full source
/-- 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 where
  toPartialEquiv := e'
  open_source := h ▸ e.open_source
  open_target := h ▸ e.open_target
  continuousOn_toFun := h ▸ e.continuousOn_toFun
  continuousOn_invFun := h ▸ e.continuousOn_invFun
Partial homeomorphism with replaced partial equivalence
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and a partial equivalence $e'$ between the same spaces, if the underlying partial equivalence of $e$ is equal to $e'$, then the function constructs a new partial homeomorphism with $e'$ as its underlying partial equivalence, while preserving the openness of the source and target sets and the continuity of the functions. More precisely, the resulting partial homeomorphism has: - The partial equivalence $e'$ as its underlying partial equivalence - The same open source and target sets as $e$ (via transport through the equality $h$) - The same continuity properties for both the forward and inverse functions as $e$ (via transport through the equality $h$)
PartialHomeomorph.replaceEquiv_eq_self theorem
(e' : PartialEquiv X Y) (h : e.toPartialEquiv = e') : e.replaceEquiv e' h = e
Full source
theorem replaceEquiv_eq_self (e' : PartialEquiv X Y)
    (h : e.toPartialEquiv = e') : e.replaceEquiv e' h = e := by
  cases e
  subst e'
  rfl
Partial Homeomorphism Replacement with Identical Partial Equivalence Yields Original
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and a partial equivalence $e'$ between the same spaces such that the underlying partial equivalence of $e$ equals $e'$, then replacing $e$'s partial equivalence with $e'$ yields $e$ itself.
PartialHomeomorph.source_preimage_target theorem
: e.source ⊆ e ⁻¹' e.target
Full source
theorem source_preimage_target : e.source ⊆ e ⁻¹' e.target :=
  e.mapsTo
Source is Contained in Preimage of Target for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the source set $e.source$ is contained in the preimage of the target set $e.target$ under the forward map $e$, i.e., $e.source \subseteq e^{-1}(e.target)$.
PartialHomeomorph.eventually_left_inverse theorem
{x} (hx : x ∈ e.source) : ∀ᶠ y in 𝓝 x, e.symm (e y) = y
Full source
theorem eventually_left_inverse {x} (hx : x ∈ e.source) :
    ∀ᶠ y in 𝓝 x, e.symm (e y) = y :=
  (e.open_source.eventually_mem hx).mono e.left_inv'
Local Left Inverse Property of Partial Homeomorphisms
Informal description
For any point $x$ in the source set of a partial homeomorphism $e$ between topological spaces $X$ and $Y$, there exists a neighborhood of $x$ such that for all $y$ in this neighborhood, the composition of $e$ with its inverse satisfies $e^{-1}(e(y)) = y$.
PartialHomeomorph.eventually_left_inverse' theorem
{x} (hx : x ∈ e.target) : ∀ᶠ y in 𝓝 (e.symm x), e.symm (e y) = y
Full source
theorem eventually_left_inverse' {x} (hx : x ∈ e.target) :
    ∀ᶠ y in 𝓝 (e.symm x), e.symm (e y) = y :=
  e.eventually_left_inverse (e.map_target hx)
Local Left Inverse Property at Preimage Points for Partial Homeomorphisms
Informal description
For any point $x$ in the target set of a partial homeomorphism $e$ between topological spaces $X$ and $Y$, there exists a neighborhood of $e^{-1}(x)$ such that for all $y$ in this neighborhood, the composition $e^{-1} \circ e$ satisfies $e^{-1}(e(y)) = y$.
PartialHomeomorph.eventually_right_inverse theorem
{x} (hx : x ∈ e.target) : ∀ᶠ y in 𝓝 x, e (e.symm y) = y
Full source
theorem eventually_right_inverse {x} (hx : x ∈ e.target) :
    ∀ᶠ y in 𝓝 x, e (e.symm y) = y :=
  (e.open_target.eventually_mem hx).mono e.right_inv'
Local Right Inverse Property of Partial Homeomorphisms
Informal description
For any point $x$ in the target of a partial homeomorphism $e$, there exists a neighborhood of $x$ such that for all $y$ in this neighborhood, the composition $e \circ e^{-1}$ evaluated at $y$ equals $y$, i.e., $e(e^{-1}(y)) = y$.
PartialHomeomorph.eventually_right_inverse' theorem
{x} (hx : x ∈ e.source) : ∀ᶠ y in 𝓝 (e x), e (e.symm y) = y
Full source
theorem eventually_right_inverse' {x} (hx : x ∈ e.source) :
    ∀ᶠ y in 𝓝 (e x), e (e.symm y) = y :=
  e.eventually_right_inverse (e.map_source hx)
Local Right Inverse Property at Source Points for Partial Homeomorphisms
Informal description
For any point $x$ in the source of a partial homeomorphism $e$, there exists a neighborhood of $e(x)$ such that for all $y$ in this neighborhood, the composition $e \circ e^{-1}$ evaluated at $y$ equals $y$, i.e., $e(e^{-1}(y)) = y$.
PartialHomeomorph.eventually_ne_nhdsWithin theorem
{x} (hx : x ∈ e.source) : ∀ᶠ x' in 𝓝[≠] x, e x' ≠ e x
Full source
theorem eventually_ne_nhdsWithin {x} (hx : x ∈ e.source) :
    ∀ᶠ x' in 𝓝[≠] x, e x' ≠ e x :=
  eventually_nhdsWithin_iff.2 <|
    (e.eventually_left_inverse hx).mono fun x' hx' =>
      mt fun h => by rw [mem_singleton_iff, ← e.left_inv hx, ← h, hx']
Local Injectivity at Source Points for Partial Homeomorphisms
Informal description
For any point $x$ in the source set of a partial homeomorphism $e$ between topological spaces $X$ and $Y$, there exists a neighborhood of $x$ (excluding $x$ itself) such that for all $x'$ in this neighborhood, the image $e(x')$ is distinct from $e(x)$. In other words, $e$ is locally injective at $x$ with respect to the punctured neighborhood filter.
PartialHomeomorph.nhdsWithin_source_inter theorem
{x} (hx : x ∈ e.source) (s : Set X) : 𝓝[e.source ∩ s] x = 𝓝[s] x
Full source
theorem nhdsWithin_source_inter {x} (hx : x ∈ e.source) (s : Set X) : 𝓝[e.source ∩ s] x = 𝓝[s] x :=
  nhdsWithin_inter_of_mem (mem_nhdsWithin_of_mem_nhds <| IsOpen.mem_nhds e.open_source hx)
Neighborhood Filter Equality for Source Intersection in Partial Homeomorphisms
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, if $x$ belongs to the source set $e.source$, then for any subset $s \subseteq X$, the neighborhood filter of $x$ within $e.source \cap s$ is equal to the neighborhood filter of $x$ within $s$.
PartialHomeomorph.nhdsWithin_target_inter theorem
{x} (hx : x ∈ e.target) (s : Set Y) : 𝓝[e.target ∩ s] x = 𝓝[s] x
Full source
theorem nhdsWithin_target_inter {x} (hx : x ∈ e.target) (s : Set Y) : 𝓝[e.target ∩ s] x = 𝓝[s] x :=
  e.symm.nhdsWithin_source_inter hx s
Neighborhood Filter Equality for Target Intersection in Partial Homeomorphisms
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, if $x$ belongs to the target set $e.\mathrm{target}$, then for any subset $s \subseteq Y$, the neighborhood filter of $x$ within $e.\mathrm{target} \cap s$ is equal to the neighborhood filter of $x$ within $s$.
PartialHomeomorph.image_eq_target_inter_inv_preimage theorem
{s : Set X} (h : s ⊆ e.source) : e '' s = e.target ∩ e.symm ⁻¹' s
Full source
theorem image_eq_target_inter_inv_preimage {s : Set X} (h : s ⊆ e.source) :
    e '' s = e.target ∩ e.symm ⁻¹' s :=
  e.toPartialEquiv.image_eq_target_inter_inv_preimage h
Image-Target-Preimage Equality for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq X$ contained in the source $e.\text{source}$, the image of $s$ under $e$ equals the intersection of the target $e.\text{target}$ with the preimage of $s$ under the inverse partial homeomorphism $e^{-1}$. In symbols: $$ e(s) = e.\text{target} \cap e^{-1}(s). $$
PartialHomeomorph.image_source_inter_eq' theorem
(s : Set X) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s
Full source
theorem image_source_inter_eq' (s : Set X) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' s :=
  e.toPartialEquiv.image_source_inter_eq' s
Image of Source Intersection Equals Target Intersection with Inverse Preimage
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$ and any subset $s \subseteq X$, the image of the intersection $e.\mathrm{source} \cap s$ under $e$ equals the intersection of $e.\mathrm{target}$ with the preimage of $s$ under the inverse map $e^{-1}$, i.e., $$ e(e.\mathrm{source} \cap s) = e.\mathrm{target} \cap e^{-1}(s). $$
PartialHomeomorph.image_source_inter_eq theorem
(s : Set X) : e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s)
Full source
theorem image_source_inter_eq (s : Set X) :
    e '' (e.source ∩ s) = e.target ∩ e.symm ⁻¹' (e.source ∩ s) :=
  e.toPartialEquiv.image_source_inter_eq s
Image-Target-Preimage Equality for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq X$, the image of the intersection $e.\text{source} \cap s$ under $e$ equals the intersection of $e.\text{target}$ with the preimage of $e.\text{source} \cap s$ under the inverse partial homeomorphism $e^{-1}$. In symbols: $$ e(e.\text{source} \cap s) = e.\text{target} \cap e^{-1}(e.\text{source} \cap s). $$
PartialHomeomorph.symm_image_eq_source_inter_preimage theorem
{s : Set Y} (h : s ⊆ e.target) : e.symm '' s = e.source ∩ e ⁻¹' s
Full source
theorem symm_image_eq_source_inter_preimage {s : Set Y} (h : s ⊆ e.target) :
    e.symm '' s = e.source ∩ e ⁻¹' s :=
  e.symm.image_eq_target_inter_inv_preimage h
Inverse Image Equals Source Intersection with Preimage for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq Y$ contained in the target $e.\mathrm{target}$, the image of $s$ under the inverse partial homeomorphism $e^{-1}$ equals the intersection of the source $e.\mathrm{source}$ with the preimage of $s$ under $e$. In symbols: $$ e^{-1}(s) = e.\mathrm{source} \cap e^{-1}(s). $$
PartialHomeomorph.symm_image_target_inter_eq theorem
(s : Set Y) : e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s)
Full source
theorem symm_image_target_inter_eq (s : Set Y) :
    e.symm '' (e.target ∩ s) = e.source ∩ e ⁻¹' (e.target ∩ s) :=
  e.symm.image_source_inter_eq _
Inverse Image-Target-Preimage Equality for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq Y$, the image of the intersection $e.\text{target} \cap s$ under the inverse partial homeomorphism $e^{-1}$ equals the intersection of $e.\text{source}$ with the preimage of $e.\text{target} \cap s$ under $e$. In symbols: $$ e^{-1}(e.\text{target} \cap s) = e.\text{source} \cap e^{-1}(e.\text{target} \cap s). $$
PartialHomeomorph.source_inter_preimage_inv_preimage theorem
(s : Set X) : e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s
Full source
theorem source_inter_preimage_inv_preimage (s : Set X) :
    e.source ∩ e ⁻¹' (e.symm ⁻¹' s) = e.source ∩ s :=
  e.toPartialEquiv.source_inter_preimage_inv_preimage s
Source-Preimage Invariance under Partial Homeomorphism Inverse
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq X$, the intersection of the source set $e.\text{source}$ with the preimage of $e^{-1}$'s preimage of $s$ under $e$ is equal to the intersection of $e.\text{source}$ with $s$ itself. In symbols: $$ e.\text{source} \cap e^{-1}(e^{-1}(s)^{-1}) = e.\text{source} \cap s. $$
PartialHomeomorph.target_inter_inv_preimage_preimage theorem
(s : Set Y) : e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s
Full source
theorem target_inter_inv_preimage_preimage (s : Set Y) :
    e.target ∩ e.symm ⁻¹' (e ⁻¹' s) = e.target ∩ s :=
  e.symm.source_inter_preimage_inv_preimage _
Target-Preimage Invariance under Partial Homeomorphism Inverse
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq Y$, the intersection of the target set $e.\text{target}$ with the preimage of $e^{-1}$'s preimage of $s$ under $e$ is equal to the intersection of $e.\text{target}$ with $s$ itself. In symbols: $$ e.\text{target} \cap e^{-1}(e^{-1}(s)^{-1}) = e.\text{target} \cap s. $$
PartialHomeomorph.source_inter_preimage_target_inter theorem
(s : Set Y) : e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s
Full source
theorem source_inter_preimage_target_inter (s : Set Y) :
    e.source ∩ e ⁻¹' (e.target ∩ s) = e.source ∩ e ⁻¹' s :=
  e.toPartialEquiv.source_inter_preimage_target_inter s
Source-Preimage Intersection Property for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq Y$, the intersection of the source set $e.\text{source}$ with the preimage of $e.\text{target} \cap s$ under $e$ is equal to the intersection of $e.\text{source}$ with the preimage of $s$ under $e$. In symbols: $$ e.\text{source} \cap e^{-1}(e.\text{target} \cap s) = e.\text{source} \cap e^{-1}(s). $$
PartialHomeomorph.image_source_eq_target theorem
: e '' e.source = e.target
Full source
theorem image_source_eq_target : e '' e.source = e.target :=
  e.toPartialEquiv.image_source_eq_target
Image of Source Equals Target for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the image of the source set $e.\text{source} \subseteq X$ under $e$ is equal to the target set $e.\text{target} \subseteq Y$, i.e., $e(e.\text{source}) = e.\text{target}$.
PartialHomeomorph.symm_image_target_eq_source theorem
: e.symm '' e.target = e.source
Full source
theorem symm_image_target_eq_source : e.symm '' e.target = e.source :=
  e.symm.image_source_eq_target
Inverse Image of Target Equals Source for Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the image of the target set $e.\text{target} \subseteq Y$ under the inverse map $e^{-1}$ equals the source set $e.\text{source} \subseteq X$, i.e., $e^{-1}(e.\text{target}) = e.\text{source}$.
PartialHomeomorph.ext theorem
(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'
Full source
/-- 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' :=
  toPartialEquiv_injective (PartialEquiv.ext h hinv hs)
Equality of Partial Homeomorphisms via Source and Function Agreement
Informal description
Let $e$ and $e'$ be partial homeomorphisms between topological spaces $X$ and $Y$. If: 1. The forward maps coincide: $e(x) = e'(x)$ for all $x \in X$, 2. The inverse maps coincide: $e^{-1}(y) = e'^{-1}(y)$ for all $y \in Y$, 3. The source sets coincide: $e.\text{source} = e'.\text{source}$, then $e = e'$.
PartialHomeomorph.symm_toPartialEquiv theorem
: e.symm.toPartialEquiv = e.toPartialEquiv.symm
Full source
@[simp, mfld_simps]
theorem symm_toPartialEquiv : e.symm.toPartialEquiv = e.toPartialEquiv.symm :=
  rfl
Inverse Partial Homeomorphism Preserves Underlying Partial Equivalence Structure
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the underlying partial equivalence of the inverse $e^{-1}$ is equal to the inverse of the underlying partial equivalence of $e$. That is, $e^{-1}.toPartialEquiv = e.toPartialEquiv^{-1}$.
PartialHomeomorph.symm_source theorem
: e.symm.source = e.target
Full source
theorem symm_source : e.symm.source = e.target :=
  rfl
Source of Inverse Equals Target of Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the source of its inverse $e^{-1}$ equals the target of $e$, i.e., $e^{-1}.\text{source} = e.\text{target}$.
PartialHomeomorph.symm_target theorem
: e.symm.target = e.source
Full source
theorem symm_target : e.symm.target = e.source :=
  rfl
Inverse Partial Homeomorphism Target Equals Original Source
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the target set of its inverse $e^{-1}$ equals the source set of $e$, i.e., $e^{-1}.\text{target} = e.\text{source}$.
PartialHomeomorph.symm_symm theorem
: e.symm.symm = e
Full source
@[simp, mfld_simps] theorem symm_symm : e.symm.symm = e := rfl
Double Inverse of a Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the inverse of the inverse of $e$ is equal to $e$ itself, i.e., $(e^{-1})^{-1} = e$.
PartialHomeomorph.symm_bijective theorem
: Function.Bijective (PartialHomeomorph.symm : PartialHomeomorph X Y → PartialHomeomorph Y X)
Full source
theorem symm_bijective : Function.Bijective
    (PartialHomeomorph.symm : PartialHomeomorph X Y → PartialHomeomorph Y X) :=
  Function.bijective_iff_has_inverse.mpr ⟨_, symm_symm, symm_symm⟩
Bijectivity of the Inverse Operation on Partial Homeomorphisms
Informal description
The inverse operation `symm` on partial homeomorphisms, which maps a partial homeomorphism $e \colon X \to Y$ to its inverse $e^{-1} \colon Y \to X$, is a bijective function from the set of partial homeomorphisms between $X$ and $Y$ to the set of partial homeomorphisms between $Y$ and $X$.
PartialHomeomorph.continuousAt theorem
{x : X} (h : x ∈ e.source) : ContinuousAt e x
Full source
/-- A partial homeomorphism is continuous at any point of its source -/
protected theorem continuousAt {x : X} (h : x ∈ e.source) : ContinuousAt e x :=
  (e.continuousOn x h).continuousAt (e.open_source.mem_nhds h)
Continuity of Partial Homeomorphism at Points in Its Source
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any point $x \in e.source$, the forward map $e$ is continuous at $x$.
PartialHomeomorph.continuousAt_symm theorem
{x : Y} (h : x ∈ e.target) : ContinuousAt e.symm x
Full source
/-- 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 :=
  e.symm.continuousAt h
Continuity of Inverse Partial Homeomorphism at Points in Its Target
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any point $x \in e.\text{target}$, the inverse map $e^{-1}$ is continuous at $x$.
PartialHomeomorph.tendsto_symm theorem
{x} (hx : x ∈ e.source) : Tendsto e.symm (𝓝 (e x)) (𝓝 x)
Full source
theorem tendsto_symm {x} (hx : x ∈ e.source) : Tendsto e.symm (𝓝 (e x)) (𝓝 x) := by
  simpa only [ContinuousAt, e.left_inv hx] using e.continuousAt_symm (e.map_source hx)
Limit Behavior of Inverse Partial Homeomorphism at Image Points
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any point $x \in e.\text{source}$, the inverse map $e^{-1}$ tends to $x$ as its argument tends to $e(x)$. In other words, for any neighborhood $U$ of $x$, there exists a neighborhood $V$ of $e(x)$ such that $e^{-1}(y) \in U$ for all $y \in V \cap e.\text{target}$.
PartialHomeomorph.map_nhds_eq theorem
{x} (hx : x ∈ e.source) : map e (𝓝 x) = 𝓝 (e x)
Full source
theorem map_nhds_eq {x} (hx : x ∈ e.source) : map e (𝓝 x) = 𝓝 (e x) :=
  le_antisymm (e.continuousAt hx) <|
    le_map_of_right_inverse (e.eventually_right_inverse' hx) (e.tendsto_symm hx)
Neighborhood Filter Preservation under Partial Homeomorphisms
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any point $x \in e.\text{source}$, the image under $e$ of the neighborhood filter $\mathcal{N}(x)$ equals the neighborhood filter $\mathcal{N}(e(x))$ at the image point. In other words, $e$ maps neighborhoods of $x$ to neighborhoods of $e(x)$ in a filter-preserving way.
PartialHomeomorph.symm_map_nhds_eq theorem
{x} (hx : x ∈ e.source) : map e.symm (𝓝 (e x)) = 𝓝 x
Full source
theorem symm_map_nhds_eq {x} (hx : x ∈ e.source) : map e.symm (𝓝 (e x)) = 𝓝 x :=
  (e.symm.map_nhds_eq <| e.map_source hx).trans <| by rw [e.left_inv hx]
Inverse Partial Homeomorphism Preserves Neighborhood Filters: $e^{-1}_*(\mathcal{N}(e(x))) = \mathcal{N}(x)$
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any point $x \in e.\text{source}$, the image under $e^{-1}$ of the neighborhood filter $\mathcal{N}(e(x))$ equals the neighborhood filter $\mathcal{N}(x)$. In other words, $e^{-1}$ maps neighborhoods of $e(x)$ to neighborhoods of $x$ in a filter-preserving way.
PartialHomeomorph.image_mem_nhds theorem
{x} (hx : x ∈ e.source) {s : Set X} (hs : s ∈ 𝓝 x) : e '' s ∈ 𝓝 (e x)
Full source
theorem image_mem_nhds {x} (hx : x ∈ e.source) {s : Set X} (hs : s ∈ 𝓝 x) : e '' se '' s ∈ 𝓝 (e x) :=
  e.map_nhds_eq hx ▸ Filter.image_mem_map hs
Neighborhood Image Property of Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$. For any point $x \in e.\mathrm{source}$ and any neighborhood $s$ of $x$ in $X$, the image $e(s)$ is a neighborhood of $e(x)$ in $Y$.
PartialHomeomorph.map_nhdsWithin_eq theorem
{x} (hx : x ∈ e.source) (s : Set X) : map e (𝓝[s] x) = 𝓝[e '' (e.source ∩ s)] e x
Full source
theorem map_nhdsWithin_eq {x} (hx : x ∈ e.source) (s : Set X) :
    map e (𝓝[s] x) = 𝓝[e '' (e.source ∩ s)] e x :=
  calc
    map e (𝓝[s] x) = map e (𝓝[e.source ∩ s] x) :=
      congr_arg (map e) (e.nhdsWithin_source_inter hx _).symm
    _ = 𝓝[e '' (e.source ∩ s)] e x :=
      (e.leftInvOn.mono inter_subset_left).map_nhdsWithin_eq (e.left_inv hx)
        (e.continuousAt_symm (e.map_source hx)).continuousWithinAt
        (e.continuousAt hx).continuousWithinAt
Equality of Neighborhood Filters Under Partial Homeomorphism Mapping
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, if $x$ belongs to the source set $e.\text{source}$, then for any subset $s \subseteq X$, the image under $e$ of the neighborhood filter of $x$ within $s$ equals the neighborhood filter of $e(x)$ within the image $e(e.\text{source} \cap s)$. In other words, $e_*(\mathcal{N}_s(x)) = \mathcal{N}_{e(e.\text{source} \cap s)}(e(x))$.
PartialHomeomorph.map_nhdsWithin_preimage_eq theorem
{x} (hx : x ∈ e.source) (s : Set Y) : map e (𝓝[e ⁻¹' s] x) = 𝓝[s] e x
Full source
theorem map_nhdsWithin_preimage_eq {x} (hx : x ∈ e.source) (s : Set Y) :
    map e (𝓝[e ⁻¹' s] x) = 𝓝[s] e x := by
  rw [e.map_nhdsWithin_eq hx, e.image_source_inter_eq', e.target_inter_inv_preimage_preimage,
    e.nhdsWithin_target_inter (e.map_source hx)]
Neighborhood Filter Transformation under Partial Homeomorphism and Preimage
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, if $x$ belongs to the source set $e.\mathrm{source}$, then for any subset $s \subseteq Y$, the image under $e$ of the neighborhood filter of $x$ within the preimage $e^{-1}(s)$ equals the neighborhood filter of $e(x)$ within $s$. In other words, $e_*(\mathcal{N}_{e^{-1}(s)}(x)) = \mathcal{N}_s(e(x))$.
PartialHomeomorph.eventually_nhds theorem
{x : X} (p : Y → Prop) (hx : x ∈ e.source) : (∀ᶠ y in 𝓝 (e x), p y) ↔ ∀ᶠ x in 𝓝 x, p (e x)
Full source
theorem eventually_nhds {x : X} (p : Y → Prop) (hx : x ∈ e.source) :
    (∀ᶠ y in 𝓝 (e x), p y) ↔ ∀ᶠ x in 𝓝 x, p (e x) :=
  Iff.trans (by rw [e.map_nhds_eq hx]) eventually_map
Equivalence of Neighborhood Filters Under Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $x \in e.\mathrm{source}$. For any predicate $p : Y \to \mathrm{Prop}$, the following are equivalent: 1. The predicate $p$ holds for all $y$ in some neighborhood of $e(x)$. 2. The predicate $p \circ e$ holds for all $x'$ in some neighborhood of $x$. In other words, $p$ holds eventually near $e(x)$ if and only if $p \circ e$ holds eventually near $x$.
PartialHomeomorph.eventually_nhds' theorem
{x : X} (p : X → Prop) (hx : x ∈ e.source) : (∀ᶠ y in 𝓝 (e x), p (e.symm y)) ↔ ∀ᶠ x in 𝓝 x, p x
Full source
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 := by
  rw [e.eventually_nhds _ hx]
  refine eventually_congr ((e.eventually_left_inverse hx).mono fun y hy => ?_)
  rw [hy]
Equivalence of Neighborhood Filters Under Partial Homeomorphism Inverse
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $x \in e.\mathrm{source}$. For any predicate $p : X \to \mathrm{Prop}$, the following are equivalent: 1. The predicate $p \circ e^{-1}$ holds for all $y$ in some neighborhood of $e(x)$. 2. The predicate $p$ holds for all $x'$ in some neighborhood of $x$. In other words, $p \circ e^{-1}$ holds eventually near $e(x)$ if and only if $p$ holds eventually near $x$.
PartialHomeomorph.eventually_nhdsWithin theorem
{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)
Full source
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) := by
  refine Iff.trans ?_ eventually_map
  rw [e.map_nhdsWithin_eq hx, e.image_source_inter_eq', e.nhdsWithin_target_inter (e.mapsTo hx)]
Equivalence of Neighborhood Filters Under Partial Homeomorphism and Preimage
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $x \in e.\mathrm{source}$. For any predicate $p : Y \to \mathrm{Prop}$ and subset $s \subseteq X$, the following are equivalent: 1. The predicate $p$ holds for all $y$ in some neighborhood of $e(x)$ within $e^{-1}(s)$. 2. The predicate $p \circ e$ holds for all $x'$ in some neighborhood of $x$ within $s$. In other words, $p$ holds eventually near $e(x)$ within $e^{-1}(s)$ if and only if $p \circ e$ holds eventually near $x$ within $s$.
PartialHomeomorph.eventually_nhdsWithin' theorem
{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
Full source
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 := by
  rw [e.eventually_nhdsWithin _ hx]
  refine eventually_congr <|
    (eventually_nhdsWithin_of_eventually_nhds <| e.eventually_left_inverse hx).mono fun y hy => ?_
  rw [hy]
Equivalence of Neighborhood Filters Under Partial Homeomorphism Inverse and Preimage
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $x \in e.\mathrm{source}$. For any predicate $p : X \to \mathrm{Prop}$ and subset $s \subseteq X$, the following are equivalent: 1. The predicate $p \circ e^{-1}$ holds for all $y$ in some neighborhood of $e(x)$ within $e^{-1}(s)$. 2. The predicate $p$ holds for all $x'$ in some neighborhood of $x$ within $s$. In other words, $p \circ e^{-1}$ holds eventually near $e(x)$ within $e^{-1}(s)$ if and only if $p$ holds eventually near $x$ within $s$.
PartialHomeomorph.preimage_eventuallyEq_target_inter_preimage_inter theorem
{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)
Full source
/-- 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 ⁻¹' se.symm ⁻¹' s =ᶠ[𝓝 (e x)] (e.target ∩ e.symm ⁻¹' (s ∩ f ⁻¹' t) : Set Y) := by
  rw [eventuallyEq_set, e.eventually_nhds _ hxe]
  filter_upwards [e.open_source.mem_nhds hxe,
    mem_nhdsWithin_iff_eventually.mp (hf.preimage_mem_nhdsWithin ht)]
  intro y hy hyu
  simp_rw [mem_inter_iff, mem_preimage, mem_inter_iff, e.mapsTo hy, true_and, iff_self_and,
    e.left_inv hy, iff_true_intro hyu]
Local equality of preimages under partial homeomorphism and continuous function
Informal description
Let $e \colon X \to Y$ be a partial homeomorphism between topological spaces, $s \subseteq X$ a subset, $t \subseteq Z$ a neighborhood of $f(x)$ for some continuous function $f \colon X \to Z$, and $x \in e.\mathrm{source}$. Then, within a neighborhood of $e(x)$, the preimage $e^{-1}(s)$ is equal to the intersection of $e.\mathrm{target}$ with $e^{-1}(s \cap f^{-1}(t))$.
PartialHomeomorph.isOpen_inter_preimage theorem
{s : Set Y} (hs : IsOpen s) : IsOpen (e.source ∩ e ⁻¹' s)
Full source
theorem isOpen_inter_preimage {s : Set Y} (hs : IsOpen s) : IsOpen (e.source ∩ e ⁻¹' s) :=
  e.continuousOn.isOpen_inter_preimage e.open_source hs
Openness of Source Intersection with Preimage under Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any open subset $s \subseteq Y$, the intersection of the source set $e.source$ with the preimage $e^{-1}(s)$ is an open subset of $X$.
PartialHomeomorph.isOpen_inter_preimage_symm theorem
{s : Set X} (hs : IsOpen s) : IsOpen (e.target ∩ e.symm ⁻¹' s)
Full source
theorem isOpen_inter_preimage_symm {s : Set X} (hs : IsOpen s) : IsOpen (e.target ∩ e.symm ⁻¹' s) :=
  e.symm.continuousOn.isOpen_inter_preimage e.open_target hs
Openness of Target Intersection with Inverse Preimage under Partial Homeomorphism
Informal description
Let $e \colon X \to Y$ be a partial homeomorphism between topological spaces, and let $s \subseteq X$ be an open subset. Then the intersection of the target set $e.\text{target}$ with the preimage of $s$ under the inverse map $e^{-1}$ is open in $Y$.
PartialHomeomorph.isOpen_image_of_subset_source theorem
{s : Set X} (hs : IsOpen s) (hse : s ⊆ e.source) : IsOpen (e '' s)
Full source
/-- 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) := by
  rw [(image_eq_target_inter_inv_preimage (e := e) hse)]
  exact e.continuousOn_invFun.isOpen_inter_preimage e.open_target hs
Open Mapping Property for Partial Homeomorphisms on Source Subsets
Informal description
Let $e \colon X \to Y$ be a partial homeomorphism between topological spaces, and let $s \subseteq X$ be an open subset contained in the source $e.\text{source}$. Then the image $e(s)$ is an open subset of $Y$.
PartialHomeomorph.isOpen_image_source_inter theorem
{s : Set X} (hs : IsOpen s) : IsOpen (e '' (e.source ∩ s))
Full source
/-- 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)) :=
  e.isOpen_image_of_subset_source (e.open_source.inter hs) inter_subset_left
Openness of Image of Source Intersection under Partial Homeomorphism
Informal description
Let $e \colon X \to Y$ be a partial homeomorphism between topological spaces, and let $s \subseteq X$ be an open subset. Then the image $e(e.\text{source} \cap s)$ is an open subset of $Y$.
PartialHomeomorph.isOpen_image_symm_of_subset_target theorem
{t : Set Y} (ht : IsOpen t) (hte : t ⊆ e.target) : IsOpen (e.symm '' t)
Full source
/-- 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) :=
  isOpen_image_of_subset_source e.symm ht (e.symm_source ▸ hte)
Inverse of Partial Homeomorphism is Open on Target Subsets
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $t \subseteq Y$ be an open subset contained in the target $e.\text{target}$. Then the image of $t$ under the inverse map $e^{-1}$ is an open subset of $X$.
PartialHomeomorph.isOpen_symm_image_iff_of_subset_target theorem
{t : Set Y} (hs : t ⊆ e.target) : IsOpen (e.symm '' t) ↔ IsOpen t
Full source
lemma isOpen_symm_image_iff_of_subset_target {t : Set Y} (hs : t ⊆ e.target) :
    IsOpenIsOpen (e.symm '' t) ↔ IsOpen t := by
  refine ⟨fun h ↦ ?_, fun h ↦ e.symm.isOpen_image_of_subset_source h hs⟩
  have hs' : e.symm '' te.symm '' t ⊆ e.source := by
    rw [e.symm_image_eq_source_inter_preimage hs]
    apply Set.inter_subset_left
  rw [← e.image_symm_image_of_subset_target hs]
  exact e.isOpen_image_of_subset_source h hs'
Openness Criterion for Inverse Images under Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $t \subseteq Y$ contained in the target $e.\mathrm{target}$, the image $e^{-1}(t)$ is open in $X$ if and only if $t$ is open in $Y$.
PartialHomeomorph.isOpen_image_iff_of_subset_source theorem
{s : Set X} (hs : s ⊆ e.source) : IsOpen (e '' s) ↔ IsOpen s
Full source
theorem isOpen_image_iff_of_subset_source {s : Set X} (hs : s ⊆ e.source) :
    IsOpenIsOpen (e '' s) ↔ IsOpen s := by
  rw [← e.symm.isOpen_symm_image_iff_of_subset_target hs, e.symm_symm]
Openness Criterion for Images under Partial Homeomorphisms
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and any subset $s \subseteq X$ contained in the source $e.\mathrm{source}$, the image $e(s)$ is open in $Y$ if and only if $s$ is open in $X$.
PartialHomeomorph.IsImage definition
(s : Set X) (t : Set Y) : Prop
Full source
/-- 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 :=
  ∀ ⦃x⦄, x ∈ e.source → (e x ∈ te x ∈ t ↔ x ∈ s)
Image condition for partial homeomorphisms
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, we say that a subset $t \subseteq Y$ is the *image* of a subset $s \subseteq X$ under $e$ if for every $x$ in the source of $e$, we have $e(x) \in t$ if and only if $x \in s$. This is equivalent to the following conditions: 1. The image of $e.source \cap s$ under $e$ equals $e.target \cap t$. 2. The preimage of $t$ under $e$ intersected with $e.source$ equals $e.source \cap s$.
PartialHomeomorph.IsImage.toPartialEquiv theorem
(h : e.IsImage s t) : e.toPartialEquiv.IsImage s t
Full source
theorem toPartialEquiv (h : e.IsImage s t) : e.toPartialEquiv.IsImage s t :=
  h
Image condition for partial homeomorphism implies image condition for underlying partial equivalence
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$ and $t \subseteq Y$, if $t$ is the image of $s$ under $e$ (i.e., $e.IsImage s t$ holds), then the underlying partial equivalence $e.toPartialEquiv$ also satisfies $e.toPartialEquiv.IsImage s t$.
PartialHomeomorph.IsImage.apply_mem_iff theorem
(h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ t ↔ x ∈ s
Full source
theorem apply_mem_iff (h : e.IsImage s t) (hx : x ∈ e.source) : e x ∈ te x ∈ t ↔ x ∈ s :=
  h hx
Characterization of Image Condition for Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets. If $t$ is the image of $s$ under $e$ (i.e., $e$ satisfies the `IsImage` condition for $s$ and $t$), then for any $x$ in the source of $e$, we have $e(x) \in t$ if and only if $x \in s$.
PartialHomeomorph.IsImage.symm theorem
(h : e.IsImage s t) : e.symm.IsImage t s
Full source
protected theorem symm (h : e.IsImage s t) : e.symm.IsImage t s :=
  h.toPartialEquiv.symm
Inverse Image Symmetry for Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$. Then the inverse partial homeomorphism $e^{-1}$ has $s$ as the image of $t$.
PartialHomeomorph.IsImage.symm_apply_mem_iff theorem
(h : e.IsImage s t) (hy : y ∈ e.target) : e.symm y ∈ s ↔ y ∈ t
Full source
theorem symm_apply_mem_iff (h : e.IsImage s t) (hy : y ∈ e.target) : e.symm y ∈ se.symm y ∈ s ↔ y ∈ t :=
  h.symm hy
Characterization of Inverse Image Condition for Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$. Then for any $y$ in the target of $e$, the inverse map $e^{-1}(y)$ belongs to $s$ if and only if $y$ belongs to $t$.
PartialHomeomorph.IsImage.symm_iff theorem
: e.symm.IsImage t s ↔ e.IsImage s t
Full source
@[simp]
theorem symm_iff : e.symm.IsImage t s ↔ e.IsImage s t :=
  ⟨fun h => h.symm, fun h => h.symm⟩
Equivalence of Image Conditions for Partial Homeomorphism and Its Inverse
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$ and $t \subseteq Y$, the following are equivalent: 1. The inverse partial homeomorphism $e^{-1}$ has $s$ as the image of $t$. 2. The partial homeomorphism $e$ has $t$ as the image of $s$. In other words, $e^{-1}(t) = s$ if and only if $e(s) = t$ (where these equalities are understood as holding on the respective sources and targets).
PartialHomeomorph.IsImage.mapsTo theorem
(h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t)
Full source
protected theorem mapsTo (h : e.IsImage s t) : MapsTo e (e.source ∩ s) (e.target ∩ t) :=
  h.toPartialEquiv.mapsTo
Mapping Property of Partial Homeomorphism on Restricted Domains
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the function $e$ maps every element in the intersection $e.\text{source} \cap s$ to an element in the intersection $e.\text{target} \cap t$.
PartialHomeomorph.IsImage.symm_mapsTo theorem
(h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s)
Full source
theorem symm_mapsTo (h : e.IsImage s t) : MapsTo e.symm (e.target ∩ t) (e.source ∩ s) :=
  h.symm.mapsTo
Inverse Mapping Property for Partial Homeomorphism Images
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the inverse function $e^{-1}$ maps every element in the intersection $e.\text{target} \cap t$ to an element in the intersection $e.\text{source} \cap s$.
PartialHomeomorph.IsImage.image_eq theorem
(h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t
Full source
theorem image_eq (h : e.IsImage s t) : e '' (e.source ∩ s) = e.target ∩ t :=
  h.toPartialEquiv.image_eq
Image of Restricted Source Equals Restricted Target for Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the image of the intersection $e.\text{source} \cap s$ under $e$ equals the intersection $e.\text{target} \cap t$, i.e., $e(e.\text{source} \cap s) = e.\text{target} \cap t$.
PartialHomeomorph.IsImage.symm_image_eq theorem
(h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s
Full source
theorem symm_image_eq (h : e.IsImage s t) : e.symm '' (e.target ∩ t) = e.source ∩ s :=
  h.symm.image_eq
Inverse Image Equality for Partial Homeomorphism Images
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the image of the intersection $e.\text{target} \cap t$ under the inverse partial homeomorphism $e^{-1}$ equals the intersection $e.\text{source} \cap s$, i.e., $e^{-1}(e.\text{target} \cap t) = e.\text{source} \cap s$.
PartialHomeomorph.IsImage.iff_preimage_eq theorem
: e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s
Full source
theorem iff_preimage_eq : e.IsImage s t ↔ e.source ∩ e ⁻¹' t = e.source ∩ s :=
  PartialEquiv.IsImage.iff_preimage_eq
Characterization of Partial Homeomorphism Image via Preimage Equality
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$, $t \subseteq Y$, the following are equivalent: 1. $t$ is the image of $s$ under $e$ (i.e., for every $x \in e.source$, $e(x) \in t$ if and only if $x \in s$) 2. The preimage of $t$ under $e$ intersected with $e.source$ equals $e.source \cap s$ In other words, $e.\text{IsImage}\ s\ t$ holds if and only if $e.source \cap e^{-1}(t) = e.source \cap s$.
PartialHomeomorph.IsImage.iff_symm_preimage_eq theorem
: e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t
Full source
theorem iff_symm_preimage_eq : e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' s = e.target ∩ t :=
  symm_iff.symm.trans iff_preimage_eq
Characterization of Partial Homeomorphism Image via Inverse Preimage Equality
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$, $t \subseteq Y$, the following are equivalent: 1. $t$ is the image of $s$ under $e$ (i.e., $e$ maps $e.\text{source} \cap s$ bijectively to $e.\text{target} \cap t$) 2. The preimage of $s$ under $e^{-1}$ intersected with $e.\text{target}$ equals $e.\text{target} \cap t$ In other words, $e.\text{IsImage}\ s\ t$ holds if and only if $e.\text{target} \cap e^{-1}(s) = e.\text{target} \cap t$.
PartialHomeomorph.IsImage.iff_symm_preimage_eq' theorem
: e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' (e.source ∩ s) = e.target ∩ t
Full source
theorem iff_symm_preimage_eq' :
    e.IsImage s t ↔ e.target ∩ e.symm ⁻¹' (e.source ∩ s) = e.target ∩ t := by
  rw [iff_symm_preimage_eq, ← image_source_inter_eq, ← image_source_inter_eq']
Characterization of Partial Homeomorphism Image via Restricted Inverse Preimage Equality
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$, $t \subseteq Y$, the following are equivalent: 1. $t$ is the image of $s$ under $e$ (i.e., $e$ maps $e.\mathrm{source} \cap s$ bijectively to $e.\mathrm{target} \cap t$) 2. The preimage of $e.\mathrm{source} \cap s$ under $e^{-1}$ intersected with $e.\mathrm{target}$ equals $e.\mathrm{target} \cap t$ In symbols: $$ e.\mathrm{IsImage}\, s\, t \iff e.\mathrm{target} \cap e^{-1}(e.\mathrm{source} \cap s) = e.\mathrm{target} \cap t. $$
PartialHomeomorph.IsImage.iff_preimage_eq' theorem
: e.IsImage s t ↔ e.source ∩ e ⁻¹' (e.target ∩ t) = e.source ∩ s
Full source
theorem iff_preimage_eq' : e.IsImage s t ↔ e.source ∩ e ⁻¹' (e.target ∩ t) = e.source ∩ s :=
  symm_iff.symm.trans iff_symm_preimage_eq'
Characterization of Partial Homeomorphism Image via Restricted Preimage Equality
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$, $t \subseteq Y$, the following are equivalent: 1. $t$ is the image of $s$ under $e$ (i.e., $e$ maps $e.\text{source} \cap s$ bijectively to $e.\text{target} \cap t$) 2. The preimage of $e.\text{target} \cap t$ under $e$ intersected with $e.\text{source}$ equals $e.\text{source} \cap s$ In symbols: $$ e\text{ is image of } s \text{ and } t \iff e.\text{source} \cap e^{-1}(e.\text{target} \cap t) = e.\text{source} \cap s. $$
PartialHomeomorph.IsImage.of_image_eq theorem
(h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t
Full source
theorem of_image_eq (h : e '' (e.source ∩ s) = e.target ∩ t) : e.IsImage s t :=
  PartialEquiv.IsImage.of_image_eq h
Image Condition for Partial Homeomorphisms via Restricted Image Equality
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets. If the image of $e.\mathrm{source} \cap s$ under $e$ equals $e.\mathrm{target} \cap t$, then $t$ is the image of $s$ under $e$. In symbols: $$ e(e.\mathrm{source} \cap s) = e.\mathrm{target} \cap t \implies e.\mathrm{IsImage}\, s\, t. $$
PartialHomeomorph.IsImage.of_symm_image_eq theorem
(h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t
Full source
theorem of_symm_image_eq (h : e.symm '' (e.target ∩ t) = e.source ∩ s) : e.IsImage s t :=
  PartialEquiv.IsImage.of_symm_image_eq h
Image Condition via Inverse Image Equality for Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets. If the image of $e.\mathrm{target} \cap t$ under the inverse partial homeomorphism $e^{-1}$ equals $e.\mathrm{source} \cap s$, then $t$ is the image of $s$ under $e$. In symbols: $$ e^{-1}(e.\mathrm{target} \cap t) = e.\mathrm{source} \cap s \implies e.\mathrm{IsImage}\, s\, t. $$
PartialHomeomorph.IsImage.compl theorem
(h : e.IsImage s t) : e.IsImage sᶜ tᶜ
Full source
protected theorem compl (h : e.IsImage s t) : e.IsImage sᶜ tᶜ := fun _ hx => (h hx).not
Preservation of Complement Sets under Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$, $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., $e$ satisfies the image condition $e.\text{IsImage}\, s\, t$). Then the complement $s^c$ of $s$ in $X$ and the complement $t^c$ of $t$ in $Y$ also satisfy the image condition, i.e., $e.\text{IsImage}\, s^c\, t^c$. In other words, if for all $x \in e.\text{source}$ we have $e(x) \in t \leftrightarrow x \in s$, then for all $x \in e.\text{source}$ we have $e(x) \in t^c \leftrightarrow x \in s^c$.
PartialHomeomorph.IsImage.inter theorem
{s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') : e.IsImage (s ∩ s') (t ∩ t')
Full source
protected theorem inter {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s ∩ s') (t ∩ t') := fun _ hx => (h hx).and (h' hx)
Preservation of Intersections under Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s, s' \subseteq X$ and $t, t' \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ and $t'$ is the image of $s'$ under $e$. Then the intersection $t \cap t'$ is the image of the intersection $s \cap s'$ under $e$. More precisely, if $e.\text{IsImage}\, s\, t$ and $e.\text{IsImage}\, s'\, t'$ hold, then $e.\text{IsImage}\, (s \cap s')\, (t \cap t')$ also holds.
PartialHomeomorph.IsImage.union theorem
{s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') : e.IsImage (s ∪ s') (t ∪ t')
Full source
protected theorem union {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s ∪ s') (t ∪ t') := fun _ hx => (h hx).or (h' hx)
Image Condition Preserves Unions under Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s, s' \subseteq X$ and $t, t' \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ and $t'$ is the image of $s'$ under $e$. Then the union $s \cup s'$ is mapped to the union $t \cup t'$ under $e$, i.e., $e$ satisfies the image condition for the unions.
PartialHomeomorph.IsImage.diff theorem
{s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') : e.IsImage (s \ s') (t \ t')
Full source
protected theorem diff {s' t'} (h : e.IsImage s t) (h' : e.IsImage s' t') :
    e.IsImage (s \ s') (t \ t') :=
  h.inter h'.compl
Preservation of Set Differences under Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s, s' \subseteq X$ and $t, t' \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ and $t'$ is the image of $s'$ under $e$. Then the set difference $s \setminus s'$ is mapped to the set difference $t \setminus t'$ under $e$, i.e., $e$ satisfies the image condition for the set differences. More precisely, if $e.\text{IsImage}\, s\, t$ and $e.\text{IsImage}\, s'\, t'$ hold, then $e.\text{IsImage}\, (s \setminus s')\, (t \setminus t')$ also holds.
PartialHomeomorph.IsImage.leftInvOn_piecewise theorem
{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)
Full source
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) :=
  h.toPartialEquiv.leftInvOn_piecewise h'
Left Inverse Property for Piecewise-Defined Partial Homeomorphisms on Image Sets
Informal description
Let $e$ and $e'$ be partial homeomorphisms between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under both $e$ and $e'$. Then the piecewise-defined function \[ f(x) = \begin{cases} e(x) & \text{if } x \in s, \\ e'(x) & \text{otherwise}, \end{cases} \] has a left inverse on the set $s \cap e.\text{source} \cup s^c \cap e'.\text{source}$ given by the piecewise function \[ g(y) = \begin{cases} e^{-1}(y) & \text{if } y \in t, \\ e'^{-1}(y) & \text{otherwise}. \end{cases} \]
PartialHomeomorph.IsImage.inter_eq_of_inter_eq_of_eqOn theorem
{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
Full source
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 :=
  h.toPartialEquiv.inter_eq_of_inter_eq_of_eqOn h' hs Heq
Equality of Target Intersections for Partial Homeomorphisms with Matching Source Behavior
Informal description
Let $e$ and $e'$ be partial homeomorphisms between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under both $e$ and $e'$ (i.e., $e.\text{IsImage}\, s\, t$ and $e'.\text{IsImage}\, s\, t$ hold). If the intersections $e.\text{source} \cap s$ and $e'.\text{source} \cap s$ are equal, and $e$ and $e'$ coincide on this intersection, then the intersections $e.\text{target} \cap t$ and $e'.\text{target} \cap t$ are also equal.
PartialHomeomorph.IsImage.symm_eqOn_of_inter_eq_of_eqOn theorem
{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)
Full source
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) :=
  h.toPartialEquiv.symm_eq_on_of_inter_eq_of_eqOn hs Heq
Inverse Functions of Partial Homeomorphisms Coincide on Target Intersection When Agreeing on Source Intersection
Informal description
Let $e$ and $e'$ be partial homeomorphisms between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., $e.\text{IsImage}\ s\ t$ holds). If the intersections $e.\text{source} \cap s$ and $e'.\text{source} \cap s$ are equal, and if $e$ and $e'$ coincide on this intersection, then their inverse functions $e^{-1}$ and $e'^{-1}$ coincide on the intersection $e.\text{target} \cap t$.
PartialHomeomorph.IsImage.map_nhdsWithin_eq theorem
(h : e.IsImage s t) (hx : x ∈ e.source) : map e (𝓝[s] x) = 𝓝[t] e x
Full source
theorem map_nhdsWithin_eq (h : e.IsImage s t) (hx : x ∈ e.source) : map e (𝓝[s] x) = 𝓝[t] e x := by
  rw [e.map_nhdsWithin_eq hx, h.image_eq, e.nhdsWithin_target_inter (e.map_source hx)]
Equality of Neighborhood Filters Under Partial Homeomorphism with Image Condition
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then for any point $x \in e.\text{source}$, the image under $e$ of the neighborhood filter of $x$ within $s$ equals the neighborhood filter of $e(x)$ within $t$. In other words, $e_*(\mathcal{N}_s(x)) = \mathcal{N}_t(e(x))$.
PartialHomeomorph.IsImage.closure theorem
(h : e.IsImage s t) : e.IsImage (closure s) (closure t)
Full source
protected theorem closure (h : e.IsImage s t) : e.IsImage (closure s) (closure t) := fun x hx => by
  simp only [mem_closure_iff_nhdsWithin_neBot, ← h.map_nhdsWithin_eq hx, map_neBot_iff]
Preservation of Closure under Partial Homeomorphism Image Condition
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the closure of $s$ is mapped to the closure of $t$ under $e$, meaning $e.\text{IsImage}\ (\text{closure}\ s)\ (\text{closure}\ t)$ holds.
PartialHomeomorph.IsImage.interior theorem
(h : e.IsImage s t) : e.IsImage (interior s) (interior t)
Full source
protected theorem interior (h : e.IsImage s t) : e.IsImage (interior s) (interior t) := by
  simpa only [closure_compl, compl_compl] using h.compl.closure.compl
Preservation of Interior under Partial Homeomorphism Image Condition
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the interior of $s$ is mapped to the interior of $t$ under $e$, meaning $e.\text{IsImage}\ (\text{int}(s))\ (\text{int}(t))$ holds.
PartialHomeomorph.IsImage.frontier theorem
(h : e.IsImage s t) : e.IsImage (frontier s) (frontier t)
Full source
protected theorem frontier (h : e.IsImage s t) : e.IsImage (frontier s) (frontier t) :=
  h.closure.diff h.interior
Preservation of Frontier under Partial Homeomorphism Image Condition
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$ and $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the frontier of $s$ is mapped to the frontier of $t$ under $e$, meaning $e.\text{IsImage}\ (\text{frontier}\ s)\ (\text{frontier}\ t)$ holds.
PartialHomeomorph.IsImage.isOpen_iff theorem
(h : e.IsImage s t) : IsOpen (e.source ∩ s) ↔ IsOpen (e.target ∩ t)
Full source
theorem isOpen_iff (h : e.IsImage s t) : IsOpenIsOpen (e.source ∩ s) ↔ IsOpen (e.target ∩ t) :=
  ⟨fun hs => h.symm_preimage_eq' ▸ e.symm.isOpen_inter_preimage hs, fun hs =>
    h.preimage_eq' ▸ e.isOpen_inter_preimage hs⟩
Openness Correspondence Under Partial Homeomorphism Image Condition
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq X$, $t \subseteq Y$ be subsets such that $t$ is the image of $s$ under $e$ (i.e., for all $x \in e.\text{source}$, $e(x) \in t$ if and only if $x \in s$). Then the intersection $e.\text{source} \cap s$ is open in $X$ if and only if the intersection $e.\text{target} \cap t$ is open in $Y$.
PartialHomeomorph.IsImage.restr definition
(h : e.IsImage s t) (hs : IsOpen (e.source ∩ s)) : PartialHomeomorph X Y
Full source
/-- 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 where
  toPartialEquiv := h.toPartialEquiv.restr
  open_source := hs
  open_target := h.isOpen_iff.1 hs
  continuousOn_toFun := e.continuousOn.mono inter_subset_left
  continuousOn_invFun := e.symm.continuousOn.mono inter_subset_left
Restriction of a partial homeomorphism to corresponding subsets
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and subsets $s \subseteq X$, $t \subseteq Y$ such that $t$ is the image of $s$ under $e$ (i.e., $e.\text{IsImage}\, s\, t$ holds), and assuming that the intersection $e.\text{source} \cap s$ is open, the restriction $e \restriction_{s,t}$ is a partial homeomorphism with: - Source set: $e.\text{source} \cap s$ (open by assumption) - Target set: $e.\text{target} \cap t$ (open by the image condition) - Forward function: $e$ restricted to $e.\text{source} \cap s$ - Inverse function: $e^{-1}$ restricted to $e.\text{target} \cap t$ The restricted partial homeomorphism maintains continuity on these restricted domains.
PartialHomeomorph.isImage_source_target theorem
: e.IsImage e.source e.target
Full source
theorem isImage_source_target : e.IsImage e.source e.target :=
  e.toPartialEquiv.isImage_source_target
Source and Target are Images Under Partial Homeomorphism
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the target set $e.target$ is the image of the source set $e.source$ under $e$. That is, $e$ maps $e.source$ bijectively onto $e.target$.
PartialHomeomorph.isImage_source_target_of_disjoint theorem
(e' : PartialHomeomorph X Y) (hs : Disjoint e.source e'.source) (ht : Disjoint e.target e'.target) : e.IsImage e'.source e'.target
Full source
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 :=
  e.toPartialEquiv.isImage_source_target_of_disjoint e'.toPartialEquiv hs ht
Disjoint Partial Homeomorphisms Preserve Image Property
Informal description
Let $e$ and $e'$ be partial homeomorphisms between topological spaces $X$ and $Y$. If the sources of $e$ and $e'$ are disjoint (i.e., $e.\text{source} \cap e'.\text{source} = \emptyset$) and their targets are also disjoint (i.e., $e.\text{target} \cap e'.\text{target} = \emptyset$), then the target of $e'$ is the image of the source of $e'$ under $e$ (i.e., $e.\text{IsImage}\ e'.\text{source}\ e'.\text{target}$ holds).
PartialHomeomorph.preimage_interior theorem
(s : Set Y) : e.source ∩ e ⁻¹' interior s = e.source ∩ interior (e ⁻¹' s)
Full source
/-- 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) :=
  (IsImage.of_preimage_eq rfl).interior.preimage_eq
Preimage of Interior Equals Interior of Preimage for Partial Homeomorphisms
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq Y$ be a subset. Then the intersection of $e$'s source with the preimage of the interior of $s$ equals the intersection of $e$'s source with the interior of the preimage of $s$. In other words: $$ e.\text{source} \cap e^{-1}(\text{int}(s)) = e.\text{source} \cap \text{int}(e^{-1}(s)) $$
PartialHomeomorph.preimage_closure theorem
(s : Set Y) : e.source ∩ e ⁻¹' closure s = e.source ∩ closure (e ⁻¹' s)
Full source
theorem preimage_closure (s : Set Y) : e.source ∩ e ⁻¹' closure s = e.source ∩ closure (e ⁻¹' s) :=
  (IsImage.of_preimage_eq rfl).closure.preimage_eq
Preimage of Closure under Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq Y$ be a subset. Then the intersection of $e$'s source with the preimage of the closure of $s$ equals the intersection of $e$'s source with the closure of the preimage of $s$. In other words: $$ e.\text{source} \cap e^{-1}(\overline{s}) = e.\text{source} \cap \overline{e^{-1}(s)} $$
PartialHomeomorph.preimage_frontier theorem
(s : Set Y) : e.source ∩ e ⁻¹' frontier s = e.source ∩ frontier (e ⁻¹' s)
Full source
theorem preimage_frontier (s : Set Y) :
    e.source ∩ e ⁻¹' frontier s = e.source ∩ frontier (e ⁻¹' s) :=
  (IsImage.of_preimage_eq rfl).frontier.preimage_eq
Preimage of Frontier under Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq Y$ be a subset. Then the intersection of $e$'s source with the preimage of the frontier of $s$ equals the intersection of $e$'s source with the frontier of the preimage of $s$. In other words: $$ e.\text{source} \cap e^{-1}(\partial s) = e.\text{source} \cap \partial(e^{-1}(s)) $$
PartialHomeomorph.ofContinuousOpenRestrict definition
(e : PartialEquiv X Y) (hc : ContinuousOn e e.source) (ho : IsOpenMap (e.source.restrict e)) (hs : IsOpen e.source) : PartialHomeomorph X Y
Full source
/-- 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 where
  toPartialEquiv := e
  open_source := hs
  open_target := by simpa only [range_restrict, e.image_source_eq_target] using ho.isOpen_range
  continuousOn_toFun := hc
  continuousOn_invFun := e.image_source_eq_target ▸ ho.continuousOn_image_of_leftInvOn e.leftInvOn
Partial homeomorphism from continuous open restriction
Informal description
Given a partial equivalence $e$ between topological spaces $X$ and $Y$, if the function $e$ is continuous on its source $e.source$, the restriction of $e$ to $e.source$ is an open map, and $e.source$ is open in $X$, then $e$ can be extended to a partial homeomorphism between $X$ and $Y$. More precisely, the resulting partial homeomorphism has: - The same partial equivalence structure as $e$ - $e.source$ as its open source set - $e.target$ as its open target set (which follows from $e$ being an open map on its source) - $e$ as its continuous forward map on $e.source$ - A continuous inverse map on $e.target$ (which exists because $e$ is bijective on its domain and codomain, and the open map property ensures continuity of the inverse)
PartialHomeomorph.ofContinuousOpen definition
(e : PartialEquiv X Y) (hc : ContinuousOn e e.source) (ho : IsOpenMap e) (hs : IsOpen e.source) : PartialHomeomorph X Y
Full source
/-- 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 :=
  ofContinuousOpenRestrict e hc (ho.restrict hs) hs
Partial homeomorphism from continuous open map
Informal description
Given a partial equivalence $e$ between topological spaces $X$ and $Y$, if the function $e$ is continuous on its source set $e.\text{source} \subseteq X$, $e$ is an open map, and $e.\text{source}$ is open in $X$, then $e$ can be extended to a partial homeomorphism between $X$ and $Y$. More precisely, the resulting partial homeomorphism has: - The same partial equivalence structure as $e$ - $e.\text{source}$ as its open source set - $e.\text{target}$ as its open target set (which follows from $e$ being an open map) - $e$ as its continuous forward map on $e.\text{source}$ - A continuous inverse map on $e.\text{target}$ (which exists because $e$ is bijective on its domain and codomain, and the open map property ensures continuity of the inverse)
PartialHomeomorph.restrOpen definition
(s : Set X) (hs : IsOpen s) : PartialHomeomorph X Y
Full source
/-- 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 :=
  (@IsImage.of_symm_preimage_eq X Y _ _ e s (e.symm ⁻¹' s) rfl).restr
    (IsOpen.inter e.open_source hs)
Open restriction of a partial homeomorphism
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and an open subset $s \subseteq X$, the restriction $e \restriction_{\text{open}} s$ is a partial homeomorphism with: - Source set: $e.\text{source} \cap s$ (which is open since both $e.\text{source}$ and $s$ are open) - Target set: $e.\text{target} \cap e(s \cap e.\text{source})$ - Forward function: $e$ restricted to $e.\text{source} \cap s$ - Inverse function: $e^{-1}$ restricted to $e.\text{target} \cap e(s \cap e.\text{source})$ The restricted partial homeomorphism maintains continuity on these restricted domains, and its underlying partial equivalence is definitionally equal to the restriction of $e$'s partial equivalence to $s$.
PartialHomeomorph.restrOpen_toPartialEquiv theorem
(s : Set X) (hs : IsOpen s) : (e.restrOpen s hs).toPartialEquiv = e.toPartialEquiv.restr s
Full source
@[simp, mfld_simps]
theorem restrOpen_toPartialEquiv (s : Set X) (hs : IsOpen s) :
    (e.restrOpen s hs).toPartialEquiv = e.toPartialEquiv.restr s :=
  rfl
Equality of Partial Equivalence Under Open Restriction
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and an open subset $s \subseteq X$, the underlying partial equivalence of the open restriction $e \restriction_{\text{open}} s$ is equal to the restriction of $e$'s partial equivalence to $s$. That is, $(e \restriction_{\text{open}} s).\text{toPartialEquiv} = e.\text{toPartialEquiv} \restriction s$.
PartialHomeomorph.restrOpen_source theorem
(s : Set X) (hs : IsOpen s) : (e.restrOpen s hs).source = e.source ∩ s
Full source
theorem restrOpen_source (s : Set X) (hs : IsOpen s) : (e.restrOpen s hs).source = e.source ∩ s :=
  rfl
Source Set of Open Restriction of Partial Homeomorphism
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, and an open subset $s \subseteq X$, the source set of the restricted partial homeomorphism $e \restriction_{\text{open}} s$ is equal to the intersection of $e$'s source set with $s$, i.e., $(e \restriction_{\text{open}} s).\text{source} = e.\text{source} \cap s$.
PartialHomeomorph.restr definition
(s : Set X) : PartialHomeomorph X Y
Full source
/-- 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! -isSimp source target]
protected def restr (s : Set X) : PartialHomeomorph X Y :=
  e.restrOpen (interior s) isOpen_interior
Restriction of a partial homeomorphism to interior of a set
Informal description
The restriction of a partial homeomorphism $e$ between topological spaces $X$ and $Y$ to the intersection of its source set $e.\text{source}$ with the interior of a subset $s \subseteq X$. This ensures the restriction remains a partial homeomorphism (defined on open sets) regardless of the choice of $s$. When $s$ is open, this coincides with the standard restriction of partial equivalences.
PartialHomeomorph.restr_toPartialEquiv theorem
(s : Set X) : (e.restr s).toPartialEquiv = e.toPartialEquiv.restr (interior s)
Full source
@[simp, mfld_simps]
theorem restr_toPartialEquiv (s : Set X) :
    (e.restr s).toPartialEquiv = e.toPartialEquiv.restr (interior s) :=
  rfl
Restriction of Partial Homeomorphism Commutes with Underlying Partial Equivalence
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$ and any subset $s \subseteq X$, the underlying partial equivalence of the restriction $e \restriction s$ is equal to the restriction of $e$'s partial equivalence to the interior of $s$. That is, $(e \restriction s).\text{toPartialEquiv} = e.\text{toPartialEquiv} \restriction (\text{interior } s)$.
PartialHomeomorph.restr_source' theorem
(s : Set X) (hs : IsOpen s) : (e.restr s).source = e.source ∩ s
Full source
theorem restr_source' (s : Set X) (hs : IsOpen s) : (e.restr s).source = e.source ∩ s := by
  rw [e.restr_source, hs.interior_eq]
Source of Restricted Partial Homeomorphism for Open Set
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$ and an open subset $s \subseteq X$, the source set of the restricted partial homeomorphism $e \restriction s$ is equal to the intersection of $e$'s source set with $s$, i.e., $(e \restriction s).\text{source} = e.\text{source} \cap s$.
PartialHomeomorph.restr_toPartialEquiv' theorem
(s : Set X) (hs : IsOpen s) : (e.restr s).toPartialEquiv = e.toPartialEquiv.restr s
Full source
theorem restr_toPartialEquiv' (s : Set X) (hs : IsOpen s) :
    (e.restr s).toPartialEquiv = e.toPartialEquiv.restr s := by
  rw [e.restr_toPartialEquiv, hs.interior_eq]
Restriction of Partial Homeomorphism to Open Set Commutes with Underlying Partial Equivalence
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$ and an open subset $s \subseteq X$, the underlying partial equivalence of the restriction $e \restriction s$ is equal to the restriction of $e$'s partial equivalence to $s$. That is, $(e \restriction s).\text{toPartialEquiv} = e.\text{toPartialEquiv} \restriction s$.
PartialHomeomorph.restr_eq_of_source_subset theorem
{e : PartialHomeomorph X Y} {s : Set X} (h : e.source ⊆ s) : e.restr s = e
Full source
theorem restr_eq_of_source_subset {e : PartialHomeomorph X Y} {s : Set X} (h : e.source ⊆ s) :
    e.restr s = e :=
  toPartialEquiv_injective <| PartialEquiv.restr_eq_of_source_subset <|
    interior_maximal h e.open_source
Restriction of Partial Homeomorphism to Superset of Source is Identity
Informal description
For a partial homeomorphism $e$ between topological spaces $X$ and $Y$, if the source set $e.\text{source}$ is contained in a subset $s \subseteq X$, then the restriction of $e$ to $s$ equals $e$ itself.
PartialHomeomorph.restr_univ theorem
{e : PartialHomeomorph X Y} : e.restr univ = e
Full source
@[simp, mfld_simps]
theorem restr_univ {e : PartialHomeomorph X Y} : e.restr univ = e :=
  restr_eq_of_source_subset (subset_univ _)
Restriction to Universal Set is Identity for Partial Homeomorphisms
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the restriction of $e$ to the universal set $\text{univ}$ (the entire space $X$) is equal to $e$ itself.
PartialHomeomorph.restr_source_inter theorem
(s : Set X) : e.restr (e.source ∩ s) = e.restr s
Full source
theorem restr_source_inter (s : Set X) : e.restr (e.source ∩ s) = e.restr s := by
  refine PartialHomeomorph.ext _ _ (fun x => rfl) (fun x => rfl) ?_
  simp [e.open_source.interior_eq, ← inter_assoc]
Restriction of Partial Homeomorphism to Intersection with Source
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$ and any subset $s \subseteq X$, the restriction of $e$ to $e.\text{source} \cap s$ is equal to the restriction of $e$ to $s$. That is, $e \restriction_{e.\text{source} \cap s} = e \restriction_s$.
PartialHomeomorph.refl definition
(X : Type*) [TopologicalSpace X] : PartialHomeomorph X X
Full source
/-- The identity on the whole space as a partial homeomorphism. -/
@[simps! (config := mfld_cfg) apply, simps! -isSimp source target]
protected def refl (X : Type*) [TopologicalSpace X] : PartialHomeomorph X X :=
  (Homeomorph.refl X).toPartialHomeomorph
Identity partial homeomorphism
Informal description
The identity partial homeomorphism on a topological space $X$, where the source and target are both the entire space $X$, and the forward and inverse maps are both the identity function.
PartialHomeomorph.refl_partialEquiv theorem
: (PartialHomeomorph.refl X).toPartialEquiv = PartialEquiv.refl X
Full source
@[simp, mfld_simps]
theorem refl_partialEquiv : (PartialHomeomorph.refl X).toPartialEquiv = PartialEquiv.refl X :=
  rfl
Identity Partial Homeomorphism Yields Identity Partial Equivalence
Informal description
The partial equivalence associated with the identity partial homeomorphism on a topological space $X$ is equal to the identity partial equivalence on $X$.
PartialHomeomorph.refl_symm theorem
: (PartialHomeomorph.refl X).symm = PartialHomeomorph.refl X
Full source
@[simp, mfld_simps]
theorem refl_symm : (PartialHomeomorph.refl X).symm = PartialHomeomorph.refl X :=
  rfl
Inverse of Identity Partial Homeomorphism is Identity
Informal description
The inverse of the identity partial homeomorphism on a topological space $X$ is equal to the identity partial homeomorphism itself, i.e., $(\text{refl } X)^{-1} = \text{refl } X$.
PartialHomeomorph.const definition
(ha : IsOpen { a }) (hb : IsOpen { b }) : PartialHomeomorph X Y
Full source
/--
This is `PartialEquiv.single` as a partial homeomorphism: a constant map,
whose source and target are necessarily singleton sets.
-/
def const (ha : IsOpen {a}) (hb : IsOpen {b}) : PartialHomeomorph X Y where
  toPartialEquiv := PartialEquiv.single a b
  open_source := ha
  open_target := hb
  continuousOn_toFun := by simp
  continuousOn_invFun := by simp
Constant partial homeomorphism between singleton sets
Informal description
The partial homeomorphism `PartialHomeomorph.const a b` is a constant map between the singleton sets $\{a\}$ in $X$ and $\{b\}$ in $Y$, where $\{a\}$ and $\{b\}$ are required to be open subsets of $X$ and $Y$ respectively. The forward map sends every element in $\{a\}$ to $b$, and the inverse map sends every element in $\{b\}$ to $a$.
PartialHomeomorph.const_apply theorem
(ha : IsOpen { a }) (hb : IsOpen { b }) (x : X) : (const ha hb) x = b
Full source
@[simp, mfld_simps]
lemma const_apply (ha : IsOpen {a}) (hb : IsOpen {b}) (x : X) : (const ha hb) x = b := rfl
Constant Partial Homeomorphism Maps to Target Singleton
Informal description
For any open singleton sets $\{a\}$ in $X$ and $\{b\}$ in $Y$, the constant partial homeomorphism $\text{const}(a, b)$ maps any $x \in X$ to $b$.
PartialHomeomorph.const_source theorem
(ha : IsOpen { a }) (hb : IsOpen { b }) : (const ha hb).source = { a }
Full source
@[simp, mfld_simps]
lemma const_source (ha : IsOpen {a}) (hb : IsOpen {b}) : (const ha hb).source = {a} := rfl
Source of Constant Partial Homeomorphism is Singleton Set $\{a\}$
Informal description
For any open singleton sets $\{a\}$ in $X$ and $\{b\}$ in $Y$, the source of the constant partial homeomorphism $\text{const}(a, b)$ is equal to $\{a\}$.
PartialHomeomorph.const_target theorem
(ha : IsOpen { a }) (hb : IsOpen { b }) : (const ha hb).target = { b }
Full source
@[simp, mfld_simps]
lemma const_target (ha : IsOpen {a}) (hb : IsOpen {b}) : (const ha hb).target = {b} := rfl
Target of Constant Partial Homeomorphism is Singleton
Informal description
For any open singleton sets $\{a\}$ in $X$ and $\{b\}$ in $Y$, the target of the constant partial homeomorphism $\text{const}(a,b)$ is equal to $\{b\}$.
PartialHomeomorph.ofSet definition
(s : Set X) (hs : IsOpen s) : PartialHomeomorph X X
Full source
/-- The identity partial equivalence on a set `s` -/
@[simps! (config := mfld_cfg) apply, simps! -isSimp source target]
def ofSet (s : Set X) (hs : IsOpen s) : PartialHomeomorph X X where
  toPartialEquiv := PartialEquiv.ofSet s
  open_source := hs
  open_target := hs
  continuousOn_toFun := continuous_id.continuousOn
  continuousOn_invFun := continuous_id.continuousOn
Identity Partial Homeomorphism on an Open Set
Informal description
Given an open subset $s$ of a topological space $X$, the partial homeomorphism `ofSet s hs` is defined as the identity map on $s$, where both the source and target are $s$. This means: - The source and target sets are both $s$ - The forward and inverse functions are both the identity function restricted to $s$ - The functions are continuous on $s$ (since the identity function is continuous) - The openness of $s$ is ensured by the hypothesis `hs : IsOpen s` This construction extends the partial equivalence `PartialEquiv.ofSet s` to a partial homeomorphism by adding the topological requirements of openness and continuity.
PartialHomeomorph.ofSet_toPartialEquiv theorem
: (ofSet s hs).toPartialEquiv = PartialEquiv.ofSet s
Full source
@[simp, mfld_simps]
theorem ofSet_toPartialEquiv : (ofSet s hs).toPartialEquiv = PartialEquiv.ofSet s :=
  rfl
Underlying Partial Equivalence of Identity Partial Homeomorphism on Open Set
Informal description
For any open subset $s$ of a topological space $X$, the underlying partial equivalence of the partial homeomorphism `ofSet s hs` is equal to the partial equivalence `PartialEquiv.ofSet s`.
PartialHomeomorph.ofSet_symm theorem
: (ofSet s hs).symm = ofSet s hs
Full source
@[simp, mfld_simps]
theorem ofSet_symm : (ofSet s hs).symm = ofSet s hs :=
  rfl
Inverse of Identity Partial Homeomorphism on Open Set Equals Itself
Informal description
For any open subset $s$ of a topological space $X$, the inverse of the partial homeomorphism `ofSet s hs` (which is the identity map on $s$) is equal to itself, i.e., $(ofSet\, s\, hs).symm = ofSet\, s\, hs$.
PartialHomeomorph.ofSet_univ_eq_refl theorem
: ofSet univ isOpen_univ = PartialHomeomorph.refl X
Full source
@[simp, mfld_simps]
theorem ofSet_univ_eq_refl : ofSet univ isOpen_univ = PartialHomeomorph.refl X := by ext <;> simp
Identity Partial Homeomorphism on Universal Set Equals Global Identity
Informal description
The partial homeomorphism defined as the identity on the universal set `univ` of a topological space $X$ is equal to the identity partial homeomorphism on $X$.
PartialHomeomorph.trans' definition
(h : e.target = e'.source) : PartialHomeomorph X Z
Full source
/-- Composition of two partial homeomorphisms when the target of the first and the source of
the second coincide. -/
@[simps! apply symm_apply toPartialEquiv, simps! -isSimp source target]
protected def trans' (h : e.target = e'.source) : PartialHomeomorph X Z where
  toPartialEquiv := PartialEquiv.trans' e.toPartialEquiv e'.toPartialEquiv h
  open_source := e.open_source
  open_target := e'.open_target
  continuousOn_toFun := e'.continuousOn.comp e.continuousOn <| h ▸ e.mapsTo
  continuousOn_invFun := e.continuousOn_symm.comp e'.continuousOn_symm <| h.symm ▸ e'.symm_mapsTo
Composition of partial homeomorphisms with matching target and source
Informal description
Given two partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$ such that the target of $e$ equals the source of $e'$, the composition $e' \circ e$ is a partial homeomorphism from $X$ to $Z$ defined as follows: - The source is the source of $e$. - The target is the target of $e'$. - The forward function is the composition $e' \circ e$ restricted to the source of $e$. - The inverse function is the composition $e^{-1} \circ e'^{-1}$ restricted to the target of $e'$. - Both the forward and inverse functions are continuous on their respective domains.
PartialHomeomorph.trans definition
: PartialHomeomorph X Z
Full source
/-- Composing two partial homeomorphisms, by restricting to the maximal domain where their
composition is well defined.
Within the `Manifold` namespace, there is the notation `e ≫ₕ f` for this. -/
@[trans]
protected def trans : PartialHomeomorph X Z :=
  PartialHomeomorph.trans' (e.symm.restrOpen e'.source e'.open_source).symm
    (e'.restrOpen e.target e.open_target) (by simp [inter_comm])
Composition of partial homeomorphisms
Informal description
The composition of two partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$ is a partial homeomorphism $e' \circ e \colon X \to Z$ defined on the maximal domain where the composition is well-defined. Specifically: - The source is $e^{-1}(e'.source \cap e.target) \cap e.source$ - The target is $e'(e.source \cap e^{-1}(e'.source)) \cap e'.target$ - The forward map is the composition $e' \circ e$ restricted to the source - The inverse map is the composition $e^{-1} \circ e'^{-1}$ restricted to the target Both maps are continuous on their respective domains.
PartialHomeomorph.trans_toPartialEquiv theorem
: (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv
Full source
@[simp, mfld_simps]
theorem trans_toPartialEquiv :
    (e.trans e').toPartialEquiv = e.toPartialEquiv.trans e'.toPartialEquiv :=
  rfl
Composition of Partial Homeomorphisms Preserves Underlying Partial Equivalence
Informal description
For any two partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the underlying partial equivalence of their composition $e \circ e'$ is equal to the composition of their underlying partial equivalences. That is, $(e \circ e').\text{toPartialEquiv} = e.\text{toPartialEquiv} \circ e'.\text{toPartialEquiv}$.
PartialHomeomorph.coe_trans theorem
: (e.trans e' : X → Z) = e' ∘ e
Full source
@[simp, mfld_simps]
theorem coe_trans : (e.trans e' : X → Z) = e' ∘ e :=
  rfl
Composition of Partial Homeomorphisms as Function Composition
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the composition $e \circ e'$ as a function from $X$ to $Z$ is equal to the pointwise composition $e' \circ e$ of the underlying functions.
PartialHomeomorph.coe_trans_symm theorem
: ((e.trans e').symm : Z → X) = e.symm ∘ e'.symm
Full source
@[simp, mfld_simps]
theorem coe_trans_symm : ((e.trans e').symm : Z → X) = e.symm ∘ e'.symm :=
  rfl
Inverse of Composition of Partial Homeomorphisms Equals Composition of Inverses
Informal description
For any two partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the inverse of their composition $(e \circ e')^{-1} \colon Z \to X$ is equal to the composition of their inverses $e^{-1} \circ e'^{-1}$ when viewed as functions.
PartialHomeomorph.trans_apply theorem
{x : X} : (e.trans e') x = e' (e x)
Full source
theorem trans_apply {x : X} : (e.trans e') x = e' (e x) :=
  rfl
Composition of Partial Homeomorphisms Preserves Application
Informal description
For any partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, and any point $x \in X$, the composition $(e \circ e')(x)$ equals $e'(e(x))$.
PartialHomeomorph.trans_symm_eq_symm_trans_symm theorem
: (e.trans e').symm = e'.symm.trans e.symm
Full source
theorem trans_symm_eq_symm_trans_symm : (e.trans e').symm = e'.symm.trans e.symm := rfl
Inverse of Composition of Partial Homeomorphisms
Informal description
For any two partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the inverse of their composition equals the composition of their inverses in reverse order, i.e., $$(e \circ e')^{-1} = e'^{-1} \circ e^{-1}.$$
PartialHomeomorph.trans_source theorem
: (e.trans e').source = e.source ∩ e ⁻¹' e'.source
Full source
theorem trans_source : (e.trans e').source = e.source ∩ e ⁻¹' e'.source :=
  PartialEquiv.trans_source e.toPartialEquiv e'.toPartialEquiv
Source of Composition of Partial Homeomorphisms
Informal description
For two partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the source of their composition $e' \circ e \colon X \to Z$ is given by the intersection of the source of $e$ with the preimage under $e$ of the source of $e'$, i.e., $$\text{source}(e' \circ e) = \text{source}(e) \cap e^{-1}(\text{source}(e')).$$
PartialHomeomorph.trans_source' theorem
: (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source)
Full source
theorem trans_source' : (e.trans e').source = e.source ∩ e ⁻¹' (e.target ∩ e'.source) :=
  PartialEquiv.trans_source' e.toPartialEquiv e'.toPartialEquiv
Source of Composition of Partial Homeomorphisms
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the source of their composition $e \circ e'$ is given by the intersection of the source of $e$ with the preimage under $e$ of the intersection between the target of $e$ and the source of $e'$. In symbols: $$\text{source}(e \circ e') = \text{source}(e) \cap e^{-1}(\text{target}(e) \cap \text{source}(e'))$$
PartialHomeomorph.image_trans_source theorem
: e '' (e.trans e').source = e.target ∩ e'.source
Full source
theorem image_trans_source : e '' (e.trans e').source = e.target ∩ e'.source :=
  PartialEquiv.image_trans_source e.toPartialEquiv e'.toPartialEquiv
Image of Composition's Source Equals Target-Source Intersection for Partial Homeomorphisms
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the image of the source of the composition $e' \circ e$ under $e$ equals the intersection of $e$'s target with $e'$'s source, i.e., $$ e\big((e' \circ e).\text{source}\big) = e.\text{target} \cap e'.\text{source}. $$
PartialHomeomorph.trans_target theorem
: (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target
Full source
theorem trans_target : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' e.target :=
  rfl
Target Set of Composition of Partial Homeomorphisms
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the target of their composition $e' \circ e$ is equal to the intersection of $e'$'s target with the preimage of $e$'s target under $e'$'s inverse map, i.e., $$(e' \circ e).\text{target} = e'.\text{target} \cap (e'.symm)^{-1}(e.\text{target}).$$
PartialHomeomorph.trans_target' theorem
: (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target)
Full source
theorem trans_target' : (e.trans e').target = e'.target ∩ e'.symm ⁻¹' (e'.source ∩ e.target) :=
  trans_source' e'.symm e.symm
Target of Composition of Partial Homeomorphisms via Inverse Preimage
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the target of their composition $e' \circ e$ is equal to the intersection of $e'$'s target with the preimage under $e'$'s inverse map of the intersection between $e'$'s source and $e$'s target. In symbols: $$(e' \circ e).\text{target} = e'.\text{target} \cap (e'.\text{symm})^{-1}(e'.\text{source} \cap e.\text{target}).$$
PartialHomeomorph.trans_target'' theorem
: (e.trans e').target = e' '' (e'.source ∩ e.target)
Full source
theorem trans_target'' : (e.trans e').target = e' '' (e'.source ∩ e.target) :=
  trans_source'' e'.symm e.symm
Target of Composition as Image of Source-Target Intersection for Partial Homeomorphisms
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the target of their composition $e' \circ e$ is equal to the image of the intersection of $e'$'s source and $e$'s target under $e'$, i.e., $$(e' \circ e).\text{target} = e'\big(e'.\text{source} \cap e.\text{target}\big).$$
PartialHomeomorph.inv_image_trans_target theorem
: e'.symm '' (e.trans e').target = e'.source ∩ e.target
Full source
theorem inv_image_trans_target : e'.symm '' (e.trans e').target = e'.source ∩ e.target :=
  image_trans_source e'.symm e.symm
Inverse Image of Composition's Target Equals Source-Target Intersection for Partial Homeomorphisms
Informal description
For partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, the image of the target of the composition $e' \circ e$ under the inverse of $e'$ equals the intersection of $e'$'s source with $e$'s target, i.e., $$ e'^{-1}\big((e' \circ e).\text{target}\big) = e'.\text{source} \cap e.\text{target}. $$
PartialHomeomorph.trans_assoc theorem
(e'' : PartialHomeomorph Z Z') : (e.trans e').trans e'' = e.trans (e'.trans e'')
Full source
theorem trans_assoc (e'' : PartialHomeomorph Z Z') :
    (e.trans e').trans e'' = e.trans (e'.trans e'') :=
  toPartialEquiv_injective <| e.1.trans_assoc _ _
Associativity of Partial Homeomorphism Composition
Informal description
For partial homeomorphisms $e \colon X \to Y$, $e' \colon Y \to Z$, and $e'' \colon Z \to Z'$, the composition operation is associative: $$(e \circ e') \circ e'' = e \circ (e' \circ e'')$$ where $\circ$ denotes the composition of partial homeomorphisms.
PartialHomeomorph.trans_refl theorem
: e.trans (PartialHomeomorph.refl Y) = e
Full source
@[simp, mfld_simps]
theorem trans_refl : e.trans (PartialHomeomorph.refl Y) = e :=
  toPartialEquiv_injective e.1.trans_refl
Right Identity Law for Partial Homeomorphism Composition
Informal description
For any partial homeomorphism $e$ from $X$ to $Y$, the composition of $e$ with the identity partial homeomorphism on $Y$ is equal to $e$ itself. That is, $e \circ \text{id}_Y = e$, where $\text{id}_Y$ denotes the identity partial homeomorphism on $Y$.
PartialHomeomorph.refl_trans theorem
: (PartialHomeomorph.refl X).trans e = e
Full source
@[simp, mfld_simps]
theorem refl_trans : (PartialHomeomorph.refl X).trans e = e :=
  toPartialEquiv_injective e.1.refl_trans
Left Identity Law for Partial Homeomorphism Composition: $\text{id}_X \circ e = e$
Informal description
For any partial homeomorphism $e$ from a topological space $X$ to a topological space $Y$, the composition of the identity partial homeomorphism on $X$ with $e$ is equal to $e$ itself.
PartialHomeomorph.trans_ofSet theorem
{s : Set Y} (hs : IsOpen s) : e.trans (ofSet s hs) = e.restr (e ⁻¹' s)
Full source
theorem trans_ofSet {s : Set Y} (hs : IsOpen s) : e.trans (ofSet s hs) = e.restr (e ⁻¹' s) :=
  PartialHomeomorph.ext _ _ (fun _ => rfl) (fun _ => rfl) <| by
    rw [trans_source, restr_source, ofSet_source, ← preimage_interior, hs.interior_eq]
Composition with Identity Partial Homeomorphism Equals Restriction to Preimage
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $s \subseteq Y$ be an open subset. Then the composition of $e$ with the identity partial homeomorphism on $s$ is equal to the restriction of $e$ to the preimage $e^{-1}(s)$. That is, $$ e \circ \text{id}_s = e|_{e^{-1}(s)}. $$
PartialHomeomorph.trans_of_set' theorem
{s : Set Y} (hs : IsOpen s) : e.trans (ofSet s hs) = e.restr (e.source ∩ e ⁻¹' s)
Full source
theorem trans_of_set' {s : Set Y} (hs : IsOpen s) :
    e.trans (ofSet s hs) = e.restr (e.source ∩ e ⁻¹' s) := by rw [trans_ofSet, restr_source_inter]
Composition with Identity Partial Homeomorphism Equals Restriction to Source Intersection with Preimage
Informal description
Let $e \colon X \to Y$ be a partial homeomorphism between topological spaces, and let $s \subseteq Y$ be an open subset. Then the composition of $e$ with the identity partial homeomorphism on $s$ equals the restriction of $e$ to the intersection of its source with the preimage of $s$ under $e$. That is, $$ e \circ \text{id}_s = e|_{e.\text{source} \cap e^{-1}(s)}. $$
PartialHomeomorph.ofSet_trans theorem
{s : Set X} (hs : IsOpen s) : (ofSet s hs).trans e = e.restr s
Full source
theorem ofSet_trans {s : Set X} (hs : IsOpen s) : (ofSet s hs).trans e = e.restr s :=
  PartialHomeomorph.ext _ _ (fun _ => rfl) (fun _ => rfl) <| by simp [hs.interior_eq, inter_comm]
Composition of Identity Partial Homeomorphism with Restriction: $(id|_s) \circ e = e|_s$
Informal description
Let $X$ and $Y$ be topological spaces, and let $s$ be an open subset of $X$. For any partial homeomorphism $e$ between $X$ and $Y$, the composition of the identity partial homeomorphism on $s$ with $e$ is equal to the restriction of $e$ to $s$. That is, $(id|_s) \circ e = e|_s$.
PartialHomeomorph.ofSet_trans' theorem
{s : Set X} (hs : IsOpen s) : (ofSet s hs).trans e = e.restr (e.source ∩ s)
Full source
theorem ofSet_trans' {s : Set X} (hs : IsOpen s) :
    (ofSet s hs).trans e = e.restr (e.source ∩ s) := by
  rw [ofSet_trans, restr_source_inter]
Composition of Identity Partial Homeomorphism Equals Restriction to Source Intersection
Informal description
Let $X$ and $Y$ be topological spaces, and let $s$ be an open subset of $X$. For any partial homeomorphism $e$ between $X$ and $Y$, the composition of the identity partial homeomorphism on $s$ with $e$ is equal to the restriction of $e$ to the intersection of its source with $s$. That is, $(id|_s) \circ e = e|_{e.\text{source} \cap s}$.
PartialHomeomorph.ofSet_trans_ofSet theorem
{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')
Full source
@[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') := by
  rw [(ofSet s hs).trans_ofSet hs']
  ext <;> simp [hs'.interior_eq]
Composition of Identity Partial Homeomorphisms on Open Sets Yields Identity on Intersection
Informal description
Let $X$ be a topological space and let $s, s' \subseteq X$ be open subsets. The composition of the identity partial homeomorphism on $s$ with the identity partial homeomorphism on $s'$ is equal to the identity partial homeomorphism on their intersection $s \cap s'$.
PartialHomeomorph.restr_trans theorem
(s : Set X) : (e.restr s).trans e' = (e.trans e').restr s
Full source
theorem restr_trans (s : Set X) : (e.restr s).trans e' = (e.trans e').restr s :=
  toPartialEquiv_injective <|
    PartialEquiv.restr_trans e.toPartialEquiv e'.toPartialEquiv (interior s)
Composition-Restriction Commutativity for Partial Homeomorphisms
Informal description
Let $e \colon X \to Y$ and $e' \colon Y \to Z$ be partial homeomorphisms between topological spaces, and let $s \subseteq X$ be a subset. Then the composition of the restriction of $e$ to $s$ with $e'$ is equal to the restriction to $s$ of the composition of $e$ with $e'$. More precisely, we have: $$ (e \restriction s) \circ e' = (e \circ e') \restriction s $$ where $\restriction$ denotes the restriction to the intersection with the interior of $s$.
PartialHomeomorph.EqOnSource definition
(e e' : PartialHomeomorph X Y) : Prop
Full source
/-- `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 :=
  e.source = e'.source ∧ EqOn e e' e.source
Equality of Partial Homeomorphisms on Source
Informal description
Two partial homeomorphisms \( e \) and \( e' \) between topological spaces \( X \) and \( Y \) are said to be equal on their source (denoted \( \text{EqOnSource} \)) if they have the same source set \( e.\text{source} = e'.\text{source} \) and their forward maps coincide on this set, i.e., \( e(x) = e'(x) \) for all \( x \in e.\text{source} \).
PartialHomeomorph.eqOnSource_iff theorem
(e e' : PartialHomeomorph X Y) : EqOnSource e e' ↔ PartialEquiv.EqOnSource e.toPartialEquiv e'.toPartialEquiv
Full source
theorem eqOnSource_iff (e e' : PartialHomeomorph X Y) :
    EqOnSourceEqOnSource e e' ↔ PartialEquiv.EqOnSource e.toPartialEquiv e'.toPartialEquiv :=
  Iff.rfl
Equivalence of Partial Homeomorphism Equality on Source and Underlying Partial Equivalence Equality
Informal description
For two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$, the following are equivalent: 1. $e$ and $e'$ are equal on their source, meaning they have the same source set and coincide on this set. 2. The underlying partial equivalences of $e$ and $e'$ are equal on their source. More precisely, $e \approx e'$ holds if and only if $e.\text{toPartialEquiv} \approx e'.\text{toPartialEquiv}$.
PartialHomeomorph.eqOnSourceSetoid instance
: Setoid (PartialHomeomorph X Y)
Full source
/-- `EqOnSource` is an equivalence relation. -/
instance eqOnSourceSetoid : Setoid (PartialHomeomorph X Y) :=
  { PartialEquiv.eqOnSourceSetoid.comap toPartialEquiv with r := EqOnSource }
Equivalence Relation for Partial Homeomorphisms on Source
Informal description
The relation `EqOnSource` defines an equivalence relation on the set of partial homeomorphisms between topological spaces $X$ and $Y$. Two partial homeomorphisms $e$ and $e'$ are equivalent if they have the same source set and their forward maps coincide on this set.
PartialHomeomorph.eqOnSource_refl theorem
: e ≈ e
Full source
theorem eqOnSource_refl : e ≈ e := Setoid.refl _
Reflexivity of Partial Homeomorphism Equality on Source
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$, the relation $\approx$ (equality on source) is reflexive, i.e., $e \approx e$.
PartialHomeomorph.EqOnSource.symm' theorem
{e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.symm ≈ e'.symm
Full source
/-- 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 :=
  PartialEquiv.EqOnSource.symm' h
Inverse Preservation under Partial Homeomorphism Equivalence
Informal description
For any two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$, if $e$ and $e'$ are equivalent under the relation $\approx$ (i.e., they have the same source set and their forward maps coincide on this set), then their inverses $e^{-1}$ and $e'^{-1}$ are also equivalent under $\approx$.
PartialHomeomorph.EqOnSource.source_eq theorem
{e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.source = e'.source
Full source
/-- Two equivalent partial homeomorphisms have the same source. -/
theorem EqOnSource.source_eq {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.source = e'.source :=
  h.1
Equality of Source Sets for Equivalent Partial Homeomorphisms
Informal description
For any two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$, if $e$ and $e'$ are equivalent under the relation `EqOnSource` (i.e., they agree on their common source set), then their source sets are equal: $e.\text{source} = e'.\text{source}$.
PartialHomeomorph.EqOnSource.target_eq theorem
{e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.target = e'.target
Full source
/-- Two equivalent partial homeomorphisms have the same target. -/
theorem EqOnSource.target_eq {e e' : PartialHomeomorph X Y} (h : e ≈ e') : e.target = e'.target :=
  h.symm'.1
Equality of Target Sets for Equivalent Partial Homeomorphisms
Informal description
For any two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$, if $e$ and $e'$ are equivalent under the relation $\approx$ (i.e., they have the same source set and their forward maps coincide on this set), then their target sets are equal: $e.\text{target} = e'.\text{target}$.
PartialHomeomorph.EqOnSource.eqOn theorem
{e e' : PartialHomeomorph X Y} (h : e ≈ e') : EqOn e e' e.source
Full source
/-- 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 :=
  h.2
Equality of Forward Maps on Source for Equivalent Partial Homeomorphisms
Informal description
For any two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$, if $e$ and $e'$ are equivalent under the relation `EqOnSource` (i.e., they agree on their common source set), then their forward maps coincide on the source set: $e(x) = e'(x)$ for all $x \in e.\text{source} = e'.\text{source}$.
PartialHomeomorph.EqOnSource.symm_eqOn_target theorem
{e e' : PartialHomeomorph X Y} (h : e ≈ e') : EqOn e.symm e'.symm e.target
Full source
/-- 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 :=
  h.symm'.2
Inverse Maps Coincide on Target for Equivalent Partial Homeomorphisms
Informal description
For any two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$ that are equivalent under the relation $\approx$ (i.e., they have the same source set and their forward maps coincide on this set), their inverse maps $e^{-1}$ and $e'^{-1}$ coincide on the target set $e.\text{target} = e'.\text{target}$.
PartialHomeomorph.EqOnSource.trans' theorem
{e e' : PartialHomeomorph X Y} {f f' : PartialHomeomorph Y Z} (he : e ≈ e') (hf : f ≈ f') : e.trans f ≈ e'.trans f'
Full source
/-- 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' :=
  PartialEquiv.EqOnSource.trans' he hf
Composition Preserves `EqOnSource` Equivalence for Partial Homeomorphisms
Informal description
Let $e, e' \colon X \to Y$ and $f, f' \colon Y \to Z$ be partial homeomorphisms such that $e \approx e'$ and $f \approx f'$ under the equivalence relation `EqOnSource`. Then the compositions $f \circ e$ and $f' \circ e'$ are also equivalent under `EqOnSource`. Here, $e \approx e'$ means that $e$ and $e'$ have the same source set and their forward maps coincide on this set, and similarly for $f \approx f'$.
PartialHomeomorph.EqOnSource.restr theorem
{e e' : PartialHomeomorph X Y} (he : e ≈ e') (s : Set X) : e.restr s ≈ e'.restr s
Full source
/-- 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 :=
  PartialEquiv.EqOnSource.restr he _
Restriction Preserves Equivalence of Partial Homeomorphisms
Informal description
For any two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$ that are equivalent under the relation $\approx$ (i.e., they have the same source set and their forward maps coincide on this set), and for any subset $s \subseteq X$, the restrictions $e \restriction_s$ and $e' \restriction_s$ are also equivalent under $\approx$.
PartialHomeomorph.Set.EqOn.restr_eqOn_source theorem
{e e' : PartialHomeomorph X Y} (h : EqOn e e' (e.source ∩ e'.source)) : e.restr e'.source ≈ e'.restr e.source
Full source
/-- 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 := by
  constructor
  · rw [e'.restr_source' _ e.open_source]
    rw [e.restr_source' _ e'.open_source]
    exact Set.inter_comm _ _
  · rw [e.restr_source' _ e'.open_source]
    refine (EqOn.trans ?_ h).trans ?_ <;> simp only [mfld_simps, eqOn_refl]
Equivalence of Restricted Partial Homeomorphisms on Common Source
Informal description
For two partial homeomorphisms $e$ and $e'$ between topological spaces $X$ and $Y$, if their forward maps coincide on the intersection of their source sets (i.e., $e(x) = e'(x)$ for all $x \in e.\text{source} \cap e'.\text{source}$), then the restriction of $e$ to $e'.\text{source}$ is equivalent to the restriction of $e'$ to $e.\text{source}$ under the equivalence relation $\approx$ for partial homeomorphisms.
PartialHomeomorph.self_trans_symm theorem
: e.trans e.symm ≈ PartialHomeomorph.ofSet e.source e.open_source
Full source
/-- 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 :=
  PartialEquiv.self_trans_symm _
Composition of Partial Homeomorphism with its Inverse Yields Identity on Source
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$. Then the composition $e \circ e^{-1}$ is equivalent to the identity partial homeomorphism restricted to the open source set $e.\text{source}$ of $e$.
PartialHomeomorph.symm_trans_self theorem
: e.symm.trans e ≈ PartialHomeomorph.ofSet e.target e.open_target
Full source
theorem symm_trans_self : e.symm.trans e ≈ PartialHomeomorph.ofSet e.target e.open_target :=
  e.symm.self_trans_symm
Composition of Inverse and Partial Homeomorphism Yields Identity on Target
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$. Then the composition $e^{-1} \circ e$ is equivalent to the identity partial homeomorphism restricted to the open target set $e.\text{target}$ of $e$.
PartialHomeomorph.prod definition
(eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') : PartialHomeomorph (X × Y) (X' × Y')
Full source
/-- The product of two partial homeomorphisms, as a partial homeomorphism on the product space. -/
@[simps! (config := mfld_cfg) toPartialEquiv apply,
  simps! -isSimp source target symm_apply]
def prod (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    PartialHomeomorph (X × Y) (X' × Y') where
  open_source := eX.open_source.prod eY.open_source
  open_target := eX.open_target.prod eY.open_target
  continuousOn_toFun := eX.continuousOn.prodMap eY.continuousOn
  continuousOn_invFun := eX.continuousOn_symm.prodMap eY.continuousOn_symm
  toPartialEquiv := eX.toPartialEquiv.prod eY.toPartialEquiv
Product of partial homeomorphisms
Informal description
Given partial homeomorphisms \( e_X \colon X \rightleftarrows X' \) and \( e_Y \colon Y \rightleftarrows Y' \), their product \( e_X \times e_Y \) is a partial homeomorphism between \( X \times Y \) and \( X' \times Y' \) defined by: - The source is the product \( e_X.\text{source} \times e_Y.\text{source} \), - The target is the product \( e_X.\text{target} \times e_Y.\text{target} \), - The forward map sends \( (x, y) \) to \( (e_X(x), e_Y(y)) \), - The inverse map sends \( (u, v) \) to \( (e_X^{-1}(u), e_Y^{-1}(v)) \). This construction ensures that \( e_X \times e_Y \) is indeed a partial homeomorphism, with the expected inverse relationship and continuity properties.
PartialHomeomorph.prod_symm theorem
(eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') : (eX.prod eY).symm = eX.symm.prod eY.symm
Full source
@[simp, mfld_simps]
theorem prod_symm (eX : PartialHomeomorph X X') (eY : PartialHomeomorph Y Y') :
    (eX.prod eY).symm = eX.symm.prod eY.symm :=
  rfl
Inverse of Product of Partial Homeomorphisms Equals Product of Inverses
Informal description
For any partial homeomorphisms $e_X \colon X \rightleftarrows X'$ and $e_Y \colon Y \rightleftarrows Y'$, the inverse of their product $(e_X \times e_Y)^{-1}$ is equal to the product of their inverses $e_X^{-1} \times e_Y^{-1}$.
PartialHomeomorph.refl_prod_refl theorem
: (PartialHomeomorph.refl X).prod (PartialHomeomorph.refl Y) = PartialHomeomorph.refl (X × Y)
Full source
@[simp]
theorem refl_prod_refl :
    (PartialHomeomorph.refl X).prod (PartialHomeomorph.refl Y) = PartialHomeomorph.refl (X × Y) :=
  PartialHomeomorph.ext _ _ (fun _ => rfl) (fun _ => rfl) univ_prod_univ
Product of Identity Partial Homeomorphisms Equals Identity on Product Space
Informal description
The product of the identity partial homeomorphism on a topological space $X$ with the identity partial homeomorphism on a topological space $Y$ equals the identity partial homeomorphism on the product space $X \times Y$. In other words, if we take: - $\text{id}_X$ as the identity partial homeomorphism on $X$ (with source and target both being all of $X$) - $\text{id}_Y$ as the identity partial homeomorphism on $Y$ (with source and target both being all of $Y$) - $\text{id}_{X \times Y}$ as the identity partial homeomorphism on $X \times Y$ Then we have: $$\text{id}_X \times \text{id}_Y = \text{id}_{X \times Y}$$
PartialHomeomorph.prod_trans theorem
(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')
Full source
@[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') :=
  toPartialEquiv_injective <| e.1.prod_trans ..
Composition of Product Partial Homeomorphisms Equals Product of Compositions
Informal description
Let $e \colon X \rightleftarrows Y$ and $f \colon Y \rightleftarrows Z$ be partial homeomorphisms, and let $e' \colon X' \rightleftarrows Y'$ and $f' \colon Y' \rightleftarrows Z'$ be partial homeomorphisms. Then the composition of the product partial homeomorphisms $(e \times e') \circ (f \times f')$ is equal to the product of the compositions $(e \circ f) \times (e' \circ f')$. More precisely, the following equality holds: $$(e \times e') \circ (f \times f') = (e \circ f) \times (e' \circ f')$$
PartialHomeomorph.prod_eq_prod_of_nonempty theorem
{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'
Full source
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' := by
  obtain ⟨⟨x, y⟩, -⟩ := id h
  haveI : Nonempty X := ⟨x⟩
  haveI : Nonempty X' := ⟨eX x⟩
  haveI : Nonempty Y := ⟨y⟩
  haveI : Nonempty Y' := ⟨eY y⟩
  simp_rw [PartialHomeomorph.ext_iff, prod_apply, prod_symm_apply, prod_source, Prod.ext_iff,
    Set.prod_eq_prod_iff_of_nonempty h, forall_and, Prod.forall, forall_const,
    and_assoc, and_left_comm]
Equality of Nonempty Product Partial Homeomorphisms
Informal description
Let $e_X, e_X'$ be partial homeomorphisms from $X$ to $X'$, and $e_Y, e_Y'$ be partial homeomorphisms from $Y$ to $Y'$. If the source of the product partial homeomorphism $e_X \times e_Y$ is nonempty, then $e_X \times e_Y = e_X' \times e_Y'$ if and only if $e_X = e_X'$ and $e_Y = e_Y'$.
PartialHomeomorph.prod_eq_prod_of_nonempty' theorem
{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'
Full source
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' := by
  rw [eq_comm, prod_eq_prod_of_nonempty h, eq_comm, @eq_comm _ eY']
Equality of Nonempty Product Partial Homeomorphisms (Symmetric Version)
Informal description
Let $e_X, e_X'$ be partial homeomorphisms from $X$ to $X'$, and $e_Y, e_Y'$ be partial homeomorphisms from $Y$ to $Y'$. If the source of the product partial homeomorphism $e_X' \times e_Y'$ is nonempty, then $e_X \times e_Y = e_X' \times e_Y'$ if and only if $e_X = e_X'$ and $e_Y = e_Y'$.
PartialHomeomorph.pi definition
: PartialHomeomorph (∀ i, X i) (∀ i, Y i)
Full source
/-- The product of a finite family of `PartialHomeomorph`s. -/
@[simps! toPartialEquiv apply symm_apply source target]
def pi : PartialHomeomorph (∀ i, X i) (∀ i, Y i) where
  toPartialEquiv := PartialEquiv.pi fun i => (ei i).toPartialEquiv
  open_source := isOpen_set_pi finite_univ fun i _ => (ei i).open_source
  open_target := isOpen_set_pi finite_univ fun i _ => (ei i).open_target
  continuousOn_toFun := continuousOn_pi.2 fun i =>
    (ei i).continuousOn.comp (continuous_apply _).continuousOn fun _f hf => hf i trivial
  continuousOn_invFun := continuousOn_pi.2 fun i =>
    (ei i).continuousOn_symm.comp (continuous_apply _).continuousOn fun _f hf => hf i trivial
Product of Partial Homeomorphisms
Informal description
Given a finite family of partial homeomorphisms \( e_i \colon X_i \to Y_i \) between topological spaces, the product partial homeomorphism \( \prod_i e_i \) is defined between the product spaces \( \prod_i X_i \) and \( \prod_i Y_i \). Specifically: - The source of \( \prod_i e_i \) is the set of all functions \( f \in \prod_i X_i \) such that for each \( i \), \( f(i) \) belongs to the source of \( e_i \). - The target of \( \prod_i e_i \) is the set of all functions \( g \in \prod_i Y_i \) such that for each \( i \), \( g(i) \) belongs to the target of \( e_i \). - The forward function maps \( f \) to \( \lambda i, e_i(f(i)) \). - The inverse function maps \( g \) to \( \lambda i, e_i^{-1}(g(i)) \). The source and target are open in the product topology, and the functions are continuous on their respective domains.
PartialHomeomorph.piecewise definition
(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
Full source
/-- 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! -fullyApplied 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 where
  toPartialEquiv := e.toPartialEquiv.piecewise e'.toPartialEquiv s t H H'
  open_source := e.open_source.ite e'.open_source Hs
  open_target :=
    e.open_target.ite e'.open_target <| H.frontier.inter_eq_of_inter_eq_of_eqOn H'.frontier Hs Heq
  continuousOn_toFun := continuousOn_piecewise_ite e.continuousOn e'.continuousOn Hs Heq
  continuousOn_invFun :=
    continuousOn_piecewise_ite e.continuousOn_symm e'.continuousOn_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)
Piecewise-defined partial homeomorphism
Informal description
Given two partial homeomorphisms \( e \) and \( e' \) between topological spaces \( X \) and \( Y \), subsets \( s \subseteq X \) and \( t \subseteq Y \) such that \( t \) is the image of \( s \) under both \( e \) and \( e' \) (i.e., \( e \) and \( e' \) satisfy the image conditions \( H \) and \( H' \) respectively), and the sources of \( e \) and \( e' \) coincide on the frontier of \( s \) (i.e., \( e.source \cap \text{frontier} s = e'.source \cap \text{frontier} s \)), and \( e \) and \( e' \) agree on \( e.source \cap \text{frontier} s \), the partial homeomorphism \( e.piecewise\ e'\ s\ t \) is defined as follows: - The source is \( e.source \cap s \cup e'.source \setminus s \). - The target is \( e.target \cap t \cup e'.target \setminus t \). - The forward function is \( e \) on \( e.source \cap s \) and \( e' \) on \( e'.source \setminus s \). - The inverse function is \( e^{-1} \) on \( e.target \cap t \) and \( e'^{-1} \) on \( e'.target \setminus t \). The continuity of the forward and inverse functions is ensured by the agreement of \( e \) and \( e' \) on the frontier of \( s \).
PartialHomeomorph.symm_piecewise theorem
(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)
Full source
@[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) :=
  rfl
Inverse of Piecewise-Defined Partial Homeomorphism Equals Piecewise of Inverses
Informal description
Let $e$ and $e'$ be partial homeomorphisms between topological spaces $X$ and $Y$, with subsets $s \subseteq X$ and $t \subseteq Y$ such that: 1. $t$ is the image of $s$ under both $e$ and $e'$ (i.e., $e.\text{IsImage}\, s\, t$ and $e'.\text{IsImage}\, s\, t$ hold), 2. The sources of $e$ and $e'$ coincide on the frontier of $s$ (i.e., $e.\text{source} \cap \text{frontier}\, s = e'.\text{source} \cap \text{frontier}\, s$), 3. $e$ and $e'$ agree on $e.\text{source} \cap \text{frontier}\, s$. Then the inverse of the piecewise-defined partial homeomorphism $e \sqcup_{s,t} e'$ is equal to the piecewise-defined partial homeomorphism formed by the inverses $e^{-1} \sqcup_{t,s} e'^{-1}$.
PartialHomeomorph.disjointUnion definition
(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
Full source
/-- 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 :=
  (e.piecewise e' e.source e.target e.isImage_source_target
        (e'.isImage_source_target_of_disjoint e Hs.symm Ht.symm)
        (by rw [e.open_source.inter_frontier_eq, (Hs.symm.frontier_right e'.open_source).inter_eq])
        (by
          rw [e.open_source.inter_frontier_eq]
          exact eqOn_empty _ _)).replaceEquiv
    (e.toPartialEquiv.disjointUnion e'.toPartialEquiv Hs Ht)
    (PartialEquiv.disjointUnion_eq_piecewise _ _ _ _).symm
Disjoint union of partial homeomorphisms
Informal description
Given two partial homeomorphisms \( e \) and \( e' \) between topological spaces \( X \) and \( Y \) with disjoint sources \( e.\text{source} \cap e'.\text{source} = \emptyset \) and disjoint targets \( e.\text{target} \cap e'.\text{target} = \emptyset \), the disjoint union \( e \sqcup e' \) is a partial homeomorphism defined by: - The source is the union \( e.\text{source} \cup e'.\text{source} \), - The target is the union \( e.\text{target} \cup e'.\text{target} \), - The forward function is \( e \) on \( e.\text{source} \) and \( e' \) on \( e'.\text{source} \), - The inverse function is \( e^{-1} \) on \( e.\text{target} \) and \( e'^{-1} \) on \( e'.\text{target} \). This construction ensures that the resulting partial homeomorphism is well-defined and maintains the continuity and inverse relationship between the functions on their respective domains.
PartialHomeomorph.continuousWithinAt_iff_continuousWithinAt_comp_right theorem
{f : Y → Z} {s : Set Y} {x : Y} (h : x ∈ e.target) : ContinuousWithinAt f s x ↔ ContinuousWithinAt (f ∘ e) (e ⁻¹' s) (e.symm x)
Full source
/-- 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) :
    ContinuousWithinAtContinuousWithinAt f s x ↔ ContinuousWithinAt (f ∘ e) (e ⁻¹' s) (e.symm x) := by
  simp_rw [ContinuousWithinAt, ← @tendsto_map'_iff _ _ _ _ e,
    e.map_nhdsWithin_preimage_eq (e.map_target h), (· ∘ ·), e.right_inv h]
Continuity Within a Set Under Composition with Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Y \to Z$ be a function. For any point $x \in e.\mathrm{target}$ and any subset $s \subseteq Y$, the function $f$ is continuous within $s$ at $x$ if and only if the composition $f \circ e$ is continuous within the preimage $e^{-1}(s)$ at the point $e^{-1}(x)$.
PartialHomeomorph.continuousAt_iff_continuousAt_comp_right theorem
{f : Y → Z} {x : Y} (h : x ∈ e.target) : ContinuousAt f x ↔ ContinuousAt (f ∘ e) (e.symm x)
Full source
/-- 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) :
    ContinuousAtContinuousAt f x ↔ ContinuousAt (f ∘ e) (e.symm x) := by
  rw [← continuousWithinAt_univ, e.continuousWithinAt_iff_continuousWithinAt_comp_right h,
    preimage_univ, continuousWithinAt_univ]
Continuity at a Point Under Right Composition with Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Y \to Z$ be a function. For any point $x \in e.\mathrm{target}$, the function $f$ is continuous at $x$ if and only if the composition $f \circ e$ is continuous at $e^{-1}(x)$.
PartialHomeomorph.continuousOn_iff_continuousOn_comp_right theorem
{f : Y → Z} {s : Set Y} (h : s ⊆ e.target) : ContinuousOn f s ↔ ContinuousOn (f ∘ e) (e.source ∩ e ⁻¹' s)
Full source
/-- 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) :
    ContinuousOnContinuousOn f s ↔ ContinuousOn (f ∘ e) (e.source ∩ e ⁻¹' s) := by
  simp only [← e.symm_image_eq_source_inter_preimage h, ContinuousOn, forall_mem_image]
  refine forall₂_congr fun x hx => ?_
  rw [e.continuousWithinAt_iff_continuousWithinAt_comp_right (h hx),
    e.symm_image_eq_source_inter_preimage h, inter_comm, continuousWithinAt_inter]
  exact IsOpen.mem_nhds e.open_source (e.map_target (h hx))
Continuity on Set via Right Composition with Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Y \to Z$ be a function. For any subset $s \subseteq Y$ contained in the target $e.\mathrm{target}$, the function $f$ is continuous on $s$ if and only if the composition $f \circ e$ is continuous on the intersection of the source $e.\mathrm{source}$ with the preimage $e^{-1}(s)$. In symbols: $$ \text{ContinuousOn}(f, s) \leftrightarrow \text{ContinuousOn}(f \circ e, e.\mathrm{source} \cap e^{-1}(s)). $$
PartialHomeomorph.continuousWithinAt_iff_continuousWithinAt_comp_left theorem
{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
Full source
/-- 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.sourcef ⁻¹' e.source ∈ 𝓝[s] x) :
    ContinuousWithinAtContinuousWithinAt f s x ↔ ContinuousWithinAt (e ∘ f) s x := by
  refine ⟨(e.continuousAt hx).comp_continuousWithinAt, fun fe_cont => ?_⟩
  rw [← continuousWithinAt_inter' h] at fe_cont ⊢
  have : ContinuousWithinAt (e.symm ∘ e ∘ f) (s ∩ f ⁻¹' e.source) x :=
    haveI : ContinuousWithinAt e.symm univ (e (f x)) :=
      (e.continuousAt_symm (e.map_source hx)).continuousWithinAt
    ContinuousWithinAt.comp this fe_cont (subset_univ _)
  exact this.congr (fun y hy => by simp [e.left_inv hy.2]) (by simp [e.left_inv hx])
Continuity Within Set at Point via Composition with Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Z \to X$ be a function. For a point $x \in Z$ and a set $s \subseteq Z$, if $f(x) \in e.\text{source}$ and the preimage $f^{-1}(e.\text{source})$ is a neighborhood of $x$ within $s$, then $f$ is continuous within $s$ at $x$ if and only if the composition $e \circ f$ is continuous within $s$ at $x$.
PartialHomeomorph.continuousAt_iff_continuousAt_comp_left theorem
{f : Z → X} {x : Z} (h : f ⁻¹' e.source ∈ 𝓝 x) : ContinuousAt f x ↔ ContinuousAt (e ∘ f) x
Full source
/-- 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.sourcef ⁻¹' e.source ∈ 𝓝 x) :
    ContinuousAtContinuousAt f x ↔ ContinuousAt (e ∘ f) x := by
  have hx : f x ∈ e.source := (mem_of_mem_nhds h :)
  have h' : f ⁻¹' e.sourcef ⁻¹' e.source ∈ 𝓝[univ] x := by rwa [nhdsWithin_univ]
  rw [← continuousWithinAt_univ, ← continuousWithinAt_univ,
    e.continuousWithinAt_iff_continuousWithinAt_comp_left hx h']
Continuity at Point via Composition with Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Z \to X$ be a function. For a point $x \in Z$, if the preimage $f^{-1}(e.\text{source})$ is a neighborhood of $x$, then $f$ is continuous at $x$ if and only if the composition $e \circ f$ is continuous at $x$.
PartialHomeomorph.continuousOn_iff_continuousOn_comp_left theorem
{f : Z → X} {s : Set Z} (h : s ⊆ f ⁻¹' e.source) : ContinuousOn f s ↔ ContinuousOn (e ∘ f) s
Full source
/-- 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) :
    ContinuousOnContinuousOn f s ↔ ContinuousOn (e ∘ f) s :=
  forall₂_congr fun _x hx =>
    e.continuousWithinAt_iff_continuousWithinAt_comp_left (h hx)
      (mem_of_superset self_mem_nhdsWithin h)
Continuity on Set via Composition with Partial Homeomorphism
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Z \to X$ be a function. For a subset $s \subseteq Z$ such that $s \subseteq f^{-1}(e.\text{source})$, the function $f$ is continuous on $s$ if and only if the composition $e \circ f$ is continuous on $s$.
PartialHomeomorph.continuous_iff_continuous_comp_left theorem
{f : Z → X} (h : f ⁻¹' e.source = univ) : Continuous f ↔ Continuous (e ∘ f)
Full source
/-- 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) :
    ContinuousContinuous f ↔ Continuous (e ∘ f) := by
  simp only [continuous_iff_continuousOn_univ]
  exact e.continuousOn_iff_continuousOn_comp_left (Eq.symm h).subset
Continuity via Composition with Partial Homeomorphism on Entire Domain
Informal description
Let $e$ be a partial homeomorphism between topological spaces $X$ and $Y$, and let $f \colon Z \to X$ be a function. If the preimage $f^{-1}(e.\text{source})$ is equal to the entire space $Z$, then $f$ is continuous if and only if the composition $e \circ f$ is continuous.
PartialHomeomorph.homeomorphOfImageSubsetSource definition
{s : Set X} {t : Set Y} (hs : s ⊆ e.source) (ht : e '' s = t) : s ≃ₜ t
Full source
/-- 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 :=
  have h₁ : MapsTo e s t := mapsTo'.2 ht.subset
  have h₂ : t ⊆ e.target := ht ▸ e.image_source_eq_targetimage_subset e hs
  have h₃ : MapsTo e.symm t s := ht ▸ forall_mem_image.2 fun _x hx =>
      (e.left_inv (hs hx)).symm ▸ hx
  { toFun := MapsTo.restrict e s t h₁
    invFun := MapsTo.restrict e.symm t s h₃
    left_inv := fun a => Subtype.ext (e.left_inv (hs a.2))
    right_inv := fun b => Subtype.eq <| e.right_inv (h₂ b.2)
    continuous_toFun := (e.continuousOn.mono hs).restrict_mapsTo h₁
    continuous_invFun := (e.continuousOn_symm.mono h₂).restrict_mapsTo h₃ }
Homeomorphism from image of subset under partial homeomorphism
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, a subset $s \subseteq e.\text{source}$, and a subset $t \subseteq Y$ such that $e(s) = t$, the function constructs a homeomorphism between $s$ and $t$ by restricting $e$ to $s$ and its inverse to $t$. More precisely, the homeomorphism is defined by: - The forward map is the restriction of $e$ to $s \to t$ - The inverse map is the restriction of $e^{-1}$ to $t \to s$ - Both maps are continuous on their respective domains - The maps are inverses of each other, satisfying $e^{-1} \circ e = \text{id}$ on $s$ and $e \circ e^{-1} = \text{id}$ on $t$
PartialHomeomorph.toHomeomorphSourceTarget definition
: e.source ≃ₜ e.target
Full source
/-- A partial homeomorphism defines a homeomorphism between its source and target. -/
@[simps!]
def toHomeomorphSourceTarget : e.source ≃ₜ e.target :=
  e.homeomorphOfImageSubsetSource subset_rfl e.image_source_eq_target
Homeomorphism between source and target of a partial homeomorphism
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the function constructs a homeomorphism between the source set $e.\text{source} \subseteq X$ and the target set $e.\text{target} \subseteq Y$. More precisely: - The forward map is the restriction of $e$ to $e.\text{source} \to e.\text{target}$ - The inverse map is the restriction of $e^{-1}$ to $e.\text{target} \to e.\text{source}$ - Both maps are continuous on their respective domains - The maps are inverses of each other, satisfying $e^{-1} \circ e = \text{id}$ on $e.\text{source}$ and $e \circ e^{-1} = \text{id}$ on $e.\text{target}$
PartialHomeomorph.secondCountableTopology_source theorem
[SecondCountableTopology Y] : SecondCountableTopology e.source
Full source
theorem secondCountableTopology_source [SecondCountableTopology Y] :
    SecondCountableTopology e.source :=
  e.toHomeomorphSourceTarget.secondCountableTopology
Second-countability of partial homeomorphism source
Informal description
If $Y$ is a second-countable topological space, then the source set $e.\mathrm{source}$ of a partial homeomorphism $e \colon X \to Y$ is also second-countable.
PartialHomeomorph.nhds_eq_comap_inf_principal theorem
{x} (hx : x ∈ e.source) : 𝓝 x = comap e (𝓝 (e x)) ⊓ 𝓟 e.source
Full source
theorem nhds_eq_comap_inf_principal {x} (hx : x ∈ e.source) :
    𝓝 x = comapcomap e (𝓝 (e x)) ⊓ 𝓟 e.source := by
  lift x to e.source using hx
  rw [← e.open_source.nhdsWithin_eq x.2, ← map_nhds_subtype_val, ← map_comap_setCoe_val,
    e.toHomeomorphSourceTarget.nhds_eq_comap, nhds_subtype_eq_comap]
  simp only [Function.comp_def, toHomeomorphSourceTarget_apply_coe, comap_comap]
Neighborhood Filter Decomposition for Partial Homeomorphisms
Informal description
For any point $x$ in the source set $e.\text{source}$ of a partial homeomorphism $e$ between topological spaces $X$ and $Y$, the neighborhood filter $\mathcal{N}(x)$ of $x$ in $X$ is equal to the intersection of: 1. The preimage of the neighborhood filter $\mathcal{N}(e(x))$ under the map $e$, and 2. The principal filter generated by $e.\text{source}$. In symbols: $\mathcal{N}(x) = \text{comap}\, e\, (\mathcal{N}(e(x))) \sqcap \mathcal{P}(e.\text{source})$.
PartialHomeomorph.toHomeomorphOfSourceEqUnivTargetEqUniv definition
(h : e.source = (univ : Set X)) (h' : e.target = univ) : X ≃ₜ Y
Full source
/-- 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]
-- TODO: add a `PartialEquiv` version
def toHomeomorphOfSourceEqUnivTargetEqUniv (h : e.source = (univ : Set X)) (h' : e.target = univ) :
    X ≃ₜ Y where
  toFun := e
  invFun := e.symm
  left_inv x :=
    e.left_inv <| by
      rw [h]
      exact mem_univ _
  right_inv x :=
    e.right_inv <| by
      rw [h']
      exact mem_univ _
  continuous_toFun := by
    simpa only [continuous_iff_continuousOn_univ, h] using e.continuousOn
  continuous_invFun := by
    simpa only [continuous_iff_continuousOn_univ, h'] using e.continuousOn_symm
Global homeomorphism induced by a partial homeomorphism with full domain and codomain
Informal description
Given a partial homeomorphism $e$ between topological spaces $X$ and $Y$, if the source of $e$ is the entire space $X$ (i.e., $e.\text{source} = \text{univ}$) and the target of $e$ is the entire space $Y$ (i.e., $e.\text{target} = \text{univ}$), then $e$ induces a global homeomorphism between $X$ and $Y$. This homeomorphism is defined by: - The forward map is $e$ itself, restricted to $X$ (which equals its source) - The inverse map is $e^{-1}$, restricted to $Y$ (which equals its target) - Both maps are continuous on their respective domains (which are the whole spaces by assumption) - The maps satisfy $e^{-1} \circ e = \text{id}_X$ and $e \circ e^{-1} = \text{id}_Y$
PartialHomeomorph.isOpenEmbedding_restrict theorem
: IsOpenEmbedding (e.source.restrict e)
Full source
theorem isOpenEmbedding_restrict : IsOpenEmbedding (e.source.restrict e) := by
  refine .of_continuous_injective_isOpenMap (e.continuousOn.comp_continuous
    continuous_subtype_val Subtype.prop) e.injOn.injective fun V hV ↦ ?_
  rw [Set.restrict_eq, Set.image_comp]
  exact e.isOpen_image_of_subset_source (e.open_source.isOpenMap_subtype_val V hV)
    fun _ ⟨x, _, h⟩ ↦ h ▸ x.2
Restriction of Partial Homeomorphism to Source is an Open Embedding
Informal description
The restriction of a partial homeomorphism $e \colon X \to Y$ to its source set $e.\text{source}$ is an open embedding. That is, the map $e|_{e.\text{source}} \colon e.\text{source} \to Y$ is continuous, injective, and maps open subsets of $e.\text{source}$ to open subsets of $Y$.
PartialHomeomorph.to_isOpenEmbedding theorem
(h : e.source = Set.univ) : IsOpenEmbedding e
Full source
/-- A partial homeomorphism whose source is all of `X` defines an open embedding of `X` into `Y`.
The converse is also true; see `IsOpenEmbedding.toPartialHomeomorph`. -/
theorem to_isOpenEmbedding (h : e.source = Set.univ) : IsOpenEmbedding e :=
  e.isOpenEmbedding_restrict.comp
    ((Homeomorph.setCongr h).trans <| Homeomorph.Set.univ X).symm.isOpenEmbedding
Partial Homeomorphism with Full Source is an Open Embedding
Informal description
Let $e \colon X \to Y$ be a partial homeomorphism between topological spaces $X$ and $Y$. If the source of $e$ is the entire space $X$ (i.e., $e.\text{source} = X$), then $e$ is an open embedding of $X$ into $Y$. That is, $e$ is continuous, injective, and maps open subsets of $X$ to open subsets of $Y$.
Homeomorph.refl_toPartialHomeomorph theorem
: (Homeomorph.refl X).toPartialHomeomorph = PartialHomeomorph.refl X
Full source
@[simp, mfld_simps]
theorem refl_toPartialHomeomorph :
    (Homeomorph.refl X).toPartialHomeomorph = PartialHomeomorph.refl X :=
  rfl
Identity Homeomorphism Yields Identity Partial Homeomorphism
Informal description
The partial homeomorphism associated to the identity homeomorphism on a topological space $X$ is equal to the identity partial homeomorphism on $X$.
Homeomorph.symm_toPartialHomeomorph theorem
: e.symm.toPartialHomeomorph = e.toPartialHomeomorph.symm
Full source
@[simp, mfld_simps]
theorem symm_toPartialHomeomorph : e.symm.toPartialHomeomorph = e.toPartialHomeomorph.symm :=
  rfl
Inverse of Partial Homeomorphism Associated to Homeomorphism Inverse
Informal description
For any homeomorphism $e \colon X \simeq Y$ between topological spaces $X$ and $Y$, the partial homeomorphism associated to its inverse $e^{-1}$ is equal to the inverse of the partial homeomorphism associated to $e$. In other words, $(e^{-1}).toPartialHomeomorph = (e.toPartialHomeomorph)^{-1}$.
Homeomorph.trans_toPartialHomeomorph theorem
: (e.trans e').toPartialHomeomorph = e.toPartialHomeomorph.trans e'.toPartialHomeomorph
Full source
@[simp, mfld_simps]
theorem trans_toPartialHomeomorph :
    (e.trans e').toPartialHomeomorph = e.toPartialHomeomorph.trans e'.toPartialHomeomorph :=
  PartialHomeomorph.toPartialEquiv_injective <| Equiv.trans_toPartialEquiv _ _
Compatibility of Partial Homeomorphism Construction with Composition of Homeomorphisms
Informal description
For any homeomorphisms $e \colon X \simeq Y$ and $e' \colon Y \simeq Z$ between topological spaces, the partial homeomorphism associated to their composition $e \circ e'$ is equal to the composition of the partial homeomorphisms associated to $e$ and $e'$. That is, $(e \circ e').\text{toPartialHomeomorph} = e.\text{toPartialHomeomorph} \circ e'.\text{toPartialHomeomorph}$.
Homeomorph.transPartialHomeomorph definition
(e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z
Full source
/-- Precompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! -fullyApplied]
def transPartialHomeomorph (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : PartialHomeomorph X Z where
  toPartialEquiv := e.toEquiv.transPartialEquiv f'.toPartialEquiv
  open_source := f'.open_source.preimage e.continuous
  open_target := f'.open_target
  continuousOn_toFun := f'.continuousOn.comp e.continuous.continuousOn fun _ => id
  continuousOn_invFun := e.symm.continuous.comp_continuousOn f'.symm.continuousOn
Composition of homeomorphism with partial homeomorphism
Informal description
Given a homeomorphism $e \colon X \simeq Y$ between topological spaces $X$ and $Y$, and a partial homeomorphism $f' \colon Y \supseteq U \to V \subseteq Z$, the composition $e \circ f'$ is a partial homeomorphism from $X$ to $Z$. More precisely: - The source of the resulting partial homeomorphism is the preimage of $f'$'s source under $e$ (i.e., $e^{-1}(f'.\text{source})$), which is open in $X$ since $e$ is continuous. - The target is $f'$'s target, which is open in $Z$. - The forward function is $f' \circ e$, which is continuous on the source. - The inverse function is $e^{-1} \circ f'^{-1}$, which is continuous on the target.
Homeomorph.transPartialHomeomorph_eq_trans theorem
(e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) : e.transPartialHomeomorph f' = e.toPartialHomeomorph.trans f'
Full source
theorem transPartialHomeomorph_eq_trans (e : X ≃ₜ Y) (f' : PartialHomeomorph Y Z) :
    e.transPartialHomeomorph f' = e.toPartialHomeomorph.trans f' :=
  PartialHomeomorph.toPartialEquiv_injective <| Equiv.transPartialEquiv_eq_trans _ _
Equality of Partial Homeomorphism Compositions: $e \circ_{\text{partial}} f' = e.\text{toPartialHomeomorph} \circ f'$
Informal description
For any homeomorphism $e \colon X \simeq Y$ between topological spaces $X$ and $Y$, and any partial homeomorphism $f' \colon Y \supseteq U \to V \subseteq Z$, the composition $e \circ f'$ as a partial homeomorphism is equal to the composition of the partial homeomorphism version of $e$ with $f'$. That is, $e \circ_{\text{partial}} f' = e.\text{toPartialHomeomorph} \circ f'$.
Homeomorph.transPartialHomeomorph_trans theorem
(e : X ≃ₜ Y) (f : PartialHomeomorph Y Z) (f' : PartialHomeomorph Z Z') : (e.transPartialHomeomorph f).trans f' = e.transPartialHomeomorph (f.trans f')
Full source
@[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') := by
  simp only [transPartialHomeomorph_eq_trans, PartialHomeomorph.trans_assoc]
Associativity of Homeomorphism-Partial Homeomorphism Composition: $(e \circ f) \circ f' = e \circ (f \circ f')$
Informal description
For any homeomorphism $e \colon X \simeq Y$ between topological spaces $X$ and $Y$, and any partial homeomorphisms $f \colon Y \supseteq U \to V \subseteq Z$ and $f' \colon Z \supseteq U' \to V' \subseteq Z'$, the following equality holds: $$(e \circ_{\text{partial}} f) \circ_{\text{partial}} f' = e \circ_{\text{partial}} (f \circ_{\text{partial}} f')$$ where $\circ_{\text{partial}}$ denotes the composition of partial homeomorphisms.
Homeomorph.trans_transPartialHomeomorph theorem
(e : X ≃ₜ Y) (e' : Y ≃ₜ Z) (f'' : PartialHomeomorph Z Z') : (e.trans e').transPartialHomeomorph f'' = e.transPartialHomeomorph (e'.transPartialHomeomorph f'')
Full source
@[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'') := by
  simp only [transPartialHomeomorph_eq_trans, PartialHomeomorph.trans_assoc,
    trans_toPartialHomeomorph]
Associativity of Composition Between Homeomorphisms and Partial Homeomorphisms
Informal description
For any homeomorphisms $e \colon X \simeq Y$ and $e' \colon Y \simeq Z$ between topological spaces, and any partial homeomorphism $f'' \colon Z \supseteq U \to V \subseteq Z'$, the following equality holds: $$(e \circ e') \circ_{\text{partial}} f'' = e \circ_{\text{partial}} (e' \circ_{\text{partial}} f'')$$ where $\circ_{\text{partial}}$ denotes the composition of a homeomorphism with a partial homeomorphism.
Topology.IsOpenEmbedding.toPartialHomeomorph definition
[Nonempty X] : PartialHomeomorph X Y
Full source
/-- 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_isOpenEmbedding`. -/
@[simps! (config := mfld_cfg) apply source target]
noncomputable def toPartialHomeomorph [Nonempty X] : PartialHomeomorph X Y :=
  PartialHomeomorph.ofContinuousOpen (h.isEmbedding.injective.injOn.toPartialEquiv f univ)
    h.continuous.continuousOn h.isOpenMap isOpen_univ
Partial homeomorphism induced by an open embedding
Informal description
Given a nonempty topological space $X$ and an open embedding $f \colon X \to Y$, the function constructs a partial homeomorphism between $X$ and $Y$ where: - The source is the entire space $X$ (represented by the universal set $\text{univ}$) - The target is the image $f(X)$ in $Y$ - The forward map is $f$ restricted to $X$ - The inverse map is the continuous inverse of $f$ defined on $f(X)$ This partial homeomorphism is constructed by: 1. Creating a partial equivalence from the injective function $f$ (using $\text{Set.InjOn.toPartialEquiv}$) 2. Verifying $f$ is continuous on $X$ (from the open embedding hypothesis) 3. Using that $f$ is an open map (since it's an open embedding) 4. Confirming $X$ is open in itself (as $\text{isOpen\_univ}$)
Topology.IsOpenEmbedding.toPartialHomeomorph_left_inv theorem
{x : X} : (h.toPartialHomeomorph f).symm (f x) = x
Full source
lemma toPartialHomeomorph_left_inv {x : X} : (h.toPartialHomeomorph f).symm (f x) = x := by
  rw [← congr_fun (h.toPartialHomeomorph_apply f), PartialHomeomorph.left_inv]
  exact Set.mem_univ _
Left Inverse Property of Partial Homeomorphism Induced by Open Embedding
Informal description
For any point $x$ in the topological space $X$, the composition of the partial homeomorphism induced by an open embedding $f \colon X \to Y$ with its inverse satisfies $(h.\text{toPartialHomeomorph}(f))^{-1}(f(x)) = x$.
Topology.IsOpenEmbedding.toPartialHomeomorph_right_inv theorem
{x : Y} (hx : x ∈ Set.range f) : f ((h.toPartialHomeomorph f).symm x) = x
Full source
lemma toPartialHomeomorph_right_inv {x : Y} (hx : x ∈ Set.range f) :
    f ((h.toPartialHomeomorph f).symm x) = x := by
  rw [← congr_fun (h.toPartialHomeomorph_apply f), PartialHomeomorph.right_inv]
  rwa [toPartialHomeomorph_target]
Right Inverse Property for Partial Homeomorphism Induced by Open Embedding
Informal description
For any point $x$ in the range of a continuous open embedding $f : X \to Y$, the composition of $f$ with the inverse of the induced partial homeomorphism satisfies $f(f^{-1}(x)) = x$.
TopologicalSpace.Opens.partialHomeomorphSubtypeCoe definition
: PartialHomeomorph s X
Full source
/-- 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 :=
  IsOpenEmbedding.toPartialHomeomorph _ s.2.isOpenEmbedding_subtypeVal
Partial homeomorphism of open subset inclusion
Informal description
For an open subset $s$ of a topological space $X$, the inclusion map $s \hookrightarrow X$ forms a partial homeomorphism where: - The source is the entire subspace $s$ (represented as $\text{univ}$) - The target is the open set $s$ in $X$ - The forward map is the canonical inclusion $\iota: s \to X$ - The inverse map is the continuous restriction to $s$ This partial homeomorphism is constructed using the fact that the inclusion of an open subset is an open embedding.
TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_coe theorem
: (s.partialHomeomorphSubtypeCoe hs : s → X) = (↑)
Full source
@[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_coe : (s.partialHomeomorphSubtypeCoe hs : s → X) = (↑) :=
  rfl
Inclusion map as partial homeomorphism forward map
Informal description
For an open subset $s$ of a topological space $X$, the forward map of the partial homeomorphism associated with the inclusion $s \hookrightarrow X$ is equal to the canonical inclusion map $\iota: s \to X$. In other words, if we consider the partial homeomorphism constructed from the open embedding $s \hookrightarrow X$, then its coercion to a function (via `toFun'`) coincides with the standard inclusion map from $s$ to $X$.
TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_source theorem
: (s.partialHomeomorphSubtypeCoe hs).source = Set.univ
Full source
@[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_source : (s.partialHomeomorphSubtypeCoe hs).source = Set.univ :=
  rfl
Source of Partial Homeomorphism from Open Subset Inclusion is Entire Subspace
Informal description
For an open subset $s$ of a topological space $X$, the source of the partial homeomorphism induced by the inclusion map $s \hookrightarrow X$ is the entire subspace $s$, i.e., $\text{source} = \text{univ}$.
TopologicalSpace.Opens.partialHomeomorphSubtypeCoe_target theorem
: (s.partialHomeomorphSubtypeCoe hs).target = s
Full source
@[simp, mfld_simps]
theorem partialHomeomorphSubtypeCoe_target : (s.partialHomeomorphSubtypeCoe hs).target = s := by
  simp only [partialHomeomorphSubtypeCoe, Subtype.range_coe_subtype, mfld_simps]
  rfl
Target of Partial Homeomorphism from Open Subset Inclusion Equals the Subset
Informal description
For an open subset $s$ of a topological space $X$, the target of the partial homeomorphism induced by the inclusion map $s \hookrightarrow X$ is equal to $s$ itself.
PartialHomeomorph.transHomeomorph definition
(e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z
Full source
/-- Postcompose a partial homeomorphism with a homeomorphism.
We modify the source and target to have better definitional behavior. -/
@[simps! -fullyApplied]
def transHomeomorph (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : PartialHomeomorph X Z where
  toPartialEquiv := e.toPartialEquiv.transEquiv f'.toEquiv
  open_source := e.open_source
  open_target := e.open_target.preimage f'.symm.continuous
  continuousOn_toFun := f'.continuous.comp_continuousOn e.continuousOn
  continuousOn_invFun := e.symm.continuousOn.comp f'.symm.continuous.continuousOn fun _ => id
Composition of a partial homeomorphism with a homeomorphism
Informal description
Given a partial homeomorphism \( e \) between topological spaces \( X \) and \( Y \) and a homeomorphism \( f' \) between \( Y \) and \( Z \), the composition \( e \circ f' \) is a partial homeomorphism between \( X \) and \( Z \). Specifically: - The source of the resulting partial homeomorphism is \( e.\text{source} \) (the domain where \( e \) is defined). - The target is \( f'^{-1}(e.\text{target}) \) (the preimage of \( e \)'s target under \( f'^{-1} \)). - The forward function is \( f' \circ e \), and the inverse function is \( e^{-1} \circ f'^{-1} \). - Both the source and target are open subsets, and the functions are continuous on their respective domains.
PartialHomeomorph.transHomeomorph_eq_trans theorem
(e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) : e.transHomeomorph f' = e.trans f'.toPartialHomeomorph
Full source
theorem transHomeomorph_eq_trans (e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) :
    e.transHomeomorph f' = e.trans f'.toPartialHomeomorph :=
  toPartialEquiv_injective <| PartialEquiv.transEquiv_eq_trans _ _
Equality of Partial Homeomorphism Composition with Homeomorphism and its Partial Version
Informal description
For any partial homeomorphism $e$ between topological spaces $X$ and $Y$ and any homeomorphism $f'$ between $Y$ and $Z$, the composition $e \circ f'$ as a partial homeomorphism is equal to the composition of $e$ with the partial homeomorphism version of $f'$. In other words, $e \circ f' = e \circ (f' \text{ as partial homeomorphism})$.
PartialHomeomorph.transHomeomorph_transHomeomorph theorem
(e : PartialHomeomorph X Y) (f' : Y ≃ₜ Z) (f'' : Z ≃ₜ Z') : (e.transHomeomorph f').transHomeomorph f'' = e.transHomeomorph (f'.trans f'')
Full source
@[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'') := by
  simp only [transHomeomorph_eq_trans, trans_assoc, Homeomorph.trans_toPartialHomeomorph]
Associativity of Partial Homeomorphism Composition with Homeomorphisms
Informal description
For any partial homeomorphism $e \colon X \to Y$ and homeomorphisms $f' \colon Y \to Z$ and $f'' \colon Z \to Z'$, the following equality holds: $$(e \circ f') \circ f'' = e \circ (f' \circ f'')$$ where $\circ$ denotes the composition of partial homeomorphisms with homeomorphisms.
PartialHomeomorph.trans_transHomeomorph theorem
(e : PartialHomeomorph X Y) (e' : PartialHomeomorph Y Z) (f'' : Z ≃ₜ Z') : (e.trans e').transHomeomorph f'' = e.trans (e'.transHomeomorph f'')
Full source
@[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'') := by
  simp only [transHomeomorph_eq_trans, trans_assoc, Homeomorph.trans_toPartialHomeomorph]
Associativity of Partial Homeomorphism Composition with Homeomorphism
Informal description
For any partial homeomorphisms $e \colon X \to Y$ and $e' \colon Y \to Z$, and any homeomorphism $f'' \colon Z \to Z'$, the following equality holds: $$(e \circ e') \circ f'' = e \circ (e' \circ f'')$$ where $\circ$ denotes the composition of partial homeomorphisms (with $f''$ treated as a partial homeomorphism via `toPartialHomeomorph`).
PartialHomeomorph.subtypeRestr definition
: PartialHomeomorph s Y
Full source
/-- 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 :=
  (s.partialHomeomorphSubtypeCoe hs).trans e
Restriction of a partial homeomorphism to an open subset
Informal description
Given a partial homeomorphism $e \colon X \to Y$ and an open subset $s \subseteq X$, the restriction of $e$ to $s$ is a partial homeomorphism $e|_{s} \colon s \to Y$ defined by composing the inclusion partial homeomorphism $s \hookrightarrow X$ with $e$. More precisely: - The source of $e|_{s}$ is $s$ (as a subspace of $X$) - The target of $e|_{s}$ is the same as the target of $e$ - The forward map is the restriction of $e$ to $s$ - The inverse map is the restriction of $e^{-1}$ to $e(s) \cap e.target$ This construction ensures that $e|_{s}$ remains a partial homeomorphism with the appropriate continuity properties.
PartialHomeomorph.subtypeRestr_def theorem
: e.subtypeRestr hs = (s.partialHomeomorphSubtypeCoe hs).trans e
Full source
theorem subtypeRestr_def : e.subtypeRestr hs = (s.partialHomeomorphSubtypeCoe hs).trans e :=
  rfl
Restriction of Partial Homeomorphism as Composition with Inclusion
Informal description
Given a partial homeomorphism $e \colon X \to Y$ and an open subset $s \subseteq X$ (with proof $hs$ that $s$ is open), the restriction $e|_{s} \colon s \to Y$ is equal to the composition of the inclusion partial homeomorphism $s \hookrightarrow X$ with $e$. In other words, $e|_{s} = (\iota_s \colon s \hookrightarrow X) \circ e$, where $\iota_s$ is the canonical inclusion map of $s$ into $X$.
PartialHomeomorph.subtypeRestr_coe theorem
: ((e.subtypeRestr hs : PartialHomeomorph s Y) : s → Y) = Set.restrict ↑s (e : X → Y)
Full source
@[simp, mfld_simps]
theorem subtypeRestr_coe :
    ((e.subtypeRestr hs : PartialHomeomorph s Y) : s → Y) = Set.restrict ↑s (e : X → Y) :=
  rfl
Restriction of Partial Homeomorphism to Open Subset Preserves Function Definition
Informal description
For a partial homeomorphism $e \colon X \to Y$ and an open subset $s \subseteq X$, the restriction of $e$ to $s$, denoted $e|_{s} \colon s \to Y$, satisfies that the function $e|_{s} \colon s \to Y$ is equal to the restriction of the function $e \colon X \to Y$ to the subset $s$. In other words, the following diagram commutes: \[ \begin{CD} s @>{e|_{s}}>> Y \\ @V{\iota}VV @| \\ X @>{e}>> Y \end{CD} \] where $\iota \colon s \hookrightarrow X$ is the inclusion map.
PartialHomeomorph.subtypeRestr_source theorem
: (e.subtypeRestr hs).source = (↑) ⁻¹' e.source
Full source
@[simp, mfld_simps]
theorem subtypeRestr_source : (e.subtypeRestr hs).source = (↑) ⁻¹' e.source := by
  simp only [subtypeRestr_def, mfld_simps]
Source of Restricted Partial Homeomorphism as Preimage
Informal description
For a partial homeomorphism $e \colon X \to Y$ and an open subset $s \subseteq X$, the source of the restricted partial homeomorphism $e|_{s} \colon s \to Y$ is equal to the preimage of $e$'s source under the inclusion map $s \hookrightarrow X$, i.e., $(e|_{s}).source = \{x \in s \mid x \in e.source\}$.
PartialHomeomorph.map_subtype_source theorem
{x : s} (hxe : (x : X) ∈ e.source) : e x ∈ (e.subtypeRestr hs).target
Full source
theorem map_subtype_source {x : s} (hxe : (x : X) ∈ e.source) :
    e x ∈ (e.subtypeRestr hs).target := by
  refine ⟨e.map_source hxe, ?_⟩
  rw [s.partialHomeomorphSubtypeCoe_target, mem_preimage, e.leftInvOn hxe]
  exact x.prop
Image of Subtype Source Point Lies in Restricted Target
Informal description
For any point $x$ in an open subset $s$ of a topological space $X$ such that $x$ belongs to the source set of a partial homeomorphism $e \colon X \to Y$, the image $e(x)$ lies in the target set of the restricted partial homeomorphism $e|_{s} \colon s \to Y$.
PartialHomeomorph.subtypeRestr_symm_trans_subtypeRestr theorem
(f f' : PartialHomeomorph X Y) : (f.subtypeRestr hs).symm.trans (f'.subtypeRestr hs) ≈ (f.symm.trans f').restr (f.target ∩ f.symm ⁻¹' s)
Full source
/-- 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) := by
  simp only [subtypeRestr_def, trans_symm_eq_symm_trans_symm]
  have openness₁ : IsOpen (f.target ∩ f.symm ⁻¹' s) := f.isOpen_inter_preimage_symm s.2
  rw [← ofSet_trans _ openness₁, ← trans_assoc, ← trans_assoc]
  refine EqOnSource.trans' ?_ (eqOnSource_refl _)
  -- f' has been eliminated !!!
  have set_identity : f.symm.source ∩ (f.target ∩ f.symm ⁻¹' s) = f.symm.source ∩ f.symm ⁻¹' s := by
    mfld_set_tac
  have openness₂ : IsOpen (s : Set X) := s.2
  rw [ofSet_trans', set_identity, ← trans_of_set' _ openness₂, trans_assoc]
  refine EqOnSource.trans' (eqOnSource_refl _) ?_
  -- f has been eliminated !!!
  refine Setoid.trans (symm_trans_self (s.partialHomeomorphSubtypeCoe hs)) ?_
  simp only [mfld_simps, Setoid.refl]
Composition of Restricted Partial Homeomorphisms Equals Restricted Composition
Informal description
Let $X$ and $Y$ be topological spaces, and let $s \subseteq X$ be an open subset. For any two partial homeomorphisms $f, f' \colon X \to Y$, the composition of the inverse of the restriction $f|_s$ with the restriction $f'|_s$ is equivalent to the restriction of the composition $f^{-1} \circ f'$ to the intersection of $f$'s target with the preimage of $s$ under $f^{-1}$. More precisely: $$(f|_s)^{-1} \circ f'|_s \approx (f^{-1} \circ f')|_{f.\text{target} \cap f^{-1}(s)}$$
PartialHomeomorph.subtypeRestr_symm_eqOn theorem
{U : Opens X} (hU : Nonempty U) : EqOn e.symm (Subtype.val ∘ (e.subtypeRestr hU).symm) (e.subtypeRestr hU).target
Full source
theorem subtypeRestr_symm_eqOn {U : Opens X} (hU : Nonempty U) :
    EqOn e.symm (Subtype.valSubtype.val ∘ (e.subtypeRestr hU).symm) (e.subtypeRestr hU).target := by
  intro y hy
  rw [eq_comm, eq_symm_apply _ _ hy.1]
  · change restrict _ e _ = _
    rw [← subtypeRestr_coe, (e.subtypeRestr hU).right_inv hy]
  · have := map_target _ hy; rwa [subtypeRestr_source] at this
Inverse of Partial Homeomorphism Equals Composition with Restricted Inverse on Target
Informal description
For a partial homeomorphism $e \colon X \to Y$ and a nonempty open subset $U \subseteq X$, the inverse of $e$ coincides with the composition of the inclusion map $\iota \colon U \to X$ and the inverse of the restricted partial homeomorphism $e|_U \colon U \to Y$ on the target of $e|_U$. More precisely, for all $y$ in the target of $e|_U$, we have: $$ e^{-1}(y) = \iota \circ (e|_U)^{-1}(y) $$
PartialHomeomorph.subtypeRestr_symm_eqOn_of_le theorem
{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
Full source
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.inclusionSet.inclusion hUV ∘ (e.subtypeRestr hU).symm)
      (e.subtypeRestr hU).target := by
  set i := Set.inclusion hUV
  intro y hy
  dsimp [PartialHomeomorph.subtypeRestr_def] at hy ⊢
  have hyV : e.symm y ∈ (V.partialHomeomorphSubtypeCoe hV).target := by
    rw [Opens.partialHomeomorphSubtypeCoe_target] at hy ⊢
    exact hUV hy.2
  refine (V.partialHomeomorphSubtypeCoe hV).injOn ?_ trivial ?_
  · rw [← PartialHomeomorph.symm_target]
    apply PartialHomeomorph.map_source
    rw [PartialHomeomorph.symm_source]
    exact hyV
  · rw [(V.partialHomeomorphSubtypeCoe hV).right_inv hyV]
    show _ = U.partialHomeomorphSubtypeCoe hU _
    rw [(U.partialHomeomorphSubtypeCoe hU).right_inv hy.2]
Compatibility of Partial Homeomorphism Restrictions on Nested Open Sets
Informal description
Let $X$ and $Y$ be topological spaces, and let $e$ be a partial homeomorphism between them. For any nonempty open subsets $U$ and $V$ of $X$ with $U \subseteq V$, the inverse of the restricted partial homeomorphism $e|_{V}$ equals the composition of the inclusion map $\iota: U \hookrightarrow V$ with the inverse of $e|_{U}$ on the target of $e|_{U}$. More precisely, for all $y$ in the target of $e|_{U}$, we have: $$(e|_{V})^{-1}(y) = \iota \circ (e|_{U})^{-1}(y)$$
PartialHomeomorph.lift_openEmbedding definition
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : PartialHomeomorph X' Z
Full source
/-- Extend a partial homeomorphism `e : X → Z` to `X' → Z`, using an open embedding `ι : X → X'`.
On `ι(X)`, the extension is specified by `e`; its value elsewhere is arbitrary (and uninteresting).
-/
noncomputable def lift_openEmbedding (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    PartialHomeomorph X' Z where
  toFun := extend f e (fun _ ↦ (Classical.arbitrary Z))
  invFun := f ∘ e.invFun
  source := f '' e.source
  target := e.target
  map_source' := by
    rintro x ⟨x₀, hx₀, hxx₀⟩
    rw [← hxx₀, hf.injective.extend_apply e]
    exact e.map_source' hx₀
  map_target' z hz := mem_image_of_mem f (e.map_target' hz)
  left_inv' := by
    intro x ⟨x₀, hx₀, hxx₀⟩
    rw [← hxx₀, hf.injective.extend_apply e, comp_apply]
    congr
    exact e.left_inv' hx₀
  right_inv' z hz := by simpa only [comp_apply, hf.injective.extend_apply e] using e.right_inv' hz
  open_source := hf.isOpenMap _ e.open_source
  open_target := e.open_target
  continuousOn_toFun := by
    by_cases Nonempty X; swap
    · intro x hx; simp_all
    set F := (extend f e (fun _ ↦ (Classical.arbitrary Z))) with F_eq
    have heq : EqOn F (e ∘ (hf.toPartialHomeomorph).symm) (f '' e.source) := by
      intro x ⟨x₀, hx₀, hxx₀⟩
      rw [← hxx₀, F_eq, hf.injective.extend_apply e, comp_apply, hf.toPartialHomeomorph_left_inv]
    have : ContinuousOn (e ∘ (hf.toPartialHomeomorph).symm) (f '' e.source) := by
      apply e.continuousOn_toFun.comp; swap
      · intro x' ⟨x, hx, hx'x⟩
        rw [← hx'x, hf.toPartialHomeomorph_left_inv]; exact hx
      have : ContinuousOn (hf.toPartialHomeomorph).symm (f '' univ) :=
        (hf.toPartialHomeomorph).continuousOn_invFun
      exact this.mono <| image_mono <| subset_univ _
    exact ContinuousOn.congr this heq
  continuousOn_invFun := hf.continuous.comp_continuousOn e.continuousOn_invFun
Extension of a Partial Homeomorphism via Open Embedding
Informal description
Given a partial homeomorphism \( e \colon X \to Z \) and an open embedding \( f \colon X \to X' \), the definition extends \( e \) to a partial homeomorphism \( X' \to Z \). The extension is defined as follows: - The forward map \( e_{\text{lift}} \colon X' \to Z \) is given by extending \( e \) along \( f \), i.e., for \( x' \in f(X) \), \( e_{\text{lift}}(x') = e(x) \) where \( x \) is the unique preimage of \( x' \) under \( f \), and for \( x' \notin f(X) \), \( e_{\text{lift}}(x') \) is an arbitrary element of \( Z \). - The inverse map \( e_{\text{lift}}^{-1} \colon Z \to X' \) is given by \( e_{\text{lift}}^{-1}(z) = f(e^{-1}(z)) \) for \( z \in e_{\text{target}} \). - The source of \( e_{\text{lift}} \) is \( f(e_{\text{source}}) \), and the target is \( e_{\text{target}} \). The extended partial homeomorphism is continuous on its source and has a continuous inverse on its target.
PartialHomeomorph.lift_openEmbedding_toFun theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf) = extend f e (fun _ ↦ (Classical.arbitrary Z))
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_toFun (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf) = extend f e (fun _ ↦ (Classical.arbitrary Z)) := rfl
Forward Map of Lifted Partial Homeomorphism via Open Embedding
Informal description
Given a partial homeomorphism $e \colon X \to Z$ and an open embedding $f \colon X \to X'$, the forward map of the lifted partial homeomorphism $e_{\text{lift}} \colon X' \to Z$ is equal to the extension of $e$ along $f$, defined as follows: for any $x' \in X'$, if there exists $x \in X$ such that $f(x) = x'$, then $e_{\text{lift}}(x') = e(x)$; otherwise, $e_{\text{lift}}(x')$ is an arbitrary element of $Z$.
PartialHomeomorph.lift_openEmbedding_apply theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) {x : X} : (lift_openEmbedding e hf) (f x) = e x
Full source
lemma lift_openEmbedding_apply (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) {x : X} :
    (lift_openEmbedding e hf) (f x) = e x := by
  simp_rw [e.lift_openEmbedding_toFun]
  apply hf.injective.extend_apply
Lifted Partial Homeomorphism Preserves Mapping Under Open Embedding
Informal description
Let $e \colon X \to Z$ be a partial homeomorphism and $f \colon X \to X'$ be an open embedding. Then for any $x \in X$, the lifted partial homeomorphism $e_{\text{lift}} \colon X' \to Z$ satisfies $e_{\text{lift}}(f(x)) = e(x)$.
PartialHomeomorph.lift_openEmbedding_source theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf).source = f '' e.source
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_source (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf).source = f '' e.source := rfl
Source of Extended Partial Homeomorphism via Open Embedding
Informal description
For a partial homeomorphism $e \colon X \to Z$ and an open embedding $f \colon X \to X'$, the source of the extended partial homeomorphism $e_{\text{lift}}$ is equal to the image of $e$'s source under $f$, i.e., $(e_{\text{lift}}).\text{source} = f(e.\text{source})$.
PartialHomeomorph.lift_openEmbedding_target theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf).target = e.target
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_target (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf).target = e.target := rfl
Target Preservation in Partial Homeomorphism Extension via Open Embedding
Informal description
For a partial homeomorphism $e \colon X \to Z$ and an open embedding $f \colon X \to X'$, the target of the extended partial homeomorphism $e_{\text{lift}} \colon X' \to Z$ is equal to the target of $e$, i.e., $(e_{\text{lift}}).\text{target} = e.\text{target}$.
PartialHomeomorph.lift_openEmbedding_symm theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf).symm = f ∘ e.symm
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_symm (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf).symm = f ∘ e.symm := rfl
Inverse of Extended Partial Homeomorphism via Open Embedding
Informal description
For a partial homeomorphism $e \colon X \to Z$ and an open embedding $f \colon X \to X'$, the inverse of the extended partial homeomorphism $e_{\text{lift}} \colon X' \to Z$ is equal to the composition of $f$ with the inverse of $e$, i.e., $(e_{\text{lift}})^{-1} = f \circ e^{-1}$.
PartialHomeomorph.lift_openEmbedding_symm_source theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf).symm.source = e.target
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_symm_source (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf).symm.source = e.target := rfl
Source of Inverse of Extended Partial Homeomorphism Equals Original Target
Informal description
For a partial homeomorphism $e \colon X \to Z$ and an open embedding $f \colon X \to X'$, the source of the inverse of the extended partial homeomorphism $(e_{\text{lift}})^{-1} \colon Z \to X'$ is equal to the target of $e$, i.e., $(e_{\text{lift}})^{-1}.\text{source} = e.\text{target}$.
PartialHomeomorph.lift_openEmbedding_symm_target theorem
(e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf).symm.target = f '' e.source
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_symm_target (e : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf).symm.target = f '' e.source := by
  rw [PartialHomeomorph.symm_target, e.lift_openEmbedding_source]
Target of Inverse of Extended Partial Homeomorphism Equals Image of Original Source
Informal description
For a partial homeomorphism $e \colon X \to Z$ and an open embedding $f \colon X \to X'$, the target of the inverse of the extended partial homeomorphism $(e_{\text{lift}})^{-1} \colon Z \to X'$ is equal to the image of $e$'s source under $f$, i.e., $(e_{\text{lift}})^{-1}.\text{target} = f(e.\text{source})$.
PartialHomeomorph.lift_openEmbedding_trans_apply theorem
(e e' : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) (z : Z) : (e.lift_openEmbedding hf).symm.trans (e'.lift_openEmbedding hf) z = (e.symm.trans e') z
Full source
lemma lift_openEmbedding_trans_apply
    (e e' : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) (z : Z) :
    (e.lift_openEmbedding hf).symm.trans (e'.lift_openEmbedding hf) z = (e.symm.trans e') z := by
  simp [hf.injective.extend_apply e']
Composition of Extended Partial Homeomorphisms Preserves Application
Informal description
Let $e$ and $e'$ be partial homeomorphisms from $X$ to $Z$, and let $f \colon X \to X'$ be an open embedding. For any $z \in Z$, the composition of the inverse of the extended partial homeomorphism $(e_{\text{lift}})^{-1}$ with the extended partial homeomorphism $e'_{\text{lift}}$ evaluated at $z$ is equal to the composition of the inverses $e^{-1}$ and $e'$ evaluated at $z$, i.e., $$(e_{\text{lift}}^{-1} \circ e'_{\text{lift}})(z) = (e^{-1} \circ e')(z).$$
PartialHomeomorph.lift_openEmbedding_trans theorem
(e e' : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) : (e.lift_openEmbedding hf).symm.trans (e'.lift_openEmbedding hf) = e.symm.trans e'
Full source
@[simp, mfld_simps]
lemma lift_openEmbedding_trans (e e' : PartialHomeomorph X Z) (hf : IsOpenEmbedding f) :
    (e.lift_openEmbedding hf).symm.trans (e'.lift_openEmbedding hf) = e.symm.trans e' := by
  ext z
  · exact e.lift_openEmbedding_trans_apply e' hf z
  · simp [hf.injective.extend_apply e]
  · simp_rw [PartialHomeomorph.trans_source, e.lift_openEmbedding_symm_source, e.symm_source,
      e.lift_openEmbedding_symm, e'.lift_openEmbedding_source]
    refine ⟨fun ⟨hx, ⟨y, hy, hxy⟩⟩ ↦ ⟨hx, ?_⟩, fun ⟨hx, hx'⟩ ↦ ⟨hx, mem_image_of_mem f hx'⟩⟩
    rw [mem_preimage]; rw [comp_apply] at hxy
    exact (hf.injective hxy) ▸ hy
Composition of Extended Partial Homeomorphisms via Open Embedding Equals Original Composition
Informal description
Let $e$ and $e'$ be partial homeomorphisms from $X$ to $Z$, and let $f \colon X \to X'$ be an open embedding. Then the composition of the inverse of the extended partial homeomorphism $(e_{\text{lift}})^{-1}$ with the extended partial homeomorphism $e'_{\text{lift}}$ is equal to the composition of the inverses $e^{-1}$ and $e'$, i.e., $$(e_{\text{lift}})^{-1} \circ e'_{\text{lift}} = e^{-1} \circ e'.$$