Theorem: IsCoveringMapOn.isLocalHomeomorphOn
File: Mathlib/Topology/Covering.lean

tactic: refine IsLocalHomeomorphOn.mk f (f ⁻¹' s) fun x hx => ?_
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
⊢ IsLocalHomeomorphOn f (f ⁻¹' s)
state_after: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source

tactic: let e := (hf (f x) hx).toTrivialization
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source
state_after: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source

tactic: have h := (hf (f x) hx).mem_toTrivialization_baseSet
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source
state_after: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
h : f x ∈ ⋯.toTrivialization.baseSet
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source

tactic: let he := e.mem_source.2 h
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
h : f x ∈ ⋯.toTrivialization.baseSet
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source
state_after: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
h : f x ∈ ⋯.toTrivialization.baseSet
he : x ∈ e.source := (Trivialization.mem_source e).mpr h
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source

tactic: refine
  ⟨e.toPartialHomeomorph.trans
      { toFun := fun p => p.1
        invFun := fun p => ⟨p, x, rfl⟩
        source := e.baseSet ×ˢ ({⟨x, rfl⟩} : Set (f ⁻¹' {f x}))
        target := e.baseSet
        open_source :=
          e.open_baseSet.prod (singletons_open_iff_discrete.2 (hf (f x) hx).1 ⟨x, rfl⟩)
        open_target := e.open_baseSet
        map_source' := fun p => And.left
        map_target' := fun p hp => ⟨hp, rfl⟩
        left_inv' := fun p hp => Prod.ext rfl hp.2.symm
        right_inv' := fun p _ => rfl
        continuousOn_toFun := continuous_fst.continuousOn
        continuousOn_invFun := (continuous_id'.prod_mk continuous_const).continuousOn },
    ⟨he, by rwa [e.toPartialHomeomorph.symm_symm, e.proj_toFun x he],
      (hf (f x) hx).toTrivialization_apply⟩,
    fun p h => (e.proj_toFun p h.1).symm⟩
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
h : f x ∈ ⋯.toTrivialization.baseSet
he : x ∈ e.source := (Trivialization.mem_source e).mpr h
⊢ ∃ e, x ∈ e.source ∧ Set.EqOn f (↑e) e.source
state_after: no goals

tactic: rwa [e.toPartialHomeomorph.symm_symm, e.proj_toFun x he]
state_before: E : Type u_1
X : Type u_2
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalSpace X
f : E → X
s : Set X
hf : IsCoveringMapOn f s
x : E
hx : x ∈ f ⁻¹' s
e : Trivialization (↑(f ⁻¹' {f x})) f := ⋯.toTrivialization
h : f x ∈ ⋯.toTrivialization.baseSet
he : x ∈ e.source := (Trivialization.mem_source e).mpr h
⊢ (↑e.symm.symm x).1 ∈ e.baseSet
state_after: no goals