l3lab/ntp-mathlib huggingface dataset:
/-- This is an auxiliary lemma and is unlikely to be of direct use outside of this file. See
`ContinuousMap.tendsto_iff_forall_compact_tendstoUniformlyOn` below for the useful version where the
topology is picked up via typeclass inference. -/
theorem tendsto_iff_forall_compact_tendstoUniformlyOn' {ι : Type u₃} {p : Filter ι}
    {F : ι → C(α, β)} :
    Filter.Tendsto F p (@nhds _ compactConvergenceTopology f) ↔
      ∀ K, IsCompact K → TendstoUniformlyOn (fun i a => F i a) f p K := by
  simp only [(hasBasis_nhds_compactConvergence f).tendsto_right_iff, TendstoUniformlyOn, and_imp,
    Prod.forall]
  refine' forall_congr' fun K => _
  

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K✝ : Set α
V : Set (β × β)
f : C(α, β)
ι : Type u₃
p : Filter ι
F : ι → C(α, β)
K : Set α
⊢ (∀ (b : Set (β × β)), IsCompact K → b ∈ 𝓤 β → ∀ᶠ (x : ι) in p, F x ∈ compactConvNhd K b f) ↔
    IsCompact K → ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ K, (f x, (F n) x) ∈ u

Next tactic:
rw [forall_swap]
/-- This is an auxiliary lemma and is unlikely to be of direct use outside of this file. See
`ContinuousMap.tendsto_iff_forall_compact_tendstoUniformlyOn` below for the useful version where the
topology is picked up via typeclass inference. -/
theorem tendsto_iff_forall_compact_tendstoUniformlyOn' {ι : Type u₃} {p : Filter ι}
    {F : ι → C(α, β)} :
    Filter.Tendsto F p (@nhds _ compactConvergenceTopology f) ↔
      ∀ K, IsCompact K → TendstoUniformlyOn (fun i a => F i a) f p K := by
  simp only [(hasBasis_nhds_compactConvergence f).tendsto_right_iff, TendstoUniformlyOn, and_imp,
    Prod.forall]
  refine' forall_congr' fun K => _
  rw [forall_swap]
  

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K✝ : Set α
V : Set (β × β)
f : C(α, β)
ι : Type u₃
p : Filter ι
F : ι → C(α, β)
K : Set α
⊢ (IsCompact K → ∀ x ∈ 𝓤 β, ∀ᶠ (x_1 : ι) in p, F x_1 ∈ compactConvNhd K x f) ↔
    IsCompact K → ∀ u ∈ 𝓤 β, ∀ᶠ (n : ι) in p, ∀ x ∈ K, (f x, (F n) x) ∈ u

Next tactic:
exact forall₃_congr fun _hK V _hV => Iff.rfl
/-- Any point of `ContinuousMap.CompactOpen.gen K U` is also an interior point wrt the topology of
compact convergence.

The topology of compact convergence is thus at least as fine as the compact-open topology. -/
theorem compactConvNhd_subset_compactOpen (hK : IsCompact K) {U : Set β} (hU : IsOpen U)
    (hf : f ∈ CompactOpen.gen K U) :
    ∃ V ∈ 𝓤 β, IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U := by
  

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
U : Set β
hU : IsOpen U
hf : f ∈ CompactOpen.gen K U
⊢ ∃ V ∈ 𝓤 β, IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U

Next tactic:
obtain ⟨V, hV₁, hV₂, hV₃⟩ := lebesgue_number_of_compact_open (hK.image f.continuous) hU hf
/-- Any point of `ContinuousMap.CompactOpen.gen K U` is also an interior point wrt the topology of
compact convergence.

The topology of compact convergence is thus at least as fine as the compact-open topology. -/
theorem compactConvNhd_subset_compactOpen (hK : IsCompact K) {U : Set β} (hU : IsOpen U)
    (hf : f ∈ CompactOpen.gen K U) :
    ∃ V ∈ 𝓤 β, IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U := by
  obtain ⟨V, hV₁, hV₂, hV₃⟩ := lebesgue_number_of_compact_open (hK.image f.continuous) hU hf
  

Proof state:
case intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V✝ : Set (β × β)
f : C(α, β)
hK : IsCompact K
U : Set β
hU : IsOpen U
hf : f ∈ CompactOpen.gen K U
V : Set (β × β)
hV₁ : V ∈ 𝓤 β
hV₂ : IsOpen V
hV₃ : ∀ x ∈ ⇑f '' K, ball x V ⊆ U
⊢ ∃ V ∈ 𝓤 β, IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U

Next tactic:
refine' ⟨V, hV₁, hV₂, _⟩
/-- Any point of `ContinuousMap.CompactOpen.gen K U` is also an interior point wrt the topology of
compact convergence.

The topology of compact convergence is thus at least as fine as the compact-open topology. -/
theorem compactConvNhd_subset_compactOpen (hK : IsCompact K) {U : Set β} (hU : IsOpen U)
    (hf : f ∈ CompactOpen.gen K U) :
    ∃ V ∈ 𝓤 β, IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U := by
  obtain ⟨V, hV₁, hV₂, hV₃⟩ := lebesgue_number_of_compact_open (hK.image f.continuous) hU hf
  refine' ⟨V, hV₁, hV₂, _⟩
  

Proof state:
case intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V✝ : Set (β × β)
f : C(α, β)
hK : IsCompact K
U : Set β
hU : IsOpen U
hf : f ∈ CompactOpen.gen K U
V : Set (β × β)
hV₁ : V ∈ 𝓤 β
hV₂ : IsOpen V
hV₃ : ∀ x ∈ ⇑f '' K, ball x V ⊆ U
⊢ compactConvNhd K V f ⊆ CompactOpen.gen K U

Next tactic:
rintro g hg _ ⟨x, hx, rfl⟩
/-- Any point of `ContinuousMap.CompactOpen.gen K U` is also an interior point wrt the topology of
compact convergence.

The topology of compact convergence is thus at least as fine as the compact-open topology. -/
theorem compactConvNhd_subset_compactOpen (hK : IsCompact K) {U : Set β} (hU : IsOpen U)
    (hf : f ∈ CompactOpen.gen K U) :
    ∃ V ∈ 𝓤 β, IsOpen V ∧ compactConvNhd K V f ⊆ CompactOpen.gen K U := by
  obtain ⟨V, hV₁, hV₂, hV₃⟩ := lebesgue_number_of_compact_open (hK.image f.continuous) hU hf
  refine' ⟨V, hV₁, hV₂, _⟩
  rintro g hg _ ⟨x, hx, rfl⟩
  

Proof state:
case intro.intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V✝ : Set (β × β)
f : C(α, β)
hK : IsCompact K
U : Set β
hU : IsOpen U
hf : f ∈ CompactOpen.gen K U
V : Set (β × β)
hV₁ : V ∈ 𝓤 β
hV₂ : IsOpen V
hV₃ : ∀ x ∈ ⇑f '' K, ball x V ⊆ U
g : C(α, β)
hg : g ∈ compactConvNhd K V f
x : α
hx : x ∈ K
⊢ g x ∈ U

Next tactic:
exact hV₃ (f x) ⟨x, hx, rfl⟩ (hg x hx)
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  

Proof state:
case intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    intro x hx
    simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]
    exact ⟨(⟨x, hx⟩ : K), by simp [hx, mem_ball_self (f x) hZ₁]⟩
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
⊢ K ⊆ ⋃ x, U ↑x

Next tactic:
intro x hx
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    intro x hx
    

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
x : α
hx : x ∈ K
⊢ x ∈ ⋃ x, U ↑x

Next tactic:
simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    intro x hx
    simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]
    

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
x : α
hx : x ∈ K
⊢ ∃ i ∈ K, f x ∈ ball (f i) Z

Next tactic:
exact ⟨(⟨x, hx⟩ : K), by simp [hx, mem_ball_self (f x) hZ₁]⟩
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    intro x hx
    simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]
    exact ⟨(⟨x, hx⟩ : K), by 

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
x : α
hx : x ∈ K
⊢ ↑{ val := x, property := hx } ∈ K ∧ f x ∈ ball (f ↑{ val := x, property := hx }) Z

Next tactic:
simp [hx, mem_ball_self (f x) hZ₁]
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    intro x hx
    simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]
    exact ⟨(⟨x, hx⟩ : K), by simp [hx, mem_ball_self (f x) hZ₁]⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
hUK : K ⊆ ⋃ x, U ↑x
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
obtain ⟨t, ht⟩ := hK.elim_finite_subcover _ (fun x : K => hU x.val) hUK
/-- The point `f` in `ContinuousMap.compactConvNhd K V f` is also an interior point wrt the
compact-open topology.

Since `ContinuousMap.compactConvNhd K V f` are a neighbourhood basis at `f` for each `f`, it follows
that the compact-open topology is at least as fine as the topology of compact convergence. -/
theorem iInter_compactOpen_gen_subset_compactConvNhd (hK : IsCompact K) (hV : V ∈ 𝓤 β) :
    ∃ (ι : Sort (u₁ + 1)) (_ : Fintype ι) (C : ι → Set α) (_hC : ∀ i, IsCompact (C i))
      (U : ι → Set β) (_hU : ∀ i, IsOpen (U i)),
      (f ∈ ⋂ i, CompactOpen.gen (C i) (U i)) ∧
        ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f := by
  obtain ⟨W, hW₁, hW₄, hW₂, hW₃⟩ := comp_open_symm_mem_uniformity_sets hV
  obtain ⟨Z, hZ₁, hZ₄, hZ₂, hZ₃⟩ := comp_open_symm_mem_uniformity_sets hW₁
  let U : α → Set α := fun x => f ⁻¹' ball (f x) Z
  have hU : ∀ x, IsOpen (U x) := fun x => f.continuous.isOpen_preimage _ (isOpen_ball _ hZ₄)
  have hUK : K ⊆ ⋃ x : K, U (x : K) := by
    intro x hx
    simp only [exists_prop, mem_iUnion, iUnion_coe_set, mem_preimage]
    exact ⟨(⟨x, hx⟩ : K), by simp [hx, mem_ball_self (f x) hZ₁]⟩
  obtain ⟨t, ht⟩ := hK.elim_finite_subcover _ (fun x : K => hU x.val) hUK
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
hK : IsCompact K
hV : V ∈ 𝓤 β
W : Set (β × β)
hW₁ : W ∈ 𝓤 β
hW₄ : IsOpen W
hW₂ : SymmetricRel W
hW₃ : W ○ W ⊆ V
Z : Set (β × β)
hZ₁ : Z ∈ 𝓤 β
hZ₄ : IsOpen Z
hZ₂ : SymmetricRel Z
hZ₃ : Z ○ Z ⊆ W
U : α → Set α := fun x => ⇑f ⁻¹' ball (f x) Z
hU : ∀ (x : α), IsOpen (U x)
hUK : K ⊆ ⋃ x, U ↑x
t : Finset ↑K
ht : K ⊆ ⋃ i ∈ t, U ↑i
⊢ ∃ ι x C,
    ∃ (_ : ∀ (i : ι), IsCompact (C i)),
      ∃ U,
        ∃ (_ : ∀ (i : ι), IsOpen (U i)),
          f ∈ ⋂ i, CompactOpen.gen (C i) (U i) ∧ ⋂ i, CompactOpen.gen (C i) (U i) ⊆ compactConvNhd K V f

Next tactic:
let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))