-- Mathlib/Geometry/Manifold/ChartedSpace.lean
theorem ChartedSpace.locallyCompactSpace [LocallyCompactSpace H] : LocallyCompactSpace M

Proof state:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
      ↑(chartAt H x).symm '' s
⊢ ∀ (x : M) (i : Set H),
    i ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact i ∧ i ⊆ (chartAt H x).target → IsCompact (↑(chartAt H x).symm '' i)

Tactic:
rintro x s ⟨_, h₂, h₃⟩

Result:
case intro.intro
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
      ↑(chartAt H x).symm '' s
x : M
s : Set H
left✝ : s ∈ 𝓝 (↑(chartAt H x) x)
h₂ : IsCompact s
h₃ : s ⊆ (chartAt H x).target
⊢ IsCompact (↑(chartAt H x).symm '' s)

Proof state:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
x : M
⊢ (Filter.map (↑(chartAt H x).symm) (𝓝 (↑(chartAt H x) x))).HasBasis
    (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s => ↑(chartAt H x).symm '' s

Tactic:
exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset
  (chart_target_mem_nhds H x)).map _

Result:
no goals

Proof state:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
x : M
⊢ (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
    ↑(chartAt H x).symm '' s

Tactic:
rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]

Result:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
x : M
⊢ (Filter.map (↑(chartAt H x).symm) (𝓝 (↑(chartAt H x) x))).HasBasis
    (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s => ↑(chartAt H x).symm '' s

Proof state:
case intro.intro
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
      ↑(chartAt H x).symm '' s
x : M
s : Set H
left✝ : s ∈ 𝓝 (↑(chartAt H x) x)
h₂ : IsCompact s
h₃ : s ⊆ (chartAt H x).target
⊢ IsCompact (↑(chartAt H x).symm '' s)

Tactic:
exact h₂.image_of_continuousOn ((chartAt H x).continuousOn_symm.mono h₃)

Result:
no goals

Proof state:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
⊢ LocallyCompactSpace M

Tactic:
have : ∀ x : M, (𝓝 x).HasBasis
    (fun s ↦ s ∈ 𝓝 (chartAt H x x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target)
    fun s ↦ (chartAt H x).symm '' s := fun x ↦ by
  rw [← (chartAt H x).symm_map_nhds_eq (mem_chart_source H x)]
  exact ((compact_basis_nhds (chartAt H x x)).hasBasis_self_subset
    (chart_target_mem_nhds H x)).map _

Result:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
      ↑(chartAt H x).symm '' s
⊢ LocallyCompactSpace M

Proof state:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
      ↑(chartAt H x).symm '' s
⊢ LocallyCompactSpace M

Tactic:
refine .of_hasBasis this ?_

Result:
H : Type u
M : Type u_2
inst✝³ : TopologicalSpace H
inst✝² : TopologicalSpace M
inst✝¹ : ChartedSpace H M
inst✝ : LocallyCompactSpace H
this :
  ∀ (x : M),
    (𝓝 x).HasBasis (fun s => s ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact s ∧ s ⊆ (chartAt H x).target) fun s =>
      ↑(chartAt H x).symm '' s
⊢ ∀ (x : M) (i : Set H),
    i ∈ 𝓝 (↑(chartAt H x) x) ∧ IsCompact i ∧ i ⊆ (chartAt H x).target → IsCompact (↑(chartAt H x).symm '' i)