Skip to content

Commit

Permalink
add coe lemma
Browse files Browse the repository at this point in the history
and fix docstring
  • Loading branch information
Thmoas-Guan committed Nov 7, 2024
1 parent 2fdabf1 commit ade51ea
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Mathlib/Topology/Homeomorph.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ lemma IsHomeomorph.pi_map {ι : Type*} {X Y : ι → Type*} [∀ i, TopologicalS
IsHomeomorph (fun (x : ∀ i, X i) i ↦ f i (x i)) :=
(Homeomorph.piCongrRight fun i ↦ (h i).homeomorph (f i)).isHomeomorph

/-- `HomeomorphClass F A B` states that `F` is a type of two-sided continuous morphisms.-/
/-- `HomeomorphClass F A B` states that `F` is a type of homeomorphisms.-/
class HomeomorphClass (F : Type*) (A B : outParam Type*)
[TopologicalSpace A] [TopologicalSpace B] [h : EquivLike F A B] : Prop where
continuous_toFun : ∀ (f : F), Continuous (h.coe f)
Expand All @@ -1061,11 +1061,13 @@ variable {F α β : Type*} [TopologicalSpace α] [TopologicalSpace β] [EquivLik

/-- Turn an element of a type `F` satisfying `HomeomorphClass F α β` into an actual
`Homeomorph`. This is declared as the default coercion from `F` to `α ≃ₜ β`. -/
def toHomeomorph [h : HomeomorphClass F α β] (f : F) : α ≃ₜ β :={
(f : α ≃ β) with
@[coe]
def toHomeomorph [h : HomeomorphClass F α β] (f : F) : α ≃ₜ β :=
{(f : α ≃ β) with
continuous_toFun := h.continuous_toFun f
continuous_invFun := h.continuous_invFun f
}
continuous_invFun := h.continuous_invFun f }

theorem coe_coe [h : HomeomorphClass F α β] (f : F) : ⇑(h.toHomeomorph f) = ⇑f := rfl

instance [HomeomorphClass F α β] : CoeTC F (α ≃ₜ β) :=
⟨HomeomorphClass.toHomeomorph⟩
Expand Down

0 comments on commit ade51ea

Please sign in to comment.