l3lab/ntp-mathlib huggingface dataset:
theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
    List.TFAE [RegularSpace X,
      ∀ (s : Set X) x, x ∉ closure s → Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s,
      ∀ (x : X) (s : Set X), s ∈ 𝓝 x → ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x,
      ∀ x : X , (𝓝 x).lift' closure = 𝓝 x] := by
  tfae_have 1 ↔ 5
  · rw [regularSpace_iff, (@compl_surjective (Set X) _).forall, forall_swap]
    simp only [isClosed_compl_iff, mem_compl_iff, Classical.not_not, @and_comm (_ ∈ _),
      (nhds_basis_opens _).lift'_closure.le_basis_iff (nhds_basis_opens _), and_imp,
      (nhds_basis_opens _).disjoint_iff_right, exists_prop, ← subset_interior_iff_mem_nhdsSet,
      interior_compl, compl_subset_compl]
  tfae_have 5 → 6
  · exact fun h a => (h a).antisymm (𝓝 _).le_lift'_closure
  tfae_have 6 → 4
  · intro H a s hs
    rw [← H] at hs
    rcases (𝓝 a).basis_sets.lift'_closure.mem_iff.mp hs with ⟨U, hU, hUs⟩
    exact ⟨closure U, mem_of_superset hU subset_closure, isClosed_closure, hUs⟩
  tfae_have 4 → 2
  · intro H s a ha
    have ha' : sᶜ ∈ 𝓝 a := by rwa [← mem_interior_iff_mem_nhds, interior_compl]
    rcases H _ _ ha' with ⟨U, hU, hUc, hUs⟩
    refine' disjoint_of_disjoint_of_mem disjoint_compl_left _ hU
    rwa [← subset_interior_iff_mem_nhdsSet, hUc.isOpen_compl.interior_eq, subset_compl_comm]
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
X : Type u
inst✝ : TopologicalSpace X
tfae_1_iff_5 : RegularSpace X ↔ ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x
tfae_5_to_6 : (∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x) → ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x
tfae_6_to_4 : (∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x) → ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
tfae_4_to_2 :
  (∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) → ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
⊢ List.TFAE
    [RegularSpace X, ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s, ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x, ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x]

Next tactic:
tfae_have 2 → 3
theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
    List.TFAE [RegularSpace X,
      ∀ (s : Set X) x, x ∉ closure s → Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s,
      ∀ (x : X) (s : Set X), s ∈ 𝓝 x → ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x,
      ∀ x : X , (𝓝 x).lift' closure = 𝓝 x] := by
  tfae_have 1 ↔ 5
  · rw [regularSpace_iff, (@compl_surjective (Set X) _).forall, forall_swap]
    simp only [isClosed_compl_iff, mem_compl_iff, Classical.not_not, @and_comm (_ ∈ _),
      (nhds_basis_opens _).lift'_closure.le_basis_iff (nhds_basis_opens _), and_imp,
      (nhds_basis_opens _).disjoint_iff_right, exists_prop, ← subset_interior_iff_mem_nhdsSet,
      interior_compl, compl_subset_compl]
  tfae_have 5 → 6
  · exact fun h a => (h a).antisymm (𝓝 _).le_lift'_closure
  tfae_have 6 → 4
  · intro H a s hs
    rw [← H] at hs
    rcases (𝓝 a).basis_sets.lift'_closure.mem_iff.mp hs with ⟨U, hU, hUs⟩
    exact ⟨closure U, mem_of_superset hU subset_closure, isClosed_closure, hUs⟩
  tfae_have 4 → 2
  · intro H s a ha
    have ha' : sᶜ ∈ 𝓝 a := by rwa [← mem_interior_iff_mem_nhds, interior_compl]
    rcases H _ _ ha' with ⟨U, hU, hUc, hUs⟩
    refine' disjoint_of_disjoint_of_mem disjoint_compl_left _ hU
    rwa [← subset_interior_iff_mem_nhdsSet, hUc.isOpen_compl.interior_eq, subset_compl_comm]
  tfae_have 2 → 3
  · 

Proof state:
case tfae_2_to_3
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
X : Type u
inst✝ : TopologicalSpace X
tfae_1_iff_5 : RegularSpace X ↔ ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x
tfae_5_to_6 : (∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x) → ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x
tfae_6_to_4 : (∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x) → ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
tfae_4_to_2 :
  (∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) → ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
⊢ (∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)) → ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s

Next tactic:
refine' fun H a s => ⟨fun hd has => mem_closure_iff_nhds_neBot.mp has _, H s a⟩
theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
    List.TFAE [RegularSpace X,
      ∀ (s : Set X) x, x ∉ closure s → Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s,
      ∀ (x : X) (s : Set X), s ∈ 𝓝 x → ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x,
      ∀ x : X , (𝓝 x).lift' closure = 𝓝 x] := by
  tfae_have 1 ↔ 5
  · rw [regularSpace_iff, (@compl_surjective (Set X) _).forall, forall_swap]
    simp only [isClosed_compl_iff, mem_compl_iff, Classical.not_not, @and_comm (_ ∈ _),
      (nhds_basis_opens _).lift'_closure.le_basis_iff (nhds_basis_opens _), and_imp,
      (nhds_basis_opens _).disjoint_iff_right, exists_prop, ← subset_interior_iff_mem_nhdsSet,
      interior_compl, compl_subset_compl]
  tfae_have 5 → 6
  · exact fun h a => (h a).antisymm (𝓝 _).le_lift'_closure
  tfae_have 6 → 4
  · intro H a s hs
    rw [← H] at hs
    rcases (𝓝 a).basis_sets.lift'_closure.mem_iff.mp hs with ⟨U, hU, hUs⟩
    exact ⟨closure U, mem_of_superset hU subset_closure, isClosed_closure, hUs⟩
  tfae_have 4 → 2
  · intro H s a ha
    have ha' : sᶜ ∈ 𝓝 a := by rwa [← mem_interior_iff_mem_nhds, interior_compl]
    rcases H _ _ ha' with ⟨U, hU, hUc, hUs⟩
    refine' disjoint_of_disjoint_of_mem disjoint_compl_left _ hU
    rwa [← subset_interior_iff_mem_nhdsSet, hUc.isOpen_compl.interior_eq, subset_compl_comm]
  tfae_have 2 → 3
  · refine' fun H a s => ⟨fun hd has => mem_closure_iff_nhds_neBot.mp has _, H s a⟩
    

Proof state:
case tfae_2_to_3
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
X : Type u
inst✝ : TopologicalSpace X
tfae_1_iff_5 : RegularSpace X ↔ ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x
tfae_5_to_6 : (∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x) → ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x
tfae_6_to_4 : (∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x) → ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
tfae_4_to_2 :
  (∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) → ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
H : ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
a : X
s : Set X
hd : Disjoint (𝓝ˢ s) (𝓝 a)
has : a ∈ closure s
⊢ 𝓝 a ⊓ 𝓟 s = ⊥

Next tactic:
exact (hd.symm.mono_right <| @principal_le_nhdsSet _ _ s).eq_bot
theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
    List.TFAE [RegularSpace X,
      ∀ (s : Set X) x, x ∉ closure s → Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s,
      ∀ (x : X) (s : Set X), s ∈ 𝓝 x → ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x,
      ∀ x : X , (𝓝 x).lift' closure = 𝓝 x] := by
  tfae_have 1 ↔ 5
  · rw [regularSpace_iff, (@compl_surjective (Set X) _).forall, forall_swap]
    simp only [isClosed_compl_iff, mem_compl_iff, Classical.not_not, @and_comm (_ ∈ _),
      (nhds_basis_opens _).lift'_closure.le_basis_iff (nhds_basis_opens _), and_imp,
      (nhds_basis_opens _).disjoint_iff_right, exists_prop, ← subset_interior_iff_mem_nhdsSet,
      interior_compl, compl_subset_compl]
  tfae_have 5 → 6
  · exact fun h a => (h a).antisymm (𝓝 _).le_lift'_closure
  tfae_have 6 → 4
  · intro H a s hs
    rw [← H] at hs
    rcases (𝓝 a).basis_sets.lift'_closure.mem_iff.mp hs with ⟨U, hU, hUs⟩
    exact ⟨closure U, mem_of_superset hU subset_closure, isClosed_closure, hUs⟩
  tfae_have 4 → 2
  · intro H s a ha
    have ha' : sᶜ ∈ 𝓝 a := by rwa [← mem_interior_iff_mem_nhds, interior_compl]
    rcases H _ _ ha' with ⟨U, hU, hUc, hUs⟩
    refine' disjoint_of_disjoint_of_mem disjoint_compl_left _ hU
    rwa [← subset_interior_iff_mem_nhdsSet, hUc.isOpen_compl.interior_eq, subset_compl_comm]
  tfae_have 2 → 3
  · refine' fun H a s => ⟨fun hd has => mem_closure_iff_nhds_neBot.mp has _, H s a⟩
    exact (hd.symm.mono_right <| @principal_le_nhdsSet _ _ s).eq_bot
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
X : Type u
inst✝ : TopologicalSpace X
tfae_1_iff_5 : RegularSpace X ↔ ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x
tfae_5_to_6 : (∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x) → ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x
tfae_6_to_4 : (∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x) → ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
tfae_4_to_2 :
  (∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) → ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
tfae_2_to_3 :
  (∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)) → ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
⊢ List.TFAE
    [RegularSpace X, ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s, ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x, ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x]

Next tactic:
tfae_have 3 → 1
theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
    List.TFAE [RegularSpace X,
      ∀ (s : Set X) x, x ∉ closure s → Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s,
      ∀ (x : X) (s : Set X), s ∈ 𝓝 x → ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x,
      ∀ x : X , (𝓝 x).lift' closure = 𝓝 x] := by
  tfae_have 1 ↔ 5
  · rw [regularSpace_iff, (@compl_surjective (Set X) _).forall, forall_swap]
    simp only [isClosed_compl_iff, mem_compl_iff, Classical.not_not, @and_comm (_ ∈ _),
      (nhds_basis_opens _).lift'_closure.le_basis_iff (nhds_basis_opens _), and_imp,
      (nhds_basis_opens _).disjoint_iff_right, exists_prop, ← subset_interior_iff_mem_nhdsSet,
      interior_compl, compl_subset_compl]
  tfae_have 5 → 6
  · exact fun h a => (h a).antisymm (𝓝 _).le_lift'_closure
  tfae_have 6 → 4
  · intro H a s hs
    rw [← H] at hs
    rcases (𝓝 a).basis_sets.lift'_closure.mem_iff.mp hs with ⟨U, hU, hUs⟩
    exact ⟨closure U, mem_of_superset hU subset_closure, isClosed_closure, hUs⟩
  tfae_have 4 → 2
  · intro H s a ha
    have ha' : sᶜ ∈ 𝓝 a := by rwa [← mem_interior_iff_mem_nhds, interior_compl]
    rcases H _ _ ha' with ⟨U, hU, hUc, hUs⟩
    refine' disjoint_of_disjoint_of_mem disjoint_compl_left _ hU
    rwa [← subset_interior_iff_mem_nhdsSet, hUc.isOpen_compl.interior_eq, subset_compl_comm]
  tfae_have 2 → 3
  · refine' fun H a s => ⟨fun hd has => mem_closure_iff_nhds_neBot.mp has _, H s a⟩
    exact (hd.symm.mono_right <| @principal_le_nhdsSet _ _ s).eq_bot
  tfae_have 3 → 1
  · 

Proof state:
case tfae_3_to_1
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
X : Type u
inst✝ : TopologicalSpace X
tfae_1_iff_5 : RegularSpace X ↔ ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x
tfae_5_to_6 : (∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x) → ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x
tfae_6_to_4 : (∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x) → ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
tfae_4_to_2 :
  (∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) → ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
tfae_2_to_3 :
  (∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)) → ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
⊢ (∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s) → RegularSpace X

Next tactic:
exact fun H => ⟨fun hs ha => (H _ _).mpr <| hs.closure_eq.symm ▸ ha⟩
theorem regularSpace_TFAE (X : Type u) [TopologicalSpace X] :
    List.TFAE [RegularSpace X,
      ∀ (s : Set X) x, x ∉ closure s → Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s,
      ∀ (x : X) (s : Set X), s ∈ 𝓝 x → ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ x : X, (𝓝 x).lift' closure ≤ 𝓝 x,
      ∀ x : X , (𝓝 x).lift' closure = 𝓝 x] := by
  tfae_have 1 ↔ 5
  · rw [regularSpace_iff, (@compl_surjective (Set X) _).forall, forall_swap]
    simp only [isClosed_compl_iff, mem_compl_iff, Classical.not_not, @and_comm (_ ∈ _),
      (nhds_basis_opens _).lift'_closure.le_basis_iff (nhds_basis_opens _), and_imp,
      (nhds_basis_opens _).disjoint_iff_right, exists_prop, ← subset_interior_iff_mem_nhdsSet,
      interior_compl, compl_subset_compl]
  tfae_have 5 → 6
  · exact fun h a => (h a).antisymm (𝓝 _).le_lift'_closure
  tfae_have 6 → 4
  · intro H a s hs
    rw [← H] at hs
    rcases (𝓝 a).basis_sets.lift'_closure.mem_iff.mp hs with ⟨U, hU, hUs⟩
    exact ⟨closure U, mem_of_superset hU subset_closure, isClosed_closure, hUs⟩
  tfae_have 4 → 2
  · intro H s a ha
    have ha' : sᶜ ∈ 𝓝 a := by rwa [← mem_interior_iff_mem_nhds, interior_compl]
    rcases H _ _ ha' with ⟨U, hU, hUc, hUs⟩
    refine' disjoint_of_disjoint_of_mem disjoint_compl_left _ hU
    rwa [← subset_interior_iff_mem_nhdsSet, hUc.isOpen_compl.interior_eq, subset_compl_comm]
  tfae_have 2 → 3
  · refine' fun H a s => ⟨fun hd has => mem_closure_iff_nhds_neBot.mp has _, H s a⟩
    exact (hd.symm.mono_right <| @principal_le_nhdsSet _ _ s).eq_bot
  tfae_have 3 → 1
  · exact fun H => ⟨fun hs ha => (H _ _).mpr <| hs.closure_eq.symm ▸ ha⟩
  

Proof state:
X✝ : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X✝
X : Type u
inst✝ : TopologicalSpace X
tfae_1_iff_5 : RegularSpace X ↔ ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x
tfae_5_to_6 : (∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x) → ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x
tfae_6_to_4 : (∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x) → ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
tfae_4_to_2 :
  (∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s) → ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)
tfae_2_to_3 :
  (∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x)) → ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
tfae_3_to_1 : (∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s) → RegularSpace X
⊢ List.TFAE
    [RegularSpace X, ∀ (s : Set X), ∀ x ∉ closure s, Disjoint (𝓝ˢ s) (𝓝 x),
      ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s, ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s,
      ∀ (x : X), Filter.lift' (𝓝 x) closure ≤ 𝓝 x, ∀ (x : X), Filter.lift' (𝓝 x) closure = 𝓝 x]

Next tactic:
tfae_finish
/-- A locally compact T2 space is regular. -/
instance [LocallyCompactSpace X] [T2Space X] : RegularSpace X := by
  

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

Next tactic:
apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
/-- A locally compact T2 space is regular. -/
instance [LocallyCompactSpace X] [T2Space 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✝ : T2Space X
x : X
s : Set X
hx : s ∈ 𝓝 x
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
rcases local_compact_nhds hx with ⟨k, kx, ks, hk⟩
/-- A locally compact T2 space is regular. -/
instance [LocallyCompactSpace X] [T2Space X] : RegularSpace X := by
  apply RegularSpace.ofExistsMemNhdsIsClosedSubset (fun x s hx ↦ ?_)
  rcases local_compact_nhds hx with ⟨k, kx, ks, hk⟩
  

Proof state:
case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : LocallyCompactSpace X
inst✝ : T2Space X
x : X
s : Set X
hx : s ∈ 𝓝 x
k : Set X
kx : k ∈ 𝓝 x
ks : k ⊆ s
hk : IsCompact k
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
exact ⟨k, kx, hk.isClosed, ks⟩
theorem disjoint_nhdsSet_nhds : Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s

Next tactic:
have h := (regularSpace_TFAE X).out 0 2
theorem disjoint_nhdsSet_nhds : Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s := by
  have h := (regularSpace_TFAE X).out 0 2
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
h : RegularSpace X ↔ ∀ (x : X) (s : Set X), Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s
⊢ Disjoint (𝓝ˢ s) (𝓝 x) ↔ x ∉ closure s

Next tactic:
exact h.mp ‹_› _ _
theorem exists_mem_nhds_isClosed_subset {x : X} {s : Set X} (h : s ∈ 𝓝 x) :
    ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s := by
  

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

Next tactic:
have h' := (regularSpace_TFAE X).out 0 3
theorem exists_mem_nhds_isClosed_subset {x : X} {s : Set X} (h : s ∈ 𝓝 x) :
    ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s := by
  have h' := (regularSpace_TFAE X).out 0 3
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x✝ : X
s✝ : Set X
x : X
s : Set X
h : s ∈ 𝓝 x
h' : RegularSpace X ↔ ∀ (x : X), ∀ s ∈ 𝓝 x, ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s
⊢ ∃ t ∈ 𝓝 x, IsClosed t ∧ t ⊆ s

Next tactic:
exact h'.mp ‹_› _ _ h
theorem TopologicalSpace.IsTopologicalBasis.nhds_basis_closure {B : Set (Set X)}
    (hB : IsTopologicalBasis B) (x : X) :
    (𝓝 x).HasBasis (fun s : Set X => x ∈ s ∧ s ∈ B) closure := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x✝ : X
s : Set X
B : Set (Set X)
hB : IsTopologicalBasis B
x : X
⊢ HasBasis (𝓝 x) (fun s => x ∈ s ∧ s ∈ B) closure

Next tactic:
simpa only [and_comm] using hB.nhds_hasBasis.nhds_closure
theorem TopologicalSpace.IsTopologicalBasis.exists_closure_subset {B : Set (Set X)}
    (hB : IsTopologicalBasis B) {x : X} {s : Set X} (h : s ∈ 𝓝 x) :
    ∃ t ∈ B, x ∈ t ∧ closure t ⊆ s := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x✝ : X
s✝ : Set X
B : Set (Set X)
hB : IsTopologicalBasis B
x : X
s : Set X
h : s ∈ 𝓝 x
⊢ ∃ t ∈ B, x ∈ t ∧ closure t ⊆ s

Next tactic:
simpa only [exists_prop, and_assoc] using hB.nhds_hasBasis.nhds_closure.mem_iff.mp h
theorem disjoint_nhds_nhds_iff_not_specializes {a b : X} : Disjoint (𝓝 a) (𝓝 b) ↔ ¬a ⤳ b := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
a b : X
⊢ Disjoint (𝓝 a) (𝓝 b) ↔ ¬a ⤳ b

Next tactic:
rw [← nhdsSet_singleton, disjoint_nhdsSet_nhds, specializes_iff_mem_closure]
theorem specializes_comm {a b : X} : a ⤳ b ↔ b ⤳ a := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
a b : X
⊢ a ⤳ b ↔ b ⤳ a

Next tactic:
simp only [← (disjoint_nhds_nhds_iff_not_specializes (X := X)).not_left, disjoint_comm]
theorem isClosed_setOf_specializes : IsClosed { p : X × X | p.1 ⤳ p.2 } := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ IsClosed {p | p.1 ⤳ p.2}

Next tactic:
simp only [← isOpen_compl_iff, compl_setOf, ← disjoint_nhds_nhds_iff_not_specializes,
    isOpen_setOf_disjoint_nhds_nhds]
theorem isClosed_setOf_inseparable : IsClosed { p : X × X | Inseparable p.1 p.2 } := by
  

Proof state:
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ IsClosed {p | Inseparable p.1 p.2}

Next tactic:
simp only [← specializes_iff_inseparable, isClosed_setOf_specializes]
protected theorem Inducing.regularSpace [TopologicalSpace Y] {f : Y → X} (hf : Inducing f) :
    RegularSpace Y :=
  RegularSpace.ofBasis
    (fun b => by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
x : X
s : Set X
inst✝ : TopologicalSpace Y
f : Y → X
hf : Inducing f
b : Y
⊢ HasBasis (𝓝 b) (?m.175826 hf b) (?m.175827 hf b)

Next tactic:
rw [hf.nhds_eq_comap b]
protected theorem Inducing.regularSpace [TopologicalSpace Y] {f : Y → X} (hf : Inducing f) :
    RegularSpace Y :=
  RegularSpace.ofBasis
    (fun b => by rw [hf.nhds_eq_comap b]; 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
x : X
s : Set X
inst✝ : TopologicalSpace Y
f : Y → X
hf : Inducing f
b : Y
⊢ HasBasis (comap f (𝓝 (f b))) (?m.175826 hf b) (?m.175827 hf b)
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ [inst : TopologicalSpace Y] → {f : Y → X} → Inducing f → Y → Sort ?u.175756
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ [inst : TopologicalSpace Y] → {f : Y → X} → (hf : Inducing f) → (a : Y) → ?m.175825 hf a → Prop
X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : RegularSpace X
x : X
s : Set X
⊢ [inst : TopologicalSpace Y] → {f : Y → X} → (hf : Inducing f) → (a : Y) → ?m.175825 hf a → Set Y

Next tactic:
exact (closed_nhds_basis _).comap _
protected theorem Inducing.regularSpace [TopologicalSpace Y] {f : Y → X} (hf : Inducing f) :
    RegularSpace Y :=
  RegularSpace.ofBasis
    (fun b => by rw [hf.nhds_eq_comap b]; exact (closed_nhds_basis _).comap _)
    fun b s hs => by 

Proof state:
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
x : X
s✝ : Set X
inst✝ : TopologicalSpace Y
f : Y → X
hf : Inducing f
b : Y
s : Set X
hs : s ∈ 𝓝 (f b) ∧ IsClosed s
⊢ IsClosed (f ⁻¹' id s)

Next tactic:
exact hs.2.preimage hf.continuous
theorem regularSpace_sInf {X} {T : Set (TopologicalSpace X)} (h : ∀ t ∈ T, @RegularSpace X t) :
    @RegularSpace X (sInf 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 : Set (TopologicalSpace X)
h : ∀ t ∈ T, RegularSpace X
⊢ RegularSpace X

Next tactic:
let _ := sInf T
theorem regularSpace_sInf {X} {T : Set (TopologicalSpace X)} (h : ∀ t ∈ T, @RegularSpace X t) :
    @RegularSpace X (sInf T) := by
  let _ := sInf T
  

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
⊢ RegularSpace X

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

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 (𝓝 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:
intro 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
    

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 (𝓝 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:
rw [nhds_sInf, ← iInf_subtype'']