-- Mathlib/Topology/Covering.lean
theorem isLocalHomeomorphOn (hf : IsCoveringMapOn f s) :
    IsLocalHomeomorphOn f (f ⁻¹' s)

Proof state:
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

Tactic:
rwa [e.toPartialHomeomorph.symm_symm, e.proj_toFun x he]

Result:
no goals

Proof state:
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)

Tactic:
refine IsLocalHomeomorphOn.mk f (f ⁻¹' s) fun x hx => ?_

Result:
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

Proof state:
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

Result:
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

Proof state:
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⟩

Result:
no goals

Proof state:
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

Result:
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

Proof state:
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

Result:
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