l3lab/ntp-mathlib huggingface dataset:
/-- Composition is a continuous map from `C(α, β) × C(β, γ)` to `C(α, γ)`, provided that `β` is
  locally compact. This is Prop. 9 of Chap. X, §3, №. 4 of Bourbaki's *Topologie Générale*. -/
theorem continuous_comp' [LocallyCompactSpace β] :
    Continuous fun x : C(α, β) × C(β, γ) => x.2.comp x.1 :=
  continuous_generateFrom
    (by
      rintro M ⟨K, hK, U, hU, rfl⟩
      conv =>
        congr
        rw [CompactOpen.gen, preimage_setOf_eq]
        --congr
        ext; dsimp [setOf]
        rw [image_comp, image_subset_iff]
      rw [isOpen_iff_forall_mem_open]
      rintro ⟨φ₀, ψ₀⟩ H
      obtain ⟨L, hL, hKL, hLU⟩ := exists_compact_between (hK.image φ₀.2) (hU.preimage ψ₀.2) H
      use { φ : C(α, β) | φ '' K ⊆ interior L } ×ˢ { ψ : C(β, γ) | ψ '' L ⊆ U }
      -- porting note: typing hint `: φ '' K ⊆ interior L` wasn't previously required
      

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
g : C(β, γ)
f : C(α, β)
inst✝ : LocallyCompactSpace β
K : Set α
hK : IsCompact K
U : Set γ
hU : IsOpen U
φ₀ : C(α, β)
ψ₀ : C(β, γ)
H : (φ₀, ψ₀) ∈ fun x => ⇑x.1 '' K ⊆ ⇑x.2 ⁻¹' U
L : Set β
hL : IsCompact L
hKL : φ₀.toFun '' K ⊆ interior L
hLU : L ⊆ ψ₀.toFun ⁻¹' U
⊢ ({φ | ⇑φ '' K ⊆ interior L} ×ˢ {ψ | ⇑ψ '' L ⊆ U} ⊆ fun x => ⇑x.1 '' K ⊆ ⇑x.2 ⁻¹' U) ∧
    IsOpen ({φ | ⇑φ '' K ⊆ interior L} ×ˢ {ψ | ⇑ψ '' L ⊆ U}) ∧
      (φ₀, ψ₀) ∈ {φ | ⇑φ '' K ⊆ interior L} ×ˢ {ψ | ⇑ψ '' L ⊆ U}

Next tactic:
use fun ⟨φ, ψ⟩ ⟨(hφ : φ '' K ⊆ interior L), hψ⟩ =>
        subset_trans hφ (interior_subset.trans <| image_subset_iff.mp hψ)
/-- Composition is a continuous map from `C(α, β) × C(β, γ)` to `C(α, γ)`, provided that `β` is
  locally compact. This is Prop. 9 of Chap. X, §3, №. 4 of Bourbaki's *Topologie Générale*. -/
theorem continuous_comp' [LocallyCompactSpace β] :
    Continuous fun x : C(α, β) × C(β, γ) => x.2.comp x.1 :=
  continuous_generateFrom
    (by
      rintro M ⟨K, hK, U, hU, rfl⟩
      conv =>
        congr
        rw [CompactOpen.gen, preimage_setOf_eq]
        --congr
        ext; dsimp [setOf]
        rw [image_comp, image_subset_iff]
      rw [isOpen_iff_forall_mem_open]
      rintro ⟨φ₀, ψ₀⟩ H
      obtain ⟨L, hL, hKL, hLU⟩ := exists_compact_between (hK.image φ₀.2) (hU.preimage ψ₀.2) H
      use { φ : C(α, β) | φ '' K ⊆ interior L } ×ˢ { ψ : C(β, γ) | ψ '' L ⊆ U }
      -- porting note: typing hint `: φ '' K ⊆ interior L` wasn't previously required
      use fun ⟨φ, ψ⟩ ⟨(hφ : φ '' K ⊆ interior L), hψ⟩ =>
        subset_trans hφ (interior_subset.trans <| image_subset_iff.mp hψ)
      

Proof state:
case right
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
g : C(β, γ)
f : C(α, β)
inst✝ : LocallyCompactSpace β
K : Set α
hK : IsCompact K
U : Set γ
hU : IsOpen U
φ₀ : C(α, β)
ψ₀ : C(β, γ)
H : (φ₀, ψ₀) ∈ fun x => ⇑x.1 '' K ⊆ ⇑x.2 ⁻¹' U
L : Set β
hL : IsCompact L
hKL : φ₀.toFun '' K ⊆ interior L
hLU : L ⊆ ψ₀.toFun ⁻¹' U
⊢ IsOpen ({φ | ⇑φ '' K ⊆ interior L} ×ˢ {ψ | ⇑ψ '' L ⊆ U}) ∧ (φ₀, ψ₀) ∈ {φ | ⇑φ '' K ⊆ interior L} ×ˢ {ψ | ⇑ψ '' L ⊆ U}

Next tactic:
use (ContinuousMap.isOpen_gen hK isOpen_interior).prod (ContinuousMap.isOpen_gen hL hU)
/-- Composition is a continuous map from `C(α, β) × C(β, γ)` to `C(α, γ)`, provided that `β` is
  locally compact. This is Prop. 9 of Chap. X, §3, №. 4 of Bourbaki's *Topologie Générale*. -/
theorem continuous_comp' [LocallyCompactSpace β] :
    Continuous fun x : C(α, β) × C(β, γ) => x.2.comp x.1 :=
  continuous_generateFrom
    (by
      rintro M ⟨K, hK, U, hU, rfl⟩
      conv =>
        congr
        rw [CompactOpen.gen, preimage_setOf_eq]
        --congr
        ext; dsimp [setOf]
        rw [image_comp, image_subset_iff]
      rw [isOpen_iff_forall_mem_open]
      rintro ⟨φ₀, ψ₀⟩ H
      obtain ⟨L, hL, hKL, hLU⟩ := exists_compact_between (hK.image φ₀.2) (hU.preimage ψ₀.2) H
      use { φ : C(α, β) | φ '' K ⊆ interior L } ×ˢ { ψ : C(β, γ) | ψ '' L ⊆ U }
      -- porting note: typing hint `: φ '' K ⊆ interior L` wasn't previously required
      use fun ⟨φ, ψ⟩ ⟨(hφ : φ '' K ⊆ interior L), hψ⟩ =>
        subset_trans hφ (interior_subset.trans <| image_subset_iff.mp hψ)
      use (ContinuousMap.isOpen_gen hK isOpen_interior).prod (ContinuousMap.isOpen_gen hL hU)
      

Proof state:
case right
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
g : C(β, γ)
f : C(α, β)
inst✝ : LocallyCompactSpace β
K : Set α
hK : IsCompact K
U : Set γ
hU : IsOpen U
φ₀ : C(α, β)
ψ₀ : C(β, γ)
H : (φ₀, ψ₀) ∈ fun x => ⇑x.1 '' K ⊆ ⇑x.2 ⁻¹' U
L : Set β
hL : IsCompact L
hKL : φ₀.toFun '' K ⊆ interior L
hLU : L ⊆ ψ₀.toFun ⁻¹' U
⊢ (φ₀, ψ₀) ∈ {φ | ⇑φ '' K ⊆ interior L} ×ˢ {ψ | ⇑ψ '' L ⊆ U}

Next tactic:
exact mem_prod.mpr ⟨hKL, image_subset_iff.mpr hLU⟩
/-- The evaluation map `C(α, β) × α → β` is continuous if `α` is locally compact.

See also `ContinuousMap.continuous_eval` -/
theorem continuous_eval' [LocallyCompactSpace α] : Continuous fun p : C(α, β) × α => p.1 p.2 :=
  continuous_iff_continuousAt.mpr fun ⟨f, x⟩ n hn =>
    let ⟨v, vn, vo, fxv⟩ := mem_nhds_iff.mp hn
    have : v ∈ 𝓝 (f x) := IsOpen.mem_nhds vo fxv
    let ⟨s, hs, sv, sc⟩ :=
      LocallyCompactSpace.local_compact_nhds x (f ⁻¹' v) (f.continuous.tendsto x this)
    let ⟨u, us, uo, xu⟩ := mem_nhds_iff.mp hs
    show (fun p : C(α, β) × α => p.1 p.2) ⁻¹' n ∈ 𝓝 (f, x) from
      let w := CompactOpen.gen s v ×ˢ u
      have : w ⊆ (fun p : C(α, β) × α => p.1 p.2) ⁻¹' n := fun ⟨f', x'⟩ ⟨hf', hx'⟩ =>
        vn <| hf' <| mem_image_of_mem f' (us hx')
        --Porting note: The following `calc` block fails here.
        --calc
        --  f' x' ∈ f' '' s := mem_image_of_mem f' (us hx')
        --  _ ⊆ v := hf'
        --  _ ⊆ n := vn

      have : IsOpen w := (ContinuousMap.isOpen_gen sc vo).prod uo
      have : (f, x) ∈ w := ⟨image_subset_iff.mpr sv, xu⟩
      mem_nhds_iff.mpr ⟨w, by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : LocallyCompactSpace α
x✝ : C(α, β) × α
n : Set β
f : C(α, β)
x : α
hn : n ∈ 𝓝 ((f, x).1 (f, x).2)
v : Set β
vn : v ⊆ n
vo : IsOpen v
fxv : (f, x).1 (f, x).2 ∈ v
this✝² : v ∈ 𝓝 (f x)
s : Set α
hs : s ∈ 𝓝 x
sv : s ⊆ ⇑f ⁻¹' v
sc : IsCompact s
u : Set α
us : u ⊆ s
uo : IsOpen u
xu : x ∈ u
w : Set (C(α, β) × α) := CompactOpen.gen s v ×ˢ u
this✝¹ : w ⊆ (fun p => p.1 p.2) ⁻¹' n
this✝ : IsOpen w
this : (f, x) ∈ w
⊢ w ⊆ (fun p => p.1 p.2) ⁻¹' n

Next tactic:
assumption
/-- The evaluation map `C(α, β) × α → β` is continuous if `α` is locally compact.

See also `ContinuousMap.continuous_eval` -/
theorem continuous_eval' [LocallyCompactSpace α] : Continuous fun p : C(α, β) × α => p.1 p.2 :=
  continuous_iff_continuousAt.mpr fun ⟨f, x⟩ n hn =>
    let ⟨v, vn, vo, fxv⟩ := mem_nhds_iff.mp hn
    have : v ∈ 𝓝 (f x) := IsOpen.mem_nhds vo fxv
    let ⟨s, hs, sv, sc⟩ :=
      LocallyCompactSpace.local_compact_nhds x (f ⁻¹' v) (f.continuous.tendsto x this)
    let ⟨u, us, uo, xu⟩ := mem_nhds_iff.mp hs
    show (fun p : C(α, β) × α => p.1 p.2) ⁻¹' n ∈ 𝓝 (f, x) from
      let w := CompactOpen.gen s v ×ˢ u
      have : w ⊆ (fun p : C(α, β) × α => p.1 p.2) ⁻¹' n := fun ⟨f', x'⟩ ⟨hf', hx'⟩ =>
        vn <| hf' <| mem_image_of_mem f' (us hx')
        --Porting note: The following `calc` block fails here.
        --calc
        --  f' x' ∈ f' '' s := mem_image_of_mem f' (us hx')
        --  _ ⊆ v := hf'
        --  _ ⊆ n := vn

      have : IsOpen w := (ContinuousMap.isOpen_gen sc vo).prod uo
      have : (f, x) ∈ w := ⟨image_subset_iff.mpr sv, xu⟩
      mem_nhds_iff.mpr ⟨w, by assumption, by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : LocallyCompactSpace α
x✝ : C(α, β) × α
n : Set β
f : C(α, β)
x : α
hn : n ∈ 𝓝 ((f, x).1 (f, x).2)
v : Set β
vn : v ⊆ n
vo : IsOpen v
fxv : (f, x).1 (f, x).2 ∈ v
this✝² : v ∈ 𝓝 (f x)
s : Set α
hs : s ∈ 𝓝 x
sv : s ⊆ ⇑f ⁻¹' v
sc : IsCompact s
u : Set α
us : u ⊆ s
uo : IsOpen u
xu : x ∈ u
w : Set (C(α, β) × α) := CompactOpen.gen s v ×ˢ u
this✝¹ : w ⊆ (fun p => p.1 p.2) ⁻¹' n
this✝ : IsOpen w
this : (f, x) ∈ w
⊢ IsOpen w

Next tactic:
assumption
/-- The evaluation map `C(α, β) × α → β` is continuous if `α` is locally compact.

See also `ContinuousMap.continuous_eval` -/
theorem continuous_eval' [LocallyCompactSpace α] : Continuous fun p : C(α, β) × α => p.1 p.2 :=
  continuous_iff_continuousAt.mpr fun ⟨f, x⟩ n hn =>
    let ⟨v, vn, vo, fxv⟩ := mem_nhds_iff.mp hn
    have : v ∈ 𝓝 (f x) := IsOpen.mem_nhds vo fxv
    let ⟨s, hs, sv, sc⟩ :=
      LocallyCompactSpace.local_compact_nhds x (f ⁻¹' v) (f.continuous.tendsto x this)
    let ⟨u, us, uo, xu⟩ := mem_nhds_iff.mp hs
    show (fun p : C(α, β) × α => p.1 p.2) ⁻¹' n ∈ 𝓝 (f, x) from
      let w := CompactOpen.gen s v ×ˢ u
      have : w ⊆ (fun p : C(α, β) × α => p.1 p.2) ⁻¹' n := fun ⟨f', x'⟩ ⟨hf', hx'⟩ =>
        vn <| hf' <| mem_image_of_mem f' (us hx')
        --Porting note: The following `calc` block fails here.
        --calc
        --  f' x' ∈ f' '' s := mem_image_of_mem f' (us hx')
        --  _ ⊆ v := hf'
        --  _ ⊆ n := vn

      have : IsOpen w := (ContinuousMap.isOpen_gen sc vo).prod uo
      have : (f, x) ∈ w := ⟨image_subset_iff.mpr sv, xu⟩
      mem_nhds_iff.mpr ⟨w, by assumption, by assumption, by 

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : LocallyCompactSpace α
x✝ : C(α, β) × α
n : Set β
f : C(α, β)
x : α
hn : n ∈ 𝓝 ((f, x).1 (f, x).2)
v : Set β
vn : v ⊆ n
vo : IsOpen v
fxv : (f, x).1 (f, x).2 ∈ v
this✝² : v ∈ 𝓝 (f x)
s : Set α
hs : s ∈ 𝓝 x
sv : s ⊆ ⇑f ⁻¹' v
sc : IsCompact s
u : Set α
us : u ⊆ s
uo : IsOpen u
xu : x ∈ u
w : Set (C(α, β) × α) := CompactOpen.gen s v ×ˢ u
this✝¹ : w ⊆ (fun p => p.1 p.2) ⁻¹' n
this✝ : IsOpen w
this : (f, x) ∈ w
⊢ (f, x) ∈ w

Next tactic:
assumption
/-- Evaluation of a continuous map `f` at a point `a` is continuous in `f`.

Porting note: merged `continuous_eval_const` with `continuous_eval_const'` removing unneeded
assumptions. -/
@[continuity]
theorem continuous_eval_const (a : α) :
    Continuous fun f : C(α, β) => f a := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
a : α
⊢ Continuous fun f => f a

Next tactic:
refine continuous_def.2 fun U hU ↦ ?_
/-- Evaluation of a continuous map `f` at a point `a` is continuous in `f`.

Porting note: merged `continuous_eval_const` with `continuous_eval_const'` removing unneeded
assumptions. -/
@[continuity]
theorem continuous_eval_const (a : α) :
    Continuous fun f : C(α, β) => f a := by
  refine continuous_def.2 fun U hU ↦ ?_
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
a : α
U : Set β
hU : IsOpen U
⊢ IsOpen ((fun f => f a) ⁻¹' U)

Next tactic:
convert ContinuousMap.isOpen_gen (isCompact_singleton (x := a)) hU using 1
/-- Evaluation of a continuous map `f` at a point `a` is continuous in `f`.

Porting note: merged `continuous_eval_const` with `continuous_eval_const'` removing unneeded
assumptions. -/
@[continuity]
theorem continuous_eval_const (a : α) :
    Continuous fun f : C(α, β) => f a := by
  refine continuous_def.2 fun U hU ↦ ?_
  convert ContinuousMap.isOpen_gen (isCompact_singleton (x := a)) hU using 1
  

Proof state:
case h.e'_3
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
a : α
U : Set β
hU : IsOpen U
⊢ (fun f => f a) ⁻¹' U = CompactOpen.gen {a} U

Next tactic:
ext
/-- Evaluation of a continuous map `f` at a point `a` is continuous in `f`.

Porting note: merged `continuous_eval_const` with `continuous_eval_const'` removing unneeded
assumptions. -/
@[continuity]
theorem continuous_eval_const (a : α) :
    Continuous fun f : C(α, β) => f a := by
  refine continuous_def.2 fun U hU ↦ ?_
  convert ContinuousMap.isOpen_gen (isCompact_singleton (x := a)) hU using 1
  ext; 

Proof state:
case h.e'_3.h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
a : α
U : Set β
hU : IsOpen U
x✝ : C(α, β)
⊢ x✝ ∈ (fun f => f a) ⁻¹' U ↔ x✝ ∈ CompactOpen.gen {a} U

Next tactic:
simp [CompactOpen.gen]
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
⊢ compactOpen ≤ TopologicalSpace.induced (restrict s) compactOpen

Next tactic:
simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
⊢ TopologicalSpace.generateFrom {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u} ≤
    TopologicalSpace.generateFrom
      (preimage (restrict s) '' {m | ∃ s_1, ∃ (_ : IsCompact s_1), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s_1 u})

Next tactic:
apply TopologicalSpace.generateFrom_anti
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
  apply TopologicalSpace.generateFrom_anti
  

Proof state:
case h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
⊢ preimage (restrict s) '' {m | ∃ s_1, ∃ (_ : IsCompact s_1), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s_1 u} ⊆
    {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u}

Next tactic:
rintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
  apply TopologicalSpace.generateFrom_anti
  rintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩
  

Proof state:
case h.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
⊢ restrict s ⁻¹' CompactOpen.gen c u ∈ {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u}

Next tactic:
refine' ⟨(↑) '' c, hc.image continuous_subtype_val, u, hu, _⟩
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
  apply TopologicalSpace.generateFrom_anti
  rintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩
  refine' ⟨(↑) '' c, hc.image continuous_subtype_val, u, hu, _⟩
  

Proof state:
case h.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
⊢ restrict s ⁻¹' CompactOpen.gen c u = CompactOpen.gen (Subtype.val '' c) u

Next tactic:
ext f
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
  apply TopologicalSpace.generateFrom_anti
  rintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩
  refine' ⟨(↑) '' c, hc.image continuous_subtype_val, u, hu, _⟩
  ext f
  

Proof state:
case h.intro.intro.intro.intro.intro.intro.h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
f : C(α, β)
⊢ f ∈ restrict s ⁻¹' CompactOpen.gen c u ↔ f ∈ CompactOpen.gen (Subtype.val '' c) u

Next tactic:
simp only [CompactOpen.gen, mem_setOf_eq, mem_preimage, ContinuousMap.coe_restrict]
theorem compactOpen_le_induced (s : Set α) :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) ≤
      TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  simp only [induced_generateFrom_eq, ContinuousMap.compactOpen]
  apply TopologicalSpace.generateFrom_anti
  rintro b ⟨a, ⟨c, hc, u, hu, rfl⟩, rfl⟩
  refine' ⟨(↑) '' c, hc.image continuous_subtype_val, u, hu, _⟩
  ext f
  simp only [CompactOpen.gen, mem_setOf_eq, mem_preimage, ContinuousMap.coe_restrict]
  

Proof state:
case h.intro.intro.intro.intro.intro.intro.h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
s : Set α
c : Set ↑s
hc : IsCompact c
u : Set β
hu : IsOpen u
f : C(α, β)
⊢ (fun a => (⇑f ∘ Subtype.val) a) '' c ⊆ u ↔ ⇑f '' (Subtype.val '' c) ⊆ u

Next tactic:
rw [image_comp f ((↑) : s → α)]
/-- The compact-open topology on `C(α, β)` is equal to the infimum of the compact-open topologies
on `C(s, β)` for `s` a compact subset of `α`.  The key point of the proof is that the union of the
compact subsets of `α` is equal to the union of compact subsets of the compact subsets of `α`. -/
theorem compactOpen_eq_sInf_induced :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) =
      ⨅ (s : Set α) (_ : IsCompact s),
        TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  

Proof state:
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
⊢ compactOpen = ⨅ s, ⨅ (_ : IsCompact s), TopologicalSpace.induced (restrict s) compactOpen

Next tactic:
refine' le_antisymm _ _
/-- The compact-open topology on `C(α, β)` is equal to the infimum of the compact-open topologies
on `C(s, β)` for `s` a compact subset of `α`.  The key point of the proof is that the union of the
compact subsets of `α` is equal to the union of compact subsets of the compact subsets of `α`. -/
theorem compactOpen_eq_sInf_induced :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) =
      ⨅ (s : Set α) (_ : IsCompact s),
        TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  refine' le_antisymm _ _
  · 

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
⊢ compactOpen ≤ ⨅ s, ⨅ (_ : IsCompact s), TopologicalSpace.induced (restrict s) compactOpen

Next tactic:
refine' le_iInf₂ _
/-- The compact-open topology on `C(α, β)` is equal to the infimum of the compact-open topologies
on `C(s, β)` for `s` a compact subset of `α`.  The key point of the proof is that the union of the
compact subsets of `α` is equal to the union of compact subsets of the compact subsets of `α`. -/
theorem compactOpen_eq_sInf_induced :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) =
      ⨅ (s : Set α) (_ : IsCompact s),
        TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  refine' le_antisymm _ _
  · refine' le_iInf₂ _
    

Proof state:
case refine'_1
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
⊢ ∀ (i : Set α), IsCompact i → compactOpen ≤ TopologicalSpace.induced (restrict i) compactOpen

Next tactic:
exact fun s _ => compactOpen_le_induced s
/-- The compact-open topology on `C(α, β)` is equal to the infimum of the compact-open topologies
on `C(s, β)` for `s` a compact subset of `α`.  The key point of the proof is that the union of the
compact subsets of `α` is equal to the union of compact subsets of the compact subsets of `α`. -/
theorem compactOpen_eq_sInf_induced :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) =
      ⨅ (s : Set α) (_ : IsCompact s),
        TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  refine' le_antisymm _ _
  · refine' le_iInf₂ _
    exact fun s _ => compactOpen_le_induced s
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
⊢ ⨅ s, ⨅ (_ : IsCompact s), TopologicalSpace.induced (restrict s) compactOpen ≤ compactOpen

Next tactic:
simp only [← generateFrom_iUnion, induced_generateFrom_eq, ContinuousMap.compactOpen]
/-- The compact-open topology on `C(α, β)` is equal to the infimum of the compact-open topologies
on `C(s, β)` for `s` a compact subset of `α`.  The key point of the proof is that the union of the
compact subsets of `α` is equal to the union of compact subsets of the compact subsets of `α`. -/
theorem compactOpen_eq_sInf_induced :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) =
      ⨅ (s : Set α) (_ : IsCompact s),
        TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  refine' le_antisymm _ _
  · refine' le_iInf₂ _
    exact fun s _ => compactOpen_le_induced s
  simp only [← generateFrom_iUnion, induced_generateFrom_eq, ContinuousMap.compactOpen]
  

Proof state:
case refine'_2
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
⊢ TopologicalSpace.generateFrom
      (⋃ i,
        ⋃ (_ : IsCompact i),
          preimage (restrict i) '' {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u}) ≤
    TopologicalSpace.generateFrom {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u}

Next tactic:
apply TopologicalSpace.generateFrom_anti
/-- The compact-open topology on `C(α, β)` is equal to the infimum of the compact-open topologies
on `C(s, β)` for `s` a compact subset of `α`.  The key point of the proof is that the union of the
compact subsets of `α` is equal to the union of compact subsets of the compact subsets of `α`. -/
theorem compactOpen_eq_sInf_induced :
    (ContinuousMap.compactOpen : TopologicalSpace C(α, β)) =
      ⨅ (s : Set α) (_ : IsCompact s),
        TopologicalSpace.induced (ContinuousMap.restrict s) ContinuousMap.compactOpen := by
  refine' le_antisymm _ _
  · refine' le_iInf₂ _
    exact fun s _ => compactOpen_le_induced s
  simp only [← generateFrom_iUnion, induced_generateFrom_eq, ContinuousMap.compactOpen]
  apply TopologicalSpace.generateFrom_anti
  

Proof state:
case refine'_2.h
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
⊢ {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u} ⊆
    ⋃ i,
      ⋃ (_ : IsCompact i),
        preimage (restrict i) '' {m | ∃ s, ∃ (_ : IsCompact s), ∃ u, ∃ (_ : IsOpen u), m = CompactOpen.gen s u}

Next tactic:
rintro _ ⟨s, hs, u, hu, rfl⟩