l3lab/ntp-mathlib huggingface dataset:
theorem regularSpace_sInf {X} {T : Set (TopologicalSpace X)} (h : ∀ t ∈ T, @RegularSpace X t) :
    @RegularSpace X (sInf T) := by
  let _ := sInf T
  have : ∀ a, (𝓝 a).HasBasis
      (fun If : ΣI : Set T, I → Set X =>
        If.1.Finite ∧ ∀ i : If.1, If.2 i ∈ @nhds X i a ∧ @IsClosed X i (If.2 i))
      fun If => ⋂ i : If.1, If.snd i := by
    intro a
    rw [nhds_sInf, ← iInf_subtype'']
    

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
inst✝ : RegularSpace X✝
x : X✝
s : Set X✝
X : Type u_3
T : Set (TopologicalSpace X)
h : ∀ t ∈ T, RegularSpace X
x✝ : TopologicalSpace X := sInf T
a : X
⊢ HasBasis (⨅ i, 𝓝 a) (fun If => Set.Finite If.fst ∧ ∀ (i : ↑If.fst), Sigma.snd If i ∈ 𝓝 a ∧ IsClosed (Sigma.snd If i))
    fun If => ⋂ i, Sigma.snd If i

Next tactic:
exact hasBasis_iInf fun t : T => @closed_nhds_basis X t (h t t.2) a
theorem regularSpace_sInf {X} {T : Set (TopologicalSpace X)} (h : ∀ t ∈ T, @RegularSpace X t) :
    @RegularSpace X (sInf T) := by
  let _ := sInf T
  have : ∀ a, (𝓝 a).HasBasis
      (fun If : ΣI : Set T, I → Set X =>
        If.1.Finite ∧ ∀ i : If.1, If.2 i ∈ @nhds X i a ∧ @IsClosed X i (If.2 i))
      fun If => ⋂ i : If.1, If.snd i := by
    intro a
    rw [nhds_sInf, ← iInf_subtype'']
    exact hasBasis_iInf fun t : T => @closed_nhds_basis X t (h t t.2) a
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
inst✝ : RegularSpace X✝
x : X✝
s : Set X✝
X : Type u_3
T : Set (TopologicalSpace X)
h : ∀ t ∈ T, RegularSpace X
x✝ : TopologicalSpace X := sInf T
this :
  ∀ (a : X),
    HasBasis (𝓝 a) (fun If => Set.Finite If.fst ∧ ∀ (i : ↑If.fst), Sigma.snd If i ∈ 𝓝 a ∧ IsClosed (Sigma.snd If i))
      fun If => ⋂ i, Sigma.snd If i
⊢ RegularSpace X

Next tactic:
refine' RegularSpace.ofBasis this fun a If hIf => isClosed_iInter fun i => _
theorem regularSpace_sInf {X} {T : Set (TopologicalSpace X)} (h : ∀ t ∈ T, @RegularSpace X t) :
    @RegularSpace X (sInf T) := by
  let _ := sInf T
  have : ∀ a, (𝓝 a).HasBasis
      (fun If : ΣI : Set T, I → Set X =>
        If.1.Finite ∧ ∀ i : If.1, If.2 i ∈ @nhds X i a ∧ @IsClosed X i (If.2 i))
      fun If => ⋂ i : If.1, If.snd i := by
    intro a
    rw [nhds_sInf, ← iInf_subtype'']
    exact hasBasis_iInf fun t : T => @closed_nhds_basis X t (h t t.2) a
  refine' RegularSpace.ofBasis this fun a If hIf => isClosed_iInter fun i => _
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
inst✝ : RegularSpace X✝
x : X✝
s : Set X✝
X : Type u_3
T : Set (TopologicalSpace X)
h : ∀ t ∈ T, RegularSpace X
x✝ : TopologicalSpace X := sInf T
this :
  ∀ (a : X),
    HasBasis (𝓝 a) (fun If => Set.Finite If.fst ∧ ∀ (i : ↑If.fst), Sigma.snd If i ∈ 𝓝 a ∧ IsClosed (Sigma.snd If i))
      fun If => ⋂ i, Sigma.snd If i
a : X
If : (I : Set ↑T) × (↑I → Set X)
hIf : Set.Finite If.fst ∧ ∀ (i : ↑If.fst), Sigma.snd If i ∈ 𝓝 a ∧ IsClosed (Sigma.snd If i)
i : ↑If.fst
⊢ IsClosed (Sigma.snd If i)

Next tactic:
exact (hIf.2 i).2.mono (sInf_le (i : T).2)
theorem RegularSpace.inf {X} {t₁ t₂ : TopologicalSpace X} (h₁ : @RegularSpace X t₁)
    (h₂ : @RegularSpace X t₂) : @RegularSpace X (t₁ ⊓ t₂) := by
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
inst✝ : RegularSpace X✝
x : X✝
s : Set X✝
X : Type u_3
t₁ t₂ : TopologicalSpace X
h₁ : RegularSpace X
h₂ : RegularSpace X
⊢ RegularSpace X

Next tactic:
rw [inf_eq_iInf]
theorem RegularSpace.inf {X} {t₁ t₂ : TopologicalSpace X} (h₁ : @RegularSpace X t₁)
    (h₂ : @RegularSpace X t₂) : @RegularSpace X (t₁ ⊓ t₂) := by
  rw [inf_eq_iInf]
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
inst✝ : RegularSpace X✝
x : X✝
s : Set X✝
X : Type u_3
t₁ t₂ : TopologicalSpace X
h₁ : RegularSpace X
h₂ : RegularSpace X
⊢ RegularSpace X

Next tactic:
exact regularSpace_iInf (Bool.forall_bool.2 ⟨h₂, h₁⟩)
instance (priority := 150) [T2Space X] : ClosableCompactSubsetOpenSpace X :=
  ⟨fun K _U K_comp _U_open KU ↦ by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T2Space X
K _U : Set X
K_comp : IsCompact K
_U_open : IsOpen _U
KU : K ⊆ _U
⊢ closure K ⊆ _U

Next tactic:
rwa [K_comp.isClosed.closure_eq]
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  

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

Next tactic:
refine ⟨fun s u hs hu h ↦ ?_⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ closure s ⊆ u

Next tactic:
obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
      exact ⟨F ∪ F', union_subset_union tF t'F', F_closed.union F'_closed, union_subset Fu F'u⟩
    · intro x hx
      rcases exists_mem_nhds_isClosed_subset (hu.mem_nhds (h hx)) with ⟨F, F_mem, F_closed, Fu⟩
      exact ⟨F, nhdsWithin_le_nhds F_mem, F, Subset.rfl, F_closed, Fu⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · 

Proof state:
case he
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ ∃ F, ∅ ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
exact ⟨∅, by simp⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ ∅ ⊆ ∅ ∧ IsClosed ∅ ∧ ∅ ⊆ u

Next tactic:
simp
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · 

Proof state:
case hmono
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ ∀ ⦃s t : Set X⦄, s ⊆ t → (∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u) → ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
intro t' t ht't ⟨F, tF, F_closed, Fu⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      

Proof state:
case hmono
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
t' t : Set X
ht't : t' ⊆ t
F : Set X
tF : t ⊆ F
F_closed : IsClosed F
Fu : F ⊆ u
⊢ ∃ F, t' ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
exact ⟨F, ht't.trans tF, F_closed, Fu⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · 

Proof state:
case hunion
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ ∀ ⦃s t : Set X⦄,
    (∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u) → (∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u) → ∃ F, s ∪ t ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
      

Proof state:
case hunion
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
t t' F : Set X
tF : t ⊆ F
F_closed : IsClosed F
Fu : F ⊆ u
F' : Set X
t'F' : t' ⊆ F'
F'_closed : IsClosed F'
F'u : F' ⊆ u
⊢ ∃ F, t ∪ t' ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
exact ⟨F ∪ F', union_subset_union tF t'F', F_closed.union F'_closed, union_subset Fu F'u⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
      exact ⟨F ∪ F', union_subset_union tF t'F', F_closed.union F'_closed, union_subset Fu F'u⟩
    · 

Proof state:
case hnhds
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
⊢ ∀ x ∈ s, ∃ t ∈ 𝓝[s] x, ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
intro x hx
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
      exact ⟨F ∪ F', union_subset_union tF t'F', F_closed.union F'_closed, union_subset Fu F'u⟩
    · intro x hx
      

Proof state:
case hnhds
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
x : X
hx : x ∈ s
⊢ ∃ t ∈ 𝓝[s] x, ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
rcases exists_mem_nhds_isClosed_subset (hu.mem_nhds (h hx)) with ⟨F, F_mem, F_closed, Fu⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
      exact ⟨F ∪ F', union_subset_union tF t'F', F_closed.union F'_closed, union_subset Fu F'u⟩
    · intro x hx
      rcases exists_mem_nhds_isClosed_subset (hu.mem_nhds (h hx)) with ⟨F, F_mem, F_closed, Fu⟩
      

Proof state:
case hnhds.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
x : X
hx : x ∈ s
F : Set X
F_mem : F ∈ 𝓝 x
F_closed : IsClosed F
Fu : F ⊆ u
⊢ ∃ t ∈ 𝓝[s] x, ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u

Next tactic:
exact ⟨F, nhdsWithin_le_nhds F_mem, F, Subset.rfl, F_closed, Fu⟩
/-- In a (possibly non-Hausdorff) regular space, if a compact set `s` is contained in an
open set `u`, then its closure is also contained in `u`. -/
instance (priority := 150) [RegularSpace X] : ClosableCompactSubsetOpenSpace X := by
  refine ⟨fun s u hs hu h ↦ ?_⟩
  obtain ⟨F, sF, F_closed, Fu⟩ : ∃ F, s ⊆ F ∧ IsClosed F ∧ F ⊆ u := by
    apply hs.induction_on (p := fun t ↦ ∃ F, t ⊆ F ∧ IsClosed F ∧ F ⊆ u)
    · exact ⟨∅, by simp⟩
    · intro t' t ht't ⟨F, tF, F_closed, Fu⟩
      exact ⟨F, ht't.trans tF, F_closed, Fu⟩
    · intro t t' ⟨F, tF, F_closed, Fu⟩ ⟨F', t'F', F'_closed, F'u⟩
      exact ⟨F ∪ F', union_subset_union tF t'F', F_closed.union F'_closed, union_subset Fu F'u⟩
    · intro x hx
      rcases exists_mem_nhds_isClosed_subset (hu.mem_nhds (h hx)) with ⟨F, F_mem, F_closed, Fu⟩
      exact ⟨F, nhdsWithin_le_nhds F_mem, F, Subset.rfl, F_closed, Fu⟩
  

Proof state:
case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
s u : Set X
hs : IsCompact s
hu : IsOpen u
h : s ⊆ u
F : Set X
sF : s ⊆ F
F_closed : IsClosed F
Fu : F ⊆ u
⊢ closure s ⊆ u

Next tactic:
exact (closure_minimal sF F_closed).trans Fu
/-- 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
  

Proof state:
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, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U

Next tactic:
rcases exists_compact_between hK hU h_KU with ⟨L, L_comp, KL, LU⟩
/-- 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⟩
  

Proof state:
case intro.intro.intro
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
⊢ ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U

Next tactic:
rcases exists_compact_between hK isOpen_interior KL with ⟨M, M_comp, KM, ML⟩
/-- 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⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
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
⊢ ∃ L, IsCompact L ∧ IsClosed L ∧ K ⊆ interior L ∧ L ⊆ U

Next tactic:
refine ⟨closure M, ?_, 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, ?_, ?_⟩
  · 

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
⊢ IsCompact (closure M)

Next tactic:
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
/-- 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
      

Proof state:
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 ∩ L = closure M

Next tactic:
apply inter_eq_self_of_subset_left
/-- 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
      

Proof state:
case a
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 ⊆ L

Next tactic:
exact (M_comp.closure_subset_of_isOpen isOpen_interior ML).trans interior_subset
/-- 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
    

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)

Next tactic:
rw [← this]