l3lab/ntp-mathlib huggingface dataset:
instance : TopologicalSpace (OnePoint X) where
  IsOpen s := (∞ ∈ s → IsCompact (((↑) : X → OnePoint X) ⁻¹' s)ᶜ) ∧
    IsOpen (((↑) : X → OnePoint X) ⁻¹' s)
  isOpen_univ := by simp
  isOpen_inter s t := by
    rintro ⟨hms, hs⟩ ⟨hmt, ht⟩
    refine' ⟨_, hs.inter ht⟩
    rintro ⟨hms', hmt'⟩
    simpa [compl_inter] using (hms hms').union (hmt hmt')
  isOpen_sUnion S ho := by
    suffices IsOpen ((↑) ⁻¹' ⋃₀ S : Set X) by
      refine' ⟨_, this⟩
      rintro ⟨s, hsS : s ∈ S, hs : ∞ ∈ s⟩
      refine' IsCompact.of_isClosed_subset ((ho s hsS).1 hs) this.isClosed_compl _
      

Proof state:
case intro.intro
X : Type u_1
inst✝ : TopologicalSpace X
S : Set (Set (OnePoint X))
ho : ∀ t ∈ S, (fun s => (∞ ∈ s → IsCompact (some ⁻¹' s)ᶜ) ∧ IsOpen (some ⁻¹' s)) t
this : IsOpen (some ⁻¹' ⋃₀ S)
s : Set (OnePoint X)
hsS : s ∈ S
hs : ∞ ∈ s
⊢ (some ⁻¹' ⋃₀ S)ᶜ ⊆ (some ⁻¹' s)ᶜ

Next tactic:
exact compl_subset_compl.mpr (preimage_mono <| subset_sUnion_of_mem hsS)
instance : TopologicalSpace (OnePoint X) where
  IsOpen s := (∞ ∈ s → IsCompact (((↑) : X → OnePoint X) ⁻¹' s)ᶜ) ∧
    IsOpen (((↑) : X → OnePoint X) ⁻¹' s)
  isOpen_univ := by simp
  isOpen_inter s t := by
    rintro ⟨hms, hs⟩ ⟨hmt, ht⟩
    refine' ⟨_, hs.inter ht⟩
    rintro ⟨hms', hmt'⟩
    simpa [compl_inter] using (hms hms').union (hmt hmt')
  isOpen_sUnion S ho := by
    suffices IsOpen ((↑) ⁻¹' ⋃₀ S : Set X) by
      refine' ⟨_, this⟩
      rintro ⟨s, hsS : s ∈ S, hs : ∞ ∈ s⟩
      refine' IsCompact.of_isClosed_subset ((ho s hsS).1 hs) this.isClosed_compl _
      exact compl_subset_compl.mpr (preimage_mono <| subset_sUnion_of_mem hsS)
    

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
S : Set (Set (OnePoint X))
ho : ∀ t ∈ S, (fun s => (∞ ∈ s → IsCompact (some ⁻¹' s)ᶜ) ∧ IsOpen (some ⁻¹' s)) t
⊢ IsOpen (some ⁻¹' ⋃₀ S)

Next tactic:
rw [preimage_sUnion]
instance : TopologicalSpace (OnePoint X) where
  IsOpen s := (∞ ∈ s → IsCompact (((↑) : X → OnePoint X) ⁻¹' s)ᶜ) ∧
    IsOpen (((↑) : X → OnePoint X) ⁻¹' s)
  isOpen_univ := by simp
  isOpen_inter s t := by
    rintro ⟨hms, hs⟩ ⟨hmt, ht⟩
    refine' ⟨_, hs.inter ht⟩
    rintro ⟨hms', hmt'⟩
    simpa [compl_inter] using (hms hms').union (hmt hmt')
  isOpen_sUnion S ho := by
    suffices IsOpen ((↑) ⁻¹' ⋃₀ S : Set X) by
      refine' ⟨_, this⟩
      rintro ⟨s, hsS : s ∈ S, hs : ∞ ∈ s⟩
      refine' IsCompact.of_isClosed_subset ((ho s hsS).1 hs) this.isClosed_compl _
      exact compl_subset_compl.mpr (preimage_mono <| subset_sUnion_of_mem hsS)
    rw [preimage_sUnion]
    

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
S : Set (Set (OnePoint X))
ho : ∀ t ∈ S, (fun s => (∞ ∈ s → IsCompact (some ⁻¹' s)ᶜ) ∧ IsOpen (some ⁻¹' s)) t
⊢ IsOpen (⋃ t ∈ S, some ⁻¹' t)

Next tactic:
exact isOpen_biUnion fun s hs => (ho s hs).2
theorem isOpen_iff_of_mem' (h : ∞ ∈ s) :
    IsOpen s ↔ IsCompact ((↑) ⁻¹' s : Set X)ᶜ ∧ IsOpen ((↑) ⁻¹' s : Set X) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∈ s
⊢ IsOpen s ↔ IsCompact (some ⁻¹' s)ᶜ ∧ IsOpen (some ⁻¹' s)

Next tactic:
simp [isOpen_def, h]
theorem isOpen_iff_of_mem (h : ∞ ∈ s) :
    IsOpen s ↔ IsClosed ((↑) ⁻¹' s : Set X)ᶜ ∧ IsCompact ((↑) ⁻¹' s : Set X)ᶜ := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∈ s
⊢ IsOpen s ↔ IsClosed (some ⁻¹' s)ᶜ ∧ IsCompact (some ⁻¹' s)ᶜ

Next tactic:
simp only [isOpen_iff_of_mem' h, isClosed_compl_iff, and_comm]
theorem isOpen_iff_of_not_mem (h : ∞ ∉ s) : IsOpen s ↔ IsOpen ((↑) ⁻¹' s : Set X) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∉ s
⊢ IsOpen s ↔ IsOpen (some ⁻¹' s)

Next tactic:
simp [isOpen_def, h]
theorem isClosed_iff_of_mem (h : ∞ ∈ s) : IsClosed s ↔ IsClosed ((↑) ⁻¹' s : Set X) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∈ s
⊢ IsClosed s ↔ IsClosed (some ⁻¹' s)

Next tactic:
have : ∞ ∉ sᶜ := fun H => H h
theorem isClosed_iff_of_mem (h : ∞ ∈ s) : IsClosed s ↔ IsClosed ((↑) ⁻¹' s : Set X) := by
  have : ∞ ∉ sᶜ := fun H => H h
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∈ s
this : ∞ ∉ sᶜ
⊢ IsClosed s ↔ IsClosed (some ⁻¹' s)

Next tactic:
rw [← isOpen_compl_iff, isOpen_iff_of_not_mem this, ← isOpen_compl_iff, preimage_compl]
theorem isClosed_iff_of_not_mem (h : ∞ ∉ s) :
    IsClosed s ↔ IsClosed ((↑) ⁻¹' s : Set X) ∧ IsCompact ((↑) ⁻¹' s : Set X) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∉ s
⊢ IsClosed s ↔ IsClosed (some ⁻¹' s) ∧ IsCompact (some ⁻¹' s)

Next tactic:
rw [← isOpen_compl_iff, isOpen_iff_of_mem (mem_compl h), ← preimage_compl, compl_compl]
@[simp]
theorem isOpen_image_coe {s : Set X} : IsOpen ((↑) '' s : Set (OnePoint X)) ↔ IsOpen s := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
⊢ IsOpen (some '' s) ↔ IsOpen s

Next tactic:
rw [isOpen_iff_of_not_mem infty_not_mem_image_coe, preimage_image_eq _ coe_injective]
theorem isOpen_compl_image_coe {s : Set X} :
    IsOpen ((↑) '' s : Set (OnePoint X))ᶜ ↔ IsClosed s ∧ IsCompact s := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
⊢ IsOpen (some '' s)ᶜ ↔ IsClosed s ∧ IsCompact s

Next tactic:
rw [isOpen_iff_of_mem, ← preimage_compl, compl_compl, preimage_image_eq _ coe_injective]
theorem isOpen_compl_image_coe {s : Set X} :
    IsOpen ((↑) '' s : Set (OnePoint X))ᶜ ↔ IsClosed s ∧ IsCompact s := by
  rw [isOpen_iff_of_mem, ← preimage_compl, compl_compl, preimage_image_eq _ coe_injective]
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
⊢ ∞ ∈ (some '' s)ᶜ

Next tactic:
exact infty_not_mem_image_coe
@[simp]
theorem isClosed_image_coe {s : Set X} :
    IsClosed ((↑) '' s : Set (OnePoint X)) ↔ IsClosed s ∧ IsCompact s := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
⊢ IsClosed (some '' s) ↔ IsClosed s ∧ IsCompact s

Next tactic:
rw [← isOpen_compl_iff, isOpen_compl_image_coe]
theorem isClosed_infty : IsClosed ({∞} : Set (OnePoint X)) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ IsClosed {∞}

Next tactic:
rw [← compl_range_coe, isClosed_compl_iff]
theorem isClosed_infty : IsClosed ({∞} : Set (OnePoint X)) := by
  rw [← compl_range_coe, isClosed_compl_iff]
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ IsOpen (range some)

Next tactic:
exact isOpen_range_coe
/-- If `x` is not an isolated point of `X`, then `x : OnePoint X` is not an isolated point
of `OnePoint X`. -/
instance nhdsWithin_compl_coe_neBot (x : X) [h : NeBot (𝓝[≠] x)] :
    NeBot (𝓝[≠] (x : OnePoint X)) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
x : X
h : NeBot (𝓝[≠] x)
⊢ NeBot (𝓝[≠] ↑x)

Next tactic:
simpa [nhdsWithin_coe, preimage, coe_eq_coe] using h.map some
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ 𝓝[≠] ∞ = map some (coclosedCompact X)

Next tactic:
refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
  · 

Proof state:
case refine'_1
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ ∀ (i : Set (OnePoint X)), ∞ ∈ i ∧ IsOpen i → ∃ i', (IsClosed i' ∧ IsCompact i') ∧ some '' i'ᶜ ⊆ i ∩ {∞}ᶜ

Next tactic:
rintro s ⟨hs, hso⟩
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
  · rintro s ⟨hs, hso⟩
    

Proof state:
case refine'_1.intro
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t : Set X
s : Set (OnePoint X)
hs : ∞ ∈ s
hso : IsOpen s
⊢ ∃ i', (IsClosed i' ∧ IsCompact i') ∧ some '' i'ᶜ ⊆ s ∩ {∞}ᶜ

Next tactic:
refine' ⟨_, (isOpen_iff_of_mem hs).mp hso, _⟩
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
  · rintro s ⟨hs, hso⟩
    refine' ⟨_, (isOpen_iff_of_mem hs).mp hso, _⟩
    

Proof state:
case refine'_1.intro
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t : Set X
s : Set (OnePoint X)
hs : ∞ ∈ s
hso : IsOpen s
⊢ some '' (some ⁻¹' s)ᶜᶜ ⊆ s ∩ {∞}ᶜ

Next tactic:
simp [Subset.rfl]
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
  · rintro s ⟨hs, hso⟩
    refine' ⟨_, (isOpen_iff_of_mem hs).mp hso, _⟩
    simp [Subset.rfl]
  · 

Proof state:
case refine'_2
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ ∀ (i' : Set X), IsClosed i' ∧ IsCompact i' → ∃ i, (∞ ∈ i ∧ IsOpen i) ∧ i ∩ {∞}ᶜ ⊆ some '' i'ᶜ

Next tactic:
rintro s ⟨h₁, h₂⟩
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
  · rintro s ⟨hs, hso⟩
    refine' ⟨_, (isOpen_iff_of_mem hs).mp hso, _⟩
    simp [Subset.rfl]
  · rintro s ⟨h₁, h₂⟩
    

Proof state:
case refine'_2.intro
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
h₁ : IsClosed s
h₂ : IsCompact s
⊢ ∃ i, (∞ ∈ i ∧ IsOpen i) ∧ i ∩ {∞}ᶜ ⊆ some '' sᶜ

Next tactic:
refine' ⟨_, ⟨mem_compl infty_not_mem_image_coe, isOpen_compl_image_coe.2 ⟨h₁, h₂⟩⟩, _⟩
theorem nhdsWithin_compl_infty_eq : 𝓝[≠] (∞ : OnePoint X) = map (↑) (coclosedCompact X) := by
  refine' (nhdsWithin_basis_open ∞ _).ext (hasBasis_coclosedCompact.map _) _ _
  · rintro s ⟨hs, hso⟩
    refine' ⟨_, (isOpen_iff_of_mem hs).mp hso, _⟩
    simp [Subset.rfl]
  · rintro s ⟨h₁, h₂⟩
    refine' ⟨_, ⟨mem_compl infty_not_mem_image_coe, isOpen_compl_image_coe.2 ⟨h₁, h₂⟩⟩, _⟩
    

Proof state:
case refine'_2.intro
X : Type u_1
inst✝ : TopologicalSpace X
s✝ : Set (OnePoint X)
t s : Set X
h₁ : IsClosed s
h₂ : IsCompact s
⊢ (some '' s)ᶜ ∩ {∞}ᶜ ⊆ some '' sᶜ

Next tactic:
simp [compl_image_coe, ← diff_eq, subset_preimage_image]
/-- If `X` is a non-compact space, then `∞` is not an isolated point of `OnePoint X`. -/
instance nhdsWithin_compl_infty_neBot [NoncompactSpace X] : NeBot (𝓝[≠] (∞ : OnePoint X)) := by
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : NoncompactSpace X
⊢ NeBot (𝓝[≠] ∞)

Next tactic:
rw [nhdsWithin_compl_infty_eq]
/-- If `X` is a non-compact space, then `∞` is not an isolated point of `OnePoint X`. -/
instance nhdsWithin_compl_infty_neBot [NoncompactSpace X] : NeBot (𝓝[≠] (∞ : OnePoint X)) := by
  rw [nhdsWithin_compl_infty_eq]
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : NoncompactSpace X
⊢ NeBot (map some (coclosedCompact X))

Next tactic:
infer_instance
theorem nhds_infty_eq : 𝓝 (∞ : OnePoint X) = map (↑) (coclosedCompact X) ⊔ pure ∞ := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ 𝓝 ∞ = map some (coclosedCompact X) ⊔ pure ∞

Next tactic:
rw [← nhdsWithin_compl_infty_eq, nhdsWithin_compl_singleton_sup_pure]
theorem hasBasis_nhds_infty :
    (𝓝 (∞ : OnePoint X)).HasBasis (fun s : Set X => IsClosed s ∧ IsCompact s) fun s =>
      (↑) '' sᶜ ∪ {∞} := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ HasBasis (𝓝 ∞) (fun s => IsClosed s ∧ IsCompact s) fun s => some '' sᶜ ∪ {∞}

Next tactic:
rw [nhds_infty_eq]
theorem hasBasis_nhds_infty :
    (𝓝 (∞ : OnePoint X)).HasBasis (fun s : Set X => IsClosed s ∧ IsCompact s) fun s =>
      (↑) '' sᶜ ∪ {∞} := by
  rw [nhds_infty_eq]
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ HasBasis (map some (coclosedCompact X) ⊔ pure ∞) (fun s => IsClosed s ∧ IsCompact s) fun s => some '' sᶜ ∪ {∞}

Next tactic:
exact (hasBasis_coclosedCompact.map _).sup_pure _
@[simp]
theorem comap_coe_nhds_infty : comap ((↑) : X → OnePoint X) (𝓝 ∞) = coclosedCompact X := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ comap some (𝓝 ∞) = coclosedCompact X

Next tactic:
simp [nhds_infty_eq, comap_sup, comap_map coe_injective]
theorem le_nhds_infty {f : Filter (OnePoint X)} :
    f ≤ 𝓝 ∞ ↔ ∀ s : Set X, IsClosed s → IsCompact s → (↑) '' sᶜ ∪ {∞} ∈ f := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
f : Filter (OnePoint X)
⊢ f ≤ 𝓝 ∞ ↔ ∀ (s : Set X), IsClosed s → IsCompact s → some '' sᶜ ∪ {∞} ∈ f

Next tactic:
simp only [hasBasis_nhds_infty.ge_iff, and_imp]
theorem ultrafilter_le_nhds_infty {f : Ultrafilter (OnePoint X)} :
    (f : Filter (OnePoint X)) ≤ 𝓝 ∞ ↔ ∀ s : Set X, IsClosed s → IsCompact s → (↑) '' s ∉ f := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
f : Ultrafilter (OnePoint X)
⊢ ↑f ≤ 𝓝 ∞ ↔ ∀ (s : Set X), IsClosed s → IsCompact s → some '' s ∉ f

Next tactic:
simp only [le_nhds_infty, ← compl_image_coe, Ultrafilter.mem_coe,
    Ultrafilter.compl_mem_iff_not_mem]
theorem tendsto_nhds_infty' {α : Type*} {f : OnePoint X → α} {l : Filter α} :
    Tendsto f (𝓝 ∞) l ↔ Tendsto f (pure ∞) l ∧ Tendsto (f ∘ (↑)) (coclosedCompact X) l := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
α : Type u_2
f : OnePoint X → α
l : Filter α
⊢ Tendsto f (𝓝 ∞) l ↔ Tendsto f (pure ∞) l ∧ Tendsto (f ∘ some) (coclosedCompact X) l

Next tactic:
simp [nhds_infty_eq, and_comm]
theorem tendsto_nhds_infty {α : Type*} {f : OnePoint X → α} {l : Filter α} :
    Tendsto f (𝓝 ∞) l ↔
      ∀ s ∈ l, f ∞ ∈ s ∧ ∃ t : Set X, IsClosed t ∧ IsCompact t ∧ MapsTo (f ∘ (↑)) tᶜ s :=
  tendsto_nhds_infty'.trans <| by
    

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
α : Type u_2
f : OnePoint X → α
l : Filter α
⊢ Tendsto f (pure ∞) l ∧ Tendsto (f ∘ some) (coclosedCompact X) l ↔
    ∀ s ∈ l, f ∞ ∈ s ∧ ∃ t, IsClosed t ∧ IsCompact t ∧ MapsTo (f ∘ some) tᶜ s

Next tactic:
simp only [tendsto_pure_left, hasBasis_coclosedCompact.tendsto_left_iff, forall_and,
      and_assoc, exists_prop]
theorem continuousAt_infty {Y : Type*} [TopologicalSpace Y] {f : OnePoint X → Y} :
    ContinuousAt f ∞ ↔
      ∀ s ∈ 𝓝 (f ∞), ∃ t : Set X, IsClosed t ∧ IsCompact t ∧ MapsTo (f ∘ (↑)) tᶜ s :=
  continuousAt_infty'.trans <| by 

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
Y : Type u_2
inst✝ : TopologicalSpace Y
f : OnePoint X → Y
⊢ Tendsto (f ∘ some) (coclosedCompact X) (𝓝 (f ∞)) ↔
    ∀ s ∈ 𝓝 (f ∞), ∃ t, IsClosed t ∧ IsCompact t ∧ MapsTo (f ∘ some) tᶜ s

Next tactic:
simp only [hasBasis_coclosedCompact.tendsto_left_iff, and_assoc]
theorem continuousAt_coe {Y : Type*} [TopologicalSpace Y] {f : OnePoint X → Y} {x : X} :
    ContinuousAt f x ↔ ContinuousAt (f ∘ (↑)) x := by
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
Y : Type u_2
inst✝ : TopologicalSpace Y
f : OnePoint X → Y
x : X
⊢ ContinuousAt f ↑x ↔ ContinuousAt (f ∘ some) x

Next tactic:
rw [ContinuousAt, nhds_coe_eq, tendsto_map'_iff, ContinuousAt]
theorem continuousAt_coe {Y : Type*} [TopologicalSpace Y] {f : OnePoint X → Y} {x : X} :
    ContinuousAt f x ↔ ContinuousAt (f ∘ (↑)) x := by
  rw [ContinuousAt, nhds_coe_eq, tendsto_map'_iff, ContinuousAt]; 

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
Y : Type u_2
inst✝ : TopologicalSpace Y
f : OnePoint X → Y
x : X
⊢ Tendsto (f ∘ some) (𝓝 x) (𝓝 (f ↑x)) ↔ Tendsto (f ∘ some) (𝓝 x) (𝓝 ((f ∘ some) x))

Next tactic:
rfl
/-- If `X` is not a compact space, then the natural embedding `X → OnePoint X` has dense range.
-/
theorem denseRange_coe [NoncompactSpace X] : DenseRange ((↑) : X → OnePoint X) := by
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : NoncompactSpace X
⊢ DenseRange some

Next tactic:
rw [DenseRange, ← compl_infty]
/-- If `X` is not a compact space, then the natural embedding `X → OnePoint X` has dense range.
-/
theorem denseRange_coe [NoncompactSpace X] : DenseRange ((↑) : X → OnePoint X) := by
  rw [DenseRange, ← compl_infty]
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : NoncompactSpace X
⊢ Dense {∞}ᶜ

Next tactic:
exact dense_compl_singleton _
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
x y : OnePoint X
⊢ Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x', x = ↑x' ∧ ∃ y', y = ↑y' ∧ Inseparable x' y'

Next tactic:
induction x using OnePoint.rec
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  induction x using OnePoint.rec <;> 

Proof state:
case h₁
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
y : OnePoint X
⊢ Inseparable ∞ y ↔ ∞ = ∞ ∧ y = ∞ ∨ ∃ x', ∞ = ↑x' ∧ ∃ y', y = ↑y' ∧ Inseparable x' y'

Next tactic:
induction y using OnePoint.rec
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  induction x using OnePoint.rec <;> 

Proof state:
case h₂
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
y : OnePoint X
x✝ : X
⊢ Inseparable (↑x✝) y ↔ ↑x✝ = ∞ ∧ y = ∞ ∨ ∃ x', ↑x✝ = ↑x' ∧ ∃ y', y = ↑y' ∧ Inseparable x' y'

Next tactic:
induction y using OnePoint.rec
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  induction x using OnePoint.rec <;> induction y using OnePoint.rec <;>
    

Proof state:
case h₁.h₁
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ Inseparable ∞ ∞ ↔ ∞ = ∞ ∧ ∞ = ∞ ∨ ∃ x', ∞ = ↑x' ∧ ∃ y', ∞ = ↑y' ∧ Inseparable x' y'

Next tactic:
simp [not_inseparable_infty_coe, not_inseparable_coe_infty, coe_eq_coe, Inseparable.refl]
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  induction x using OnePoint.rec <;> induction y using OnePoint.rec <;>
    

Proof state:
case h₁.h₂
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
x✝ : X
⊢ Inseparable ∞ ↑x✝ ↔ ∞ = ∞ ∧ ↑x✝ = ∞ ∨ ∃ x', ∞ = ↑x' ∧ ∃ y', ↑x✝ = ↑y' ∧ Inseparable x' y'

Next tactic:
simp [not_inseparable_infty_coe, not_inseparable_coe_infty, coe_eq_coe, Inseparable.refl]
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  induction x using OnePoint.rec <;> induction y using OnePoint.rec <;>
    

Proof state:
case h₂.h₁
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
x✝ : X
⊢ Inseparable ↑x✝ ∞ ↔ ↑x✝ = ∞ ∧ ∞ = ∞ ∨ ∃ x', ↑x✝ = ↑x' ∧ ∃ y', ∞ = ↑y' ∧ Inseparable x' y'

Next tactic:
simp [not_inseparable_infty_coe, not_inseparable_coe_infty, coe_eq_coe, Inseparable.refl]
theorem inseparable_iff {x y : OnePoint X} :
    Inseparable x y ↔ x = ∞ ∧ y = ∞ ∨ ∃ x' : X, x = x' ∧ ∃ y' : X, y = y' ∧ Inseparable x' y' := by
  induction x using OnePoint.rec <;> induction y using OnePoint.rec <;>
    

Proof state:
case h₂.h₂
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
x✝¹ x✝ : X
⊢ Inseparable ↑x✝¹ ↑x✝ ↔ ↑x✝¹ = ∞ ∧ ↑x✝ = ∞ ∨ ∃ x', ↑x✝¹ = ↑x' ∧ ∃ y', ↑x✝ = ↑y' ∧ Inseparable x' y'

Next tactic:
simp [not_inseparable_infty_coe, not_inseparable_coe_infty, coe_eq_coe, Inseparable.refl]
/-- For any topological space `X`, its one point compactification is a compact space. -/
instance : CompactSpace (OnePoint X) where
  isCompact_univ := by
    

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ IsCompact univ

Next tactic:
have : Tendsto ((↑) : X → OnePoint X) (cocompact X) (𝓝 ∞) := by
      rw [nhds_infty_eq]
      exact (tendsto_map.mono_left cocompact_le_coclosedCompact).mono_right le_sup_left
/-- For any topological space `X`, its one point compactification is a compact space. -/
instance : CompactSpace (OnePoint X) where
  isCompact_univ := by
    have : Tendsto ((↑) : X → OnePoint X) (cocompact X) (𝓝 ∞) := by
      

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ Tendsto some (cocompact X) (𝓝 ∞)

Next tactic:
rw [nhds_infty_eq]
/-- For any topological space `X`, its one point compactification is a compact space. -/
instance : CompactSpace (OnePoint X) where
  isCompact_univ := by
    have : Tendsto ((↑) : X → OnePoint X) (cocompact X) (𝓝 ∞) := by
      rw [nhds_infty_eq]
      

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
⊢ Tendsto some (cocompact X) (map some (coclosedCompact X) ⊔ pure ∞)

Next tactic:
exact (tendsto_map.mono_left cocompact_le_coclosedCompact).mono_right le_sup_left
/-- For any topological space `X`, its one point compactification is a compact space. -/
instance : CompactSpace (OnePoint X) where
  isCompact_univ := by
    have : Tendsto ((↑) : X → OnePoint X) (cocompact X) (𝓝 ∞) := by
      rw [nhds_infty_eq]
      exact (tendsto_map.mono_left cocompact_le_coclosedCompact).mono_right le_sup_left
    

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
this : Tendsto some (cocompact X) (𝓝 ∞)
⊢ IsCompact univ

Next tactic:
rw [← insert_none_range_some X]
/-- For any topological space `X`, its one point compactification is a compact space. -/
instance : CompactSpace (OnePoint X) where
  isCompact_univ := by
    have : Tendsto ((↑) : X → OnePoint X) (cocompact X) (𝓝 ∞) := by
      rw [nhds_infty_eq]
      exact (tendsto_map.mono_left cocompact_le_coclosedCompact).mono_right le_sup_left
    rw [← insert_none_range_some X]
    

Proof state:
X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
this : Tendsto some (cocompact X) (𝓝 ∞)
⊢ IsCompact (insert none (range Option.some))

Next tactic:
exact this.isCompact_insert_range_of_cocompact continuous_coe
/-- The one point compactification of a `T0Space` space is a `T0Space`. -/
instance [T0Space X] : T0Space (OnePoint X) := by
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T0Space X
⊢ T0Space (OnePoint X)

Next tactic:
refine' ⟨fun x y hxy => _⟩
/-- The one point compactification of a `T0Space` space is a `T0Space`. -/
instance [T0Space X] : T0Space (OnePoint X) := by
  refine' ⟨fun x y hxy => _⟩
  

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T0Space X
x y : OnePoint X
hxy : Inseparable x y
⊢ x = y

Next tactic:
rcases inseparable_iff.1 hxy with (⟨rfl, rfl⟩ | ⟨x, rfl, y, rfl, h⟩)
/-- The one point compactification of a `T0Space` space is a `T0Space`. -/
instance [T0Space X] : T0Space (OnePoint X) := by
  refine' ⟨fun x y hxy => _⟩
  rcases inseparable_iff.1 hxy with (⟨rfl, rfl⟩ | ⟨x, rfl, y, rfl, h⟩)
  

Proof state:
case inl.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T0Space X
hxy : Inseparable ∞ ∞
⊢ ∞ = ∞
case inr.intro.intro.intro.intro
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T0Space X
x y : X
h : Inseparable x y
hxy : Inseparable ↑x ↑y
⊢ ↑x = ↑y

Next tactic:
exacts [rfl, congr_arg some h.eq]
/-- The one point compactification of a `T1Space` space is a `T1Space`. -/
instance [T1Space X] : T1Space (OnePoint X) where
  t1 z := by
    

Proof state:
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T1Space X
z : OnePoint X
⊢ IsClosed {z}

Next tactic:
induction z using OnePoint.rec
/-- The one point compactification of a `T1Space` space is a `T1Space`. -/
instance [T1Space X] : T1Space (OnePoint X) where
  t1 z := by
    induction z using OnePoint.rec
    · 

Proof state:
case h₁
X : Type u_1
inst✝¹ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
inst✝ : T1Space X
⊢ IsClosed {∞}

Next tactic:
exact isClosed_infty