l3lab/ntp-mathlib huggingface dataset:
/-- 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
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := 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)
hUK : K ⊆ ⋃ x, U ↑x
t : Finset ↑K
ht : K ⊆ ⋃ i ∈ t, U ↑i
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
⊢ closure (ball (f x) Z) ⊆ ball (f x) W

Next tactic:
intro y hy
/-- 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
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      

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)
hUK : K ⊆ ⋃ x, U ↑x
t : Finset ↑K
ht : K ⊆ ⋃ i ∈ t, U ↑i
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
y : β
hy : y ∈ closure (ball (f x) Z)
⊢ y ∈ ball (f x) W

Next tactic:
obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy 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₁]⟩
  obtain ⟨t, ht⟩ := hK.elim_finite_subcover _ (fun x : K => hU x.val) hUK
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁
      

Proof state:
case 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
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
y : β
hy : y ∈ closure (ball (f x) Z)
z : β
hz₁ : z ∈ ball y Z
hz₂ : z ∈ ball (f x) Z
⊢ y ∈ ball (f x) W

Next tactic:
exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp 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₁]⟩
  obtain ⟨t, ht⟩ := hK.elim_finite_subcover _ (fun x : K => hU x.val) hUK
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁
      exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))
    

Proof state:
case mk.mk
α : 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
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
hZW : closure (ball (f x) Z) ⊆ ball (f x) W
⊢ ⇑f '' (K ∩ closure (⇑f ⁻¹' ball (f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) Z)) ⊆
    ball (f ↑↑{ val := { val := x, property := hx₁ }, property := hx₂ }) W

Next tactic:
calc
      f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)
      _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure
      _ ⊆ closure (ball (f x) Z) := by
        apply closure_mono
        simp only [image_subset_iff]
        rfl
      _ ⊆ ball (f x) W := hZW
/-- 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
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁
      exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))
    calc
      f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)
      _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure
      _ ⊆ closure (ball (f x) Z) := 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)
hUK : K ⊆ ⋃ x, U ↑x
t : Finset ↑K
ht : K ⊆ ⋃ i ∈ t, U ↑i
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
hZW : closure (ball (f x) Z) ⊆ ball (f x) W
⊢ closure (⇑f '' U x) ⊆ closure (ball (f x) Z)

Next tactic:
apply closure_mono
/-- 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
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁
      exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))
    calc
      f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)
      _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure
      _ ⊆ closure (ball (f x) Z) := by
        apply closure_mono
        

Proof state:
case h
α : 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
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
hZW : closure (ball (f x) Z) ⊆ ball (f x) W
⊢ ⇑f '' U x ⊆ ball (f x) Z

Next tactic:
simp only [image_subset_iff]
/-- 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
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁
      exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))
    calc
      f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)
      _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure
      _ ⊆ closure (ball (f x) Z) := by
        apply closure_mono
        simp only [image_subset_iff]
        

Proof state:
case h
α : 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
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
x : α
hx₁ : x ∈ K
hx₂ : { val := x, property := hx₁ } ∈ t
hZW : closure (ball (f x) Z) ⊆ ball (f x) W
⊢ ⇑f ⁻¹' ball (f x) Z ⊆ ⇑f ⁻¹' ball (f x) Z

Next tactic:
rfl
/-- 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
  let C : t → Set α := fun i => K ∩ closure (U ((i : K) : α))
  have hC : K ⊆ ⋃ i, C i := by
    rw [← K.inter_iUnion, subset_inter_iff]
    refine' ⟨Subset.rfl, ht.trans _⟩
    simp only [SetCoe.forall, Subtype.coe_mk, iUnion_subset_iff]
    exact fun x hx₁ hx₂ => subset_iUnion_of_subset (⟨_, hx₂⟩ : t) (by simp [subset_closure])
  have hfC : ∀ i : t, C i ⊆ f ⁻¹' ball (f ((i : K) : α)) W := by
    simp only [← image_subset_iff, ← mem_preimage]
    rintro ⟨⟨x, hx₁⟩, hx₂⟩
    have hZW : closure (ball (f x) Z) ⊆ ball (f x) W := by
      intro y hy
      obtain ⟨z, hz₁, hz₂⟩ := UniformSpace.mem_closure_iff_ball.mp hy hZ₁
      exact ball_mono hZ₃ _ (mem_ball_comp hz₂ ((mem_ball_symmetry hZ₂).mp hz₁))
    calc
      f '' (K ∩ closure (U x)) ⊆ f '' closure (U x) := image_subset _ (inter_subset_right _ _)
      _ ⊆ closure (f '' U x) := f.continuous.continuousOn.image_closure
      _ ⊆ closure (ball (f x) Z) := by
        apply closure_mono
        simp only [image_subset_iff]
        rfl
      _ ⊆ ball (f x) W := hZW

  refine'
    ⟨t, t.fintypeCoeSort, C, fun i => hK.inter_right isClosed_closure, fun i =>
      ball (f ((i : K) : α)) W, fun i => isOpen_ball _ hW₄, 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)
hUK : K ⊆ ⋃ x, U ↑x
t : Finset ↑K
ht : K ⊆ ⋃ i ∈ t, U ↑i
C : { x // x ∈ t } → Set α := fun i => K ∩ closure (U ↑↑i)
hC : K ⊆ ⋃ i, C i
hfC : ∀ (i : { x // x ∈ t }), C i ⊆ ⇑f ⁻¹' ball (f ↑↑i) W
⊢ f ∈ ⋂ i, CompactOpen.gen (C i) ((fun i => ball (f ↑↑i) W) i)

Next tactic:
simp [CompactOpen.gen, hfC]
/-- The compact-open topology is equal to the compact-convergence topology. -/
theorem compactOpen_eq_compactConvergence :
    ContinuousMap.compactOpen = (compactConvergenceTopology : TopologicalSpace C(α, β)) := by
  

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
⊢ compactOpen = compactConvergenceTopology

Next tactic:
rw [compactConvergenceTopology, ContinuousMap.compactOpen]
/-- The compact-open topology is equal to the compact-convergence topology. -/
theorem compactOpen_eq_compactConvergence :
    ContinuousMap.compactOpen = (compactConvergenceTopology : TopologicalSpace C(α, β)) := by
  rw [compactConvergenceTopology, ContinuousMap.compactOpen]
  

Proof state:
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
⊢ TopologicalSpace.generateFrom {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u} =
    TopologicalSpace.mkOfNhds fun f => FilterBasis.filter (compactConvergenceFilterBasis f)

Next tactic:
refine' le_antisymm _ _
/-- The compact-open topology is equal to the compact-convergence topology. -/
theorem compactOpen_eq_compactConvergence :
    ContinuousMap.compactOpen = (compactConvergenceTopology : TopologicalSpace C(α, β)) := by
  rw [compactConvergenceTopology, ContinuousMap.compactOpen]
  refine' le_antisymm _ _
  · 

Proof state:
case refine'_1
α : Type u₁
β : Type u₂
inst✝¹ : TopologicalSpace α
inst✝ : UniformSpace β
K : Set α
V : Set (β × β)
f : C(α, β)
⊢ TopologicalSpace.generateFrom {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u} ≤
    TopologicalSpace.mkOfNhds fun f => FilterBasis.filter (compactConvergenceFilterBasis f)

Next tactic:
refine' fun X hX => isOpen_iff_forall_mem_open.mpr fun f hf => _