l3lab/ntp-mathlib huggingface dataset:
/-- In a (possibly non-Hausdorff) locally compact space with the `ClosableCompactSubsetOpenSpace`
  property (for instance regular spaces), for every containment `K ⊆ U` of a compact set `K` in an
  open set `U`, there is a compact closed neighborhood `L` such that `K ⊆ L ⊆ U`: equivalently,
  there is a compact closed set `L` such that `K ⊆ interior L` and `L ⊆ U`. -/
theorem exists_compact_closed_between [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X]
    {K U : Set X} (hK : IsCompact K) (hU : IsOpen U) (h_KU : K ⊆ U) :
    ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U := by
  rcases exists_compact_between hK hU h_KU with ⟨L, L_comp, KL, LU⟩
  rcases exists_compact_between hK isOpen_interior KL with ⟨M, M_comp, KM, ML⟩
  refine ⟨closure M, ?_, isClosed_closure, ?_, ?_⟩
  · have : closure M ∩ L = closure M := by
      apply inter_eq_self_of_subset_left
      exact (M_comp.closure_subset_of_isOpen isOpen_interior ML).trans interior_subset
    rw [← this]
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
K U : Set X
hK : IsCompact K
hU : IsOpen U
h_KU : K ⊆ U
L : Set X
L_comp : IsCompact L
KL : K ⊆ interior L
LU : L ⊆ U
M : Set X
M_comp : IsCompact M
KM : K ⊆ interior M
ML : M ⊆ interior L
this : closure M ∩ L = closure M
⊢ IsCompact (closure M ∩ L)

Next tactic:
apply L_comp.inter_left isClosed_closure
/-- In a (possibly non-Hausdorff) locally compact space with the `ClosableCompactSubsetOpenSpace`
  property (for instance regular spaces), for every containment `K ⊆ U` of a compact set `K` in an
  open set `U`, there is a compact closed neighborhood `L` such that `K ⊆ L ⊆ U`: equivalently,
  there is a compact closed set `L` such that `K ⊆ interior L` and `L ⊆ U`. -/
theorem exists_compact_closed_between [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X]
    {K U : Set X} (hK : IsCompact K) (hU : IsOpen U) (h_KU : K ⊆ U) :
    ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U := by
  rcases exists_compact_between hK hU h_KU with ⟨L, L_comp, KL, LU⟩
  rcases exists_compact_between hK isOpen_interior KL with ⟨M, M_comp, KM, ML⟩
  refine ⟨closure M, ?_, isClosed_closure, ?_, ?_⟩
  · have : closure M ∩ L = closure M := by
      apply inter_eq_self_of_subset_left
      exact (M_comp.closure_subset_of_isOpen isOpen_interior ML).trans interior_subset
    rw [← this]
    apply L_comp.inter_left isClosed_closure
  · 

Proof state:
case intro.intro.intro.intro.intro.intro.refine_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
K U : Set X
hK : IsCompact K
hU : IsOpen U
h_KU : K ⊆ U
L : Set X
L_comp : IsCompact L
KL : K ⊆ interior L
LU : L ⊆ U
M : Set X
M_comp : IsCompact M
KM : K ⊆ interior M
ML : M ⊆ interior L
⊢ K ⊆ interior (closure M)

Next tactic:
exact KM.trans (interior_mono subset_closure)
/-- In a (possibly non-Hausdorff) locally compact space with the `ClosableCompactSubsetOpenSpace`
  property (for instance regular spaces), for every containment `K ⊆ U` of a compact set `K` in an
  open set `U`, there is a compact closed neighborhood `L` such that `K ⊆ L ⊆ U`: equivalently,
  there is a compact closed set `L` such that `K ⊆ interior L` and `L ⊆ U`. -/
theorem exists_compact_closed_between [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X]
    {K U : Set X} (hK : IsCompact K) (hU : IsOpen U) (h_KU : K ⊆ U) :
    ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U := by
  rcases exists_compact_between hK hU h_KU with ⟨L, L_comp, KL, LU⟩
  rcases exists_compact_between hK isOpen_interior KL with ⟨M, M_comp, KM, ML⟩
  refine ⟨closure M, ?_, isClosed_closure, ?_, ?_⟩
  · have : closure M ∩ L = closure M := by
      apply inter_eq_self_of_subset_left
      exact (M_comp.closure_subset_of_isOpen isOpen_interior ML).trans interior_subset
    rw [← this]
    apply L_comp.inter_left isClosed_closure
  · exact KM.trans (interior_mono subset_closure)
  · 

Proof state:
case intro.intro.intro.intro.intro.intro.refine_3
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
K U : Set X
hK : IsCompact K
hU : IsOpen U
h_KU : K ⊆ U
L : Set X
L_comp : IsCompact L
KL : K ⊆ interior L
LU : L ⊆ U
M : Set X
M_comp : IsCompact M
KM : K ⊆ interior M
ML : M ⊆ interior L
⊢ closure M ⊆ U

Next tactic:
apply M_comp.closure_subset_of_isOpen hU
/-- In a (possibly non-Hausdorff) locally compact space with the `ClosableCompactSubsetOpenSpace`
  property (for instance regular spaces), for every containment `K ⊆ U` of a compact set `K` in an
  open set `U`, there is a compact closed neighborhood `L` such that `K ⊆ L ⊆ U`: equivalently,
  there is a compact closed set `L` such that `K ⊆ interior L` and `L ⊆ U`. -/
theorem exists_compact_closed_between [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X]
    {K U : Set X} (hK : IsCompact K) (hU : IsOpen U) (h_KU : K ⊆ U) :
    ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U := by
  rcases exists_compact_between hK hU h_KU with ⟨L, L_comp, KL, LU⟩
  rcases exists_compact_between hK isOpen_interior KL with ⟨M, M_comp, KM, ML⟩
  refine ⟨closure M, ?_, isClosed_closure, ?_, ?_⟩
  · have : closure M ∩ L = closure M := by
      apply inter_eq_self_of_subset_left
      exact (M_comp.closure_subset_of_isOpen isOpen_interior ML).trans interior_subset
    rw [← this]
    apply L_comp.inter_left isClosed_closure
  · exact KM.trans (interior_mono subset_closure)
  · apply M_comp.closure_subset_of_isOpen hU
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_3
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
K U : Set X
hK : IsCompact K
hU : IsOpen U
h_KU : K ⊆ U
L : Set X
L_comp : IsCompact L
KL : K ⊆ interior L
LU : L ⊆ U
M : Set X
M_comp : IsCompact M
KM : K ⊆ interior M
ML : M ⊆ interior L
⊢ M ⊆ U

Next tactic:
exact ML.trans (interior_subset.trans LU)
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
⊢ RegularSpace X

Next tactic:
apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
x : X
s : Set X
hx : s ∈ 𝓝 x
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
rcases _root_.mem_nhds_iff.1 hx with ⟨u, us, u_open, xu⟩
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  rcases _root_.mem_nhds_iff.1 hx with ⟨u, us, u_open, xu⟩
  

Proof state:
case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
x : X
s : Set X
hx : s ∈ 𝓝 x
u : Set X
us : u ⊆ s
u_open : IsOpen u
xu : x ∈ u
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
rcases exists_compact_closed_between (isCompact_singleton (x := x)) u_open (by simpa using xu)
    with ⟨t, -, t_closed, xt, tu⟩
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  rcases _root_.mem_nhds_iff.1 hx with ⟨u, us, u_open, xu⟩
  rcases exists_compact_closed_between (isCompact_singleton (x := x)) u_open (by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
x : X
s : Set X
hx : s ∈ 𝓝 x
u : Set X
us : u ⊆ s
u_open : IsOpen u
xu : x ∈ u
⊢ {x} ⊆ u

Next tactic:
simpa using xu
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  rcases _root_.mem_nhds_iff.1 hx with ⟨u, us, u_open, xu⟩
  rcases exists_compact_closed_between (isCompact_singleton (x := x)) u_open (by simpa using xu)
    with ⟨t, -, t_closed, xt, tu⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
x : X
s : Set X
hx : s ∈ 𝓝 x
u : Set X
us : u ⊆ s
u_open : IsOpen u
xu : x ∈ u
t : Set X
t_closed : IsClosed t
xt : {x} ⊆ interior t
tu : t ⊆ u
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
have : interior t ∈ 𝓝 x := isOpen_interior.mem_nhds (by simpa using xt)
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  rcases _root_.mem_nhds_iff.1 hx with ⟨u, us, u_open, xu⟩
  rcases exists_compact_closed_between (isCompact_singleton (x := x)) u_open (by simpa using xu)
    with ⟨t, -, t_closed, xt, tu⟩
  have : interior t ∈ 𝓝 x := isOpen_interior.mem_nhds (by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
x : X
s : Set X
hx : s ∈ 𝓝 x
u : Set X
us : u ⊆ s
u_open : IsOpen u
xu : x ∈ u
t : Set X
t_closed : IsClosed t
xt : {x} ⊆ interior t
tu : t ⊆ u
⊢ x ∈ interior t

Next tactic:
simpa using xt
/-- A locally compact space with the `ClosableCompactSubsetOpenSpace` is `Regular`. -/
instance (priority := 80) [LocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X] :
    RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  rcases _root_.mem_nhds_iff.1 hx with ⟨u, us, u_open, xu⟩
  rcases exists_compact_closed_between (isCompact_singleton (x := x)) u_open (by simpa using xu)
    with ⟨t, -, t_closed, xt, tu⟩
  have : interior t ∈ 𝓝 x := isOpen_interior.mem_nhds (by simpa using xt)
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
x : X
s : Set X
hx : s ∈ 𝓝 x
u : Set X
us : u ⊆ s
u_open : IsOpen u
xu : x ∈ u
t : Set X
t_closed : IsClosed t
xt : {x} ⊆ interior t
tu : t ⊆ u
this : interior t ∈ 𝓝 x
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
exact ⟨t, interior_mem_nhds.mp this, t_closed, tu.trans us⟩
protected theorem IsCompact.closure [WeaklyLocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X]
    {K : Set X} (hK : IsCompact K) : IsCompact (closure K) := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
K : Set X
hK : IsCompact K
⊢ IsCompact (closure K)

Next tactic:
rcases exists_compact_superset hK with ⟨L, L_comp, hL⟩
protected theorem IsCompact.closure [WeaklyLocallyCompactSpace X] [ClosableCompactSubsetOpenSpace X]
    {K : Set X} (hK : IsCompact K) : IsCompact (closure K) := by
  rcases exists_compact_superset hK with ⟨L, L_comp, hL⟩
  

Proof state:
case intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : WeaklyLocallyCompactSpace X
inst✝ : ClosableCompactSubsetOpenSpace X
K : Set X
hK : IsCompact K
L : Set X
L_comp : IsCompact L
hL : K ⊆ interior L
⊢ IsCompact (closure K)

Next tactic:
exact L_comp.of_isClosed_subset isClosed_closure
    ((hK.closure_subset_of_isOpen isOpen_interior hL).trans interior_subset)
instance (priority := 100) T3Space.t25Space [T3Space X] : T25Space X := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
⊢ T25Space X

Next tactic:
refine' ⟨fun x y hne => _⟩
instance (priority := 100) T3Space.t25Space [T3Space X] : T25Space X := by
  refine' ⟨fun x y hne => _⟩
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
hne : x ≠ y
⊢ Disjoint (Filter.lift' (𝓝 x) closure) (Filter.lift' (𝓝 y) closure)

Next tactic:
rw [lift'_nhds_closure, lift'_nhds_closure]
instance (priority := 100) T3Space.t25Space [T3Space X] : T25Space X := by
  refine' ⟨fun x y hne => _⟩
  rw [lift'_nhds_closure, lift'_nhds_closure]
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
hne : x ≠ y
⊢ Disjoint (𝓝 x) (𝓝 y)

Next tactic:
have : x ∉ closure {y} ∨ y ∉ closure {x} :=
    (t0Space_iff_or_not_mem_closure X).mp inferInstance x y hne
instance (priority := 100) T3Space.t25Space [T3Space X] : T25Space X := by
  refine' ⟨fun x y hne => _⟩
  rw [lift'_nhds_closure, lift'_nhds_closure]
  have : x ∉ closure {y} ∨ y ∉ closure {x} :=
    (t0Space_iff_or_not_mem_closure X).mp inferInstance x y hne
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
hne : x ≠ y
this : x ∉ closure {y} ∨ y ∉ closure {x}
⊢ Disjoint (𝓝 x) (𝓝 y)

Next tactic:
simp only [← disjoint_nhds_nhdsSet, nhdsSet_singleton] at this
instance (priority := 100) T3Space.t25Space [T3Space X] : T25Space X := by
  refine' ⟨fun x y hne => _⟩
  rw [lift'_nhds_closure, lift'_nhds_closure]
  have : x ∉ closure {y} ∨ y ∉ closure {x} :=
    (t0Space_iff_or_not_mem_closure X).mp inferInstance x y hne
  simp only [← disjoint_nhds_nhdsSet, nhdsSet_singleton] at this
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
hne : x ≠ y
this : Disjoint (𝓝 x) (𝓝 y) ∨ Disjoint (𝓝 y) (𝓝 x)
⊢ Disjoint (𝓝 x) (𝓝 y)

Next tactic:
exact this.elim id fun h => h.symm
/-- Given two points `x ≠ y`, we can find neighbourhoods `x ∈ V₁ ⊆ U₁` and `y ∈ V₂ ⊆ U₂`,
with the `Vₖ` closed and the `Uₖ` open, such that the `Uₖ` are disjoint. -/
theorem disjoint_nested_nhds [T3Space X] {x y : X} (h : x ≠ y) :
    ∃ U₁ ∈ 𝓝 x, ∃ V₁ ∈ 𝓝 x, ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y,
      IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
h : x ≠ y
⊢ ∃ U₁ ∈ 𝓝 x,
    ∃ V₁ ∈ 𝓝 x,
      ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y, IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂

Next tactic:
rcases t2_separation h with ⟨U₁, U₂, U₁_op, U₂_op, x_in, y_in, H⟩
/-- Given two points `x ≠ y`, we can find neighbourhoods `x ∈ V₁ ⊆ U₁` and `y ∈ V₂ ⊆ U₂`,
with the `Vₖ` closed and the `Uₖ` open, such that the `Uₖ` are disjoint. -/
theorem disjoint_nested_nhds [T3Space X] {x y : X} (h : x ≠ y) :
    ∃ U₁ ∈ 𝓝 x, ∃ V₁ ∈ 𝓝 x, ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y,
      IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ := by
  rcases t2_separation h with ⟨U₁, U₂, U₁_op, U₂_op, x_in, y_in, H⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
h : x ≠ y
U₁ U₂ : Set X
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
x_in : x ∈ U₁
y_in : y ∈ U₂
H : Disjoint U₁ U₂
⊢ ∃ U₁ ∈ 𝓝 x,
    ∃ V₁ ∈ 𝓝 x,
      ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y, IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂

Next tactic:
rcases exists_mem_nhds_isClosed_subset (U₁_op.mem_nhds x_in) with ⟨V₁, V₁_in, V₁_closed, h₁⟩
/-- Given two points `x ≠ y`, we can find neighbourhoods `x ∈ V₁ ⊆ U₁` and `y ∈ V₂ ⊆ U₂`,
with the `Vₖ` closed and the `Uₖ` open, such that the `Uₖ` are disjoint. -/
theorem disjoint_nested_nhds [T3Space X] {x y : X} (h : x ≠ y) :
    ∃ U₁ ∈ 𝓝 x, ∃ V₁ ∈ 𝓝 x, ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y,
      IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ := by
  rcases t2_separation h with ⟨U₁, U₂, U₁_op, U₂_op, x_in, y_in, H⟩
  rcases exists_mem_nhds_isClosed_subset (U₁_op.mem_nhds x_in) with ⟨V₁, V₁_in, V₁_closed, h₁⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
h : x ≠ y
U₁ U₂ : Set X
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
x_in : x ∈ U₁
y_in : y ∈ U₂
H : Disjoint U₁ U₂
V₁ : Set X
V₁_in : V₁ ∈ 𝓝 x
V₁_closed : IsClosed V₁
h₁ : V₁ ⊆ U₁
⊢ ∃ U₁ ∈ 𝓝 x,
    ∃ V₁ ∈ 𝓝 x,
      ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y, IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂

Next tactic:
rcases exists_mem_nhds_isClosed_subset (U₂_op.mem_nhds y_in) with ⟨V₂, V₂_in, V₂_closed, h₂⟩
/-- Given two points `x ≠ y`, we can find neighbourhoods `x ∈ V₁ ⊆ U₁` and `y ∈ V₂ ⊆ U₂`,
with the `Vₖ` closed and the `Uₖ` open, such that the `Uₖ` are disjoint. -/
theorem disjoint_nested_nhds [T3Space X] {x y : X} (h : x ≠ y) :
    ∃ U₁ ∈ 𝓝 x, ∃ V₁ ∈ 𝓝 x, ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y,
      IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂ := by
  rcases t2_separation h with ⟨U₁, U₂, U₁_op, U₂_op, x_in, y_in, H⟩
  rcases exists_mem_nhds_isClosed_subset (U₁_op.mem_nhds x_in) with ⟨V₁, V₁_in, V₁_closed, h₁⟩
  rcases exists_mem_nhds_isClosed_subset (U₂_op.mem_nhds y_in) with ⟨V₂, V₂_in, V₂_closed, h₂⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T3Space X
x y : X
h : x ≠ y
U₁ U₂ : Set X
U₁_op : IsOpen U₁
U₂_op : IsOpen U₂
x_in : x ∈ U₁
y_in : y ∈ U₂
H : Disjoint U₁ U₂
V₁ : Set X
V₁_in : V₁ ∈ 𝓝 x
V₁_closed : IsClosed V₁
h₁ : V₁ ⊆ U₁
V₂ : Set X
V₂_in : V₂ ∈ 𝓝 y
V₂_closed : IsClosed V₂
h₂ : V₂ ⊆ U₂
⊢ ∃ U₁ ∈ 𝓝 x,
    ∃ V₁ ∈ 𝓝 x,
      ∃ U₂ ∈ 𝓝 y, ∃ V₂ ∈ 𝓝 y, IsClosed V₁ ∧ IsClosed V₂ ∧ IsOpen U₁ ∧ IsOpen U₂ ∧ V₁ ⊆ U₁ ∧ V₂ ⊆ U₂ ∧ Disjoint U₁ U₂

Next tactic:
exact ⟨U₁, mem_of_superset V₁_in h₁, V₁, V₁_in, U₂, mem_of_superset V₂_in h₂, V₂, V₂_in,
    V₁_closed, V₂_closed, U₁_op, U₂_op, h₁, h₂, H⟩
/-- The `SeparationQuotient` of a regular space is a T₃ space. -/
instance [RegularSpace X] : T3Space (SeparationQuotient X) where
  regular {s a} hs ha := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s : Set (SeparationQuotient X)
a : SeparationQuotient X
hs : IsClosed s
ha : a ∉ s
⊢ Disjoint (𝓝ˢ s) (𝓝 a)

Next tactic:
rcases surjective_mk a with ⟨a, rfl⟩
/-- The `SeparationQuotient` of a regular space is a T₃ space. -/
instance [RegularSpace X] : T3Space (SeparationQuotient X) where
  regular {s a} hs ha := by
    rcases surjective_mk a with ⟨a, rfl⟩
    

Proof state:
case intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s : Set (SeparationQuotient X)
hs : IsClosed s
a : X
ha : SeparationQuotient.mk a ∉ s
⊢ Disjoint (𝓝ˢ s) (𝓝 (SeparationQuotient.mk a))

Next tactic:
rw [← disjoint_comap_iff surjective_mk, comap_mk_nhds_mk, comap_mk_nhdsSet]
/-- The `SeparationQuotient` of a regular space is a T₃ space. -/
instance [RegularSpace X] : T3Space (SeparationQuotient X) where
  regular {s a} hs ha := by
    rcases surjective_mk a with ⟨a, rfl⟩
    rw [← disjoint_comap_iff surjective_mk, comap_mk_nhds_mk, comap_mk_nhdsSet]
    

Proof state:
case intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s : Set (SeparationQuotient X)
hs : IsClosed s
a : X
ha : SeparationQuotient.mk a ∉ s
⊢ Disjoint (𝓝ˢ (SeparationQuotient.mk ⁻¹' s)) (𝓝 a)

Next tactic:
exact RegularSpace.regular (hs.preimage continuous_mk) ha
theorem normal_exists_closure_subset [NormalSpace X] {s t : Set X} (hs : IsClosed s) (ht : IsOpen t)
    (hst : s ⊆ t) : ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
s t : Set X
hs : IsClosed s
ht : IsOpen t
hst : s ⊆ t
⊢ ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t

Next tactic:
have : Disjoint s tᶜ := Set.disjoint_left.mpr fun x hxs hxt => hxt (hst hxs)
theorem normal_exists_closure_subset [NormalSpace X] {s t : Set X} (hs : IsClosed s) (ht : IsOpen t)
    (hst : s ⊆ t) : ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t := by
  have : Disjoint s tᶜ := Set.disjoint_left.mpr fun x hxs hxt => hxt (hst hxs)
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
s t : Set X
hs : IsClosed s
ht : IsOpen t
hst : s ⊆ t
this : Disjoint s tᶜ
⊢ ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t

Next tactic:
rcases normal_separation hs (isClosed_compl_iff.2 ht) this with
    ⟨s', t', hs', ht', hss', htt', hs't'⟩
theorem normal_exists_closure_subset [NormalSpace X] {s t : Set X} (hs : IsClosed s) (ht : IsOpen t)
    (hst : s ⊆ t) : ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t := by
  have : Disjoint s tᶜ := Set.disjoint_left.mpr fun x hxs hxt => hxt (hst hxs)
  rcases normal_separation hs (isClosed_compl_iff.2 ht) this with
    ⟨s', t', hs', ht', hss', htt', hs't'⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
s t : Set X
hs : IsClosed s
ht : IsOpen t
hst : s ⊆ t
this : Disjoint s tᶜ
s' t' : Set X
hs' : IsOpen s'
ht' : IsOpen t'
hss' : s ⊆ s'
htt' : tᶜ ⊆ t'
hs't' : Disjoint s' t'
⊢ ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t

Next tactic:
refine ⟨s', hs', hss', Subset.trans (closure_minimal ?_ (isClosed_compl_iff.2 ht'))
    (compl_subset_comm.1 htt')⟩
theorem normal_exists_closure_subset [NormalSpace X] {s t : Set X} (hs : IsClosed s) (ht : IsOpen t)
    (hst : s ⊆ t) : ∃ u, IsOpen u ∧ s ⊆ u ∧ closure u ⊆ t := by
  have : Disjoint s tᶜ := Set.disjoint_left.mpr fun x hxs hxt => hxt (hst hxs)
  rcases normal_separation hs (isClosed_compl_iff.2 ht) this with
    ⟨s', t', hs', ht', hss', htt', hs't'⟩
  refine ⟨s', hs', hss', Subset.trans (closure_minimal ?_ (isClosed_compl_iff.2 ht'))
    (compl_subset_comm.1 htt')⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : NormalSpace X
s t : Set X
hs : IsClosed s
ht : IsOpen t
hst : s ⊆ t
this : Disjoint s tᶜ
s' t' : Set X
hs' : IsOpen s'
ht' : IsOpen t'
hss' : s ⊆ s'
htt' : tᶜ ⊆ t'
hs't' : Disjoint s' t'
⊢ s' ⊆ t'ᶜ

Next tactic:
exact fun x hxs hxt => hs't'.le_bot ⟨hxs, hxt⟩
/-- If the codomain of a closed embedding is a normal space, then so is the domain. -/
protected theorem ClosedEmbedding.normalSpace [TopologicalSpace Y] [NormalSpace Y] {f : X → Y}
    (hf : ClosedEmbedding f) : NormalSpace X where
  normal s t hs ht hst := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X → Y
hf : ClosedEmbedding f
s t : Set X
hs : IsClosed s
ht : IsClosed t
hst : Disjoint s t
⊢ SeparatedNhds s t

Next tactic:
have H : SeparatedNhds (f '' s) (f '' t) :=
      NormalSpace.normal (f '' s) (f '' t) (hf.isClosedMap s hs) (hf.isClosedMap t ht)
        (disjoint_image_of_injective hf.inj hst)
/-- If the codomain of a closed embedding is a normal space, then so is the domain. -/
protected theorem ClosedEmbedding.normalSpace [TopologicalSpace Y] [NormalSpace Y] {f : X → Y}
    (hf : ClosedEmbedding f) : NormalSpace X where
  normal s t hs ht hst := by
    have H : SeparatedNhds (f '' s) (f '' t) :=
      NormalSpace.normal (f '' s) (f '' t) (hf.isClosedMap s hs) (hf.isClosedMap t ht)
        (disjoint_image_of_injective hf.inj hst)
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : NormalSpace Y
f : X → Y
hf : ClosedEmbedding f
s t : Set X
hs : IsClosed s
ht : IsClosed t
hst : Disjoint s t
H : SeparatedNhds (f '' s) (f '' t)
⊢ SeparatedNhds s t

Next tactic:
exact (H.preimage hf.continuous).mono (subset_preimage_image _ _) (subset_preimage_image _ _)