l3lab/ntp-mathlib huggingface dataset:
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
⊢ SeparatedNhds s t

Next tactic:
refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · 

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ s
⊢ x ∈ ⋃ u ∈ U, ↑u \ ⋃ v ∈ V, ⋃ (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v

Next tactic:
rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ s
u : ↑(countableBasis X)
huU : u ∈ U
hxu : x ∈ ↑u
⊢ x ∈ ⋃ u ∈ U, ↑u \ ⋃ v ∈ V, ⋃ (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v

Next tactic:
refine' mem_biUnion huU ⟨hxu, _⟩
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
    refine' mem_biUnion huU ⟨hxu, _⟩
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ s
u : ↑(countableBasis X)
huU : u ∈ U
hxu : x ∈ ↑u
⊢ x ∉ ⋃ v ∈ V, ⋃ (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v

Next tactic:
simp only [mem_iUnion]
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
    refine' mem_biUnion huU ⟨hxu, _⟩
    simp only [mem_iUnion]
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ s
u : ↑(countableBasis X)
huU : u ∈ U
hxu : x ∈ ↑u
⊢ ¬∃ i, ∃ (_ : i ∈ V) (_ : Encodable.encode i ≤ Encodable.encode u), x ∈ closure ↑i

Next tactic:
rintro ⟨v, hvV, -, hxv⟩
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
    refine' mem_biUnion huU ⟨hxu, _⟩
    simp only [mem_iUnion]
    rintro ⟨v, hvV, -, hxv⟩
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_1.intro.intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ s
u : ↑(countableBasis X)
huU : u ∈ U
hxu : x ∈ ↑u
v : ↑(countableBasis X)
hvV : v ∈ V
hxv : x ∈ closure ↑v
⊢ False

Next tactic:
exact (hVd v hvV).le_bot ⟨hxv, hx⟩
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
    refine' mem_biUnion huU ⟨hxu, _⟩
    simp only [mem_iUnion]
    rintro ⟨v, hvV, -, hxv⟩
    exact (hVd v hvV).le_bot ⟨hxv, hx⟩
  · 

Proof state:
case intro.intro.intro.intro.intro.intro.refine_2
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ t
⊢ x ∈ ⋃ v ∈ V, ↑v \ ⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u

Next tactic:
rcases mem_iUnion₂.1 (htV hx) with ⟨v, hvV, hxv⟩
/-- A regular topological space with second countable topology is a normal space. -/
instance (priority := 100) NormalSpace.of_regularSpace_secondCountableTopology
    [RegularSpace X] [SecondCountableTopology X] : NormalSpace X := by
  have key : ∀ {s t : Set X}, IsClosed t → Disjoint s t →
    ∃ U : Set (countableBasis X), (s ⊆ ⋃ u ∈ U, ↑u) ∧ (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
      ∀ n : ℕ, IsClosed (⋃ (u ∈ U) (_ : Encodable.encode u ≤ n), closure (u : Set X)) := by
    intro s t hc hd
    rw [disjoint_left] at hd
    have : ∀ x ∈ s, ∃ U ∈ countableBasis X, x ∈ U ∧ Disjoint (closure U) t := by
      intro x hx
      rcases (isBasis_countableBasis X).exists_closure_subset (hc.compl_mem_nhds (hd hx))
        with ⟨u, hu, hxu, hut⟩
      exact ⟨u, hu, hxu, disjoint_left.2 hut⟩
    choose! U hu hxu hd using this
    set V : s → countableBasis X := MapsTo.restrict _ _ _ hu
    refine' ⟨range V, _, forall_range_iff.2 <| Subtype.forall.2 hd, fun n => _⟩
    · rw [biUnion_range]
      exact fun x hx => mem_iUnion.2 ⟨⟨x, hx⟩, hxu x hx⟩
    · simp only [← iSup_eq_iUnion, iSup_and']
      exact (((finite_le_nat n).preimage_embedding (Encodable.encode' _)).subset <|
        inter_subset_right _ _).isClosed_biUnion fun u _ => isClosed_closure
  refine' { normal := fun s t hs ht hd => _ }
  rcases key ht hd with ⟨U, hsU, hUd, hUc⟩
  rcases key hs hd.symm with ⟨V, htV, hVd, hVc⟩
  refine ⟨⋃ u ∈ U, ↑u \ ⋃ (v ∈ V) (_ : Encodable.encode v ≤ Encodable.encode u), closure ↑v,
    ⋃ v ∈ V, ↑v \ ⋃ (u ∈ U) (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u,
    isOpen_biUnion fun u _ => (isOpen_of_mem_countableBasis u.2).sdiff (hVc _),
    isOpen_biUnion fun v _ => (isOpen_of_mem_countableBasis v.2).sdiff (hUc _),
    fun x hx => ?_, fun x hx => ?_, ?_⟩
  · rcases mem_iUnion₂.1 (hsU hx) with ⟨u, huU, hxu⟩
    refine' mem_biUnion huU ⟨hxu, _⟩
    simp only [mem_iUnion]
    rintro ⟨v, hvV, -, hxv⟩
    exact (hVd v hvV).le_bot ⟨hxv, hx⟩
  · rcases mem_iUnion₂.1 (htV hx) with ⟨v, hvV, hxv⟩
    

Proof state:
case intro.intro.intro.intro.intro.intro.refine_2.intro.intro
X : Type u_1
Y : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : RegularSpace X
inst✝ : SecondCountableTopology X
key :
  ∀ {s t : Set X},
    IsClosed t →
      Disjoint s t →
        ∃ U,
          s ⊆ ⋃ u ∈ U, ↑u ∧
            (∀ u ∈ U, Disjoint (closure ↑u) t) ∧
              ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
s t : Set X
hs : IsClosed s
ht : IsClosed t
hd : Disjoint s t
U : Set ↑(countableBasis X)
hsU : s ⊆ ⋃ u ∈ U, ↑u
hUd : ∀ u ∈ U, Disjoint (closure ↑u) t
hUc : ∀ (n : ℕ), IsClosed (⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
V : Set ↑(countableBasis X)
htV : t ⊆ ⋃ u ∈ V, ↑u
hVd : ∀ u ∈ V, Disjoint (closure ↑u) s
hVc : ∀ (n : ℕ), IsClosed (⋃ u ∈ V, ⋃ (_ : Encodable.encode u ≤ n), closure ↑u)
x : X
hx : x ∈ t
v : ↑(countableBasis X)
hvV : v ∈ V
hxv : x ∈ ↑v
⊢ x ∈ ⋃ v ∈ V, ↑v \ ⋃ u ∈ U, ⋃ (_ : Encodable.encode u ≤ Encodable.encode v), closure ↑u

Next tactic:
refine' mem_biUnion hvV ⟨hxv, _⟩