l3lab/ntp-mathlib huggingface dataset:
/-- In a separable space, a family of nonempty disjoint open sets is countable. -/
theorem _root_.Set.PairwiseDisjoint.countable_of_isOpen [SeparableSpace α] {ι : Type*}
    {s : ι → Set α} {a : Set ι} (h : a.PairwiseDisjoint s) (ha : ∀ i ∈ a, IsOpen (s i))
    (h'a : ∀ i ∈ a, (s i).Nonempty) : a.Countable := by
  rcases exists_countable_dense α with ⟨u, ⟨u_encodable⟩, u_dense⟩
  have : ∀ i : a, ∃ y, y ∈ s i ∩ u := fun i =>
    dense_iff_inter_open.1 u_dense (s i) (ha i i.2) (h'a i i.2)
  choose f hfs hfu using this
  

Proof state:
case intro.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ i ∈ a, IsOpen (s i)
h'a : ∀ i ∈ a, Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
f : ↑a → α
hfs : ∀ (i : ↑a), f i ∈ s ↑i
hfu : ∀ (i : ↑a), f i ∈ u
⊢ Set.Countable a

Next tactic:
lift f to a → u using hfu
/-- In a separable space, a family of nonempty disjoint open sets is countable. -/
theorem _root_.Set.PairwiseDisjoint.countable_of_isOpen [SeparableSpace α] {ι : Type*}
    {s : ι → Set α} {a : Set ι} (h : a.PairwiseDisjoint s) (ha : ∀ i ∈ a, IsOpen (s i))
    (h'a : ∀ i ∈ a, (s i).Nonempty) : a.Countable := by
  rcases exists_countable_dense α with ⟨u, ⟨u_encodable⟩, u_dense⟩
  have : ∀ i : a, ∃ y, y ∈ s i ∩ u := fun i =>
    dense_iff_inter_open.1 u_dense (s i) (ha i i.2) (h'a i i.2)
  choose f hfs hfu using this
  lift f to a → u using hfu
  

Proof state:
case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ i ∈ a, IsOpen (s i)
h'a : ∀ i ∈ a, Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
f : ↑a → ↑u
hfs : ∀ (i : ↑a), (fun i => ↑(f i)) i ∈ s ↑i
⊢ Set.Countable a

Next tactic:
have f_inj : Injective f := by
    refine' injective_iff_pairwise_ne.mpr
      ((h.subtype _ _).mono fun i j hij hfij => hij.le_bot ⟨hfs i, _⟩)
    simp only [congr_arg Subtype.val hfij, hfs j]
/-- In a separable space, a family of nonempty disjoint open sets is countable. -/
theorem _root_.Set.PairwiseDisjoint.countable_of_isOpen [SeparableSpace α] {ι : Type*}
    {s : ι → Set α} {a : Set ι} (h : a.PairwiseDisjoint s) (ha : ∀ i ∈ a, IsOpen (s i))
    (h'a : ∀ i ∈ a, (s i).Nonempty) : a.Countable := by
  rcases exists_countable_dense α with ⟨u, ⟨u_encodable⟩, u_dense⟩
  have : ∀ i : a, ∃ y, y ∈ s i ∩ u := fun i =>
    dense_iff_inter_open.1 u_dense (s i) (ha i i.2) (h'a i i.2)
  choose f hfs hfu using this
  lift f to a → u using hfu
  have f_inj : Injective f := by
    

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ i ∈ a, IsOpen (s i)
h'a : ∀ i ∈ a, Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
f : ↑a → ↑u
hfs : ∀ (i : ↑a), (fun i => ↑(f i)) i ∈ s ↑i
⊢ Injective f

Next tactic:
refine' injective_iff_pairwise_ne.mpr
      ((h.subtype _ _).mono fun i j hij hfij => hij.le_bot ⟨hfs i, _⟩)
/-- In a separable space, a family of nonempty disjoint open sets is countable. -/
theorem _root_.Set.PairwiseDisjoint.countable_of_isOpen [SeparableSpace α] {ι : Type*}
    {s : ι → Set α} {a : Set ι} (h : a.PairwiseDisjoint s) (ha : ∀ i ∈ a, IsOpen (s i))
    (h'a : ∀ i ∈ a, (s i).Nonempty) : a.Countable := by
  rcases exists_countable_dense α with ⟨u, ⟨u_encodable⟩, u_dense⟩
  have : ∀ i : a, ∃ y, y ∈ s i ∩ u := fun i =>
    dense_iff_inter_open.1 u_dense (s i) (ha i i.2) (h'a i i.2)
  choose f hfs hfu using this
  lift f to a → u using hfu
  have f_inj : Injective f := by
    refine' injective_iff_pairwise_ne.mpr
      ((h.subtype _ _).mono fun i j hij hfij => hij.le_bot ⟨hfs i, _⟩)
    

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ i ∈ a, IsOpen (s i)
h'a : ∀ i ∈ a, Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
f : ↑a → ↑u
hfs : ∀ (i : ↑a), (fun i => ↑(f i)) i ∈ s ↑i
i j : ↑a
hij : (Disjoint on s) ↑i ↑j
hfij : f i = f j
⊢ (fun i => ↑(f i)) i ∈ s ↑j

Next tactic:
simp only [congr_arg Subtype.val hfij, hfs j]
/-- In a separable space, a family of nonempty disjoint open sets is countable. -/
theorem _root_.Set.PairwiseDisjoint.countable_of_isOpen [SeparableSpace α] {ι : Type*}
    {s : ι → Set α} {a : Set ι} (h : a.PairwiseDisjoint s) (ha : ∀ i ∈ a, IsOpen (s i))
    (h'a : ∀ i ∈ a, (s i).Nonempty) : a.Countable := by
  rcases exists_countable_dense α with ⟨u, ⟨u_encodable⟩, u_dense⟩
  have : ∀ i : a, ∃ y, y ∈ s i ∩ u := fun i =>
    dense_iff_inter_open.1 u_dense (s i) (ha i i.2) (h'a i i.2)
  choose f hfs hfu using this
  lift f to a → u using hfu
  have f_inj : Injective f := by
    refine' injective_iff_pairwise_ne.mpr
      ((h.subtype _ _).mono fun i j hij hfij => hij.le_bot ⟨hfs i, _⟩)
    simp only [congr_arg Subtype.val hfij, hfs j]
  

Proof state:
case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ i ∈ a, IsOpen (s i)
h'a : ∀ i ∈ a, Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
f : ↑a → ↑u
hfs : ∀ (i : ↑a), (fun i => ↑(f i)) i ∈ s ↑i
f_inj : Injective f
⊢ Set.Countable a

Next tactic:
exact ⟨@Encodable.ofInj _ _ u_encodable f f_inj⟩
theorem IsSeparable.mono {s u : Set α} (hs : IsSeparable s) (hu : u ⊆ s) : IsSeparable u := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s u : Set α
hs : IsSeparable s
hu : u ⊆ s
⊢ IsSeparable u

Next tactic:
rcases hs with ⟨c, c_count, hs⟩
theorem IsSeparable.mono {s u : Set α} (hs : IsSeparable s) (hu : u ⊆ s) : IsSeparable u := by
  rcases hs with ⟨c, c_count, hs⟩
  

Proof state:
case intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s u : Set α
hu : u ⊆ s
c : Set α
c_count : Set.Countable c
hs : s ⊆ closure c
⊢ IsSeparable u

Next tactic:
exact ⟨c, c_count, hu.trans hs⟩
theorem IsSeparable.union {s u : Set α} (hs : IsSeparable s) (hu : IsSeparable u) :
    IsSeparable (s ∪ u) := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s u : Set α
hs : IsSeparable s
hu : IsSeparable u
⊢ IsSeparable (s ∪ u)

Next tactic:
rcases hs with ⟨cs, cs_count, hcs⟩
theorem IsSeparable.union {s u : Set α} (hs : IsSeparable s) (hu : IsSeparable u) :
    IsSeparable (s ∪ u) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  

Proof state:
case intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s u : Set α
hu : IsSeparable u
cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ closure cs
⊢ IsSeparable (s ∪ u)

Next tactic:
rcases hu with ⟨cu, cu_count, hcu⟩
theorem IsSeparable.union {s u : Set α} (hs : IsSeparable s) (hu : IsSeparable u) :
    IsSeparable (s ∪ u) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  rcases hu with ⟨cu, cu_count, hcu⟩
  

Proof state:
case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s u cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ closure cs
cu : Set α
cu_count : Set.Countable cu
hcu : u ⊆ closure cu
⊢ IsSeparable (s ∪ u)

Next tactic:
refine' ⟨cs ∪ cu, cs_count.union cu_count, _⟩
theorem IsSeparable.union {s u : Set α} (hs : IsSeparable s) (hu : IsSeparable u) :
    IsSeparable (s ∪ u) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  rcases hu with ⟨cu, cu_count, hcu⟩
  refine' ⟨cs ∪ cu, cs_count.union cu_count, _⟩
  

Proof state:
case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s u cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ closure cs
cu : Set α
cu_count : Set.Countable cu
hcu : u ⊆ closure cu
⊢ s ∪ u ⊆ closure (cs ∪ cu)

Next tactic:
exact
    union_subset (hcs.trans (closure_mono (subset_union_left _ _)))
      (hcu.trans (closure_mono (subset_union_right _ _)))
theorem IsSeparable.closure {s : Set α} (hs : IsSeparable s) : IsSeparable (closure s) := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s : Set α
hs : IsSeparable s
⊢ IsSeparable (_root_.closure s)

Next tactic:
rcases hs with ⟨c, c_count, hs⟩
theorem IsSeparable.closure {s : Set α} (hs : IsSeparable s) : IsSeparable (closure s) := by
  rcases hs with ⟨c, c_count, hs⟩
  

Proof state:
case intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s c : Set α
c_count : Set.Countable c
hs : s ⊆ _root_.closure c
⊢ IsSeparable (_root_.closure s)

Next tactic:
exact ⟨c, c_count, by simpa using closure_mono hs⟩
theorem IsSeparable.closure {s : Set α} (hs : IsSeparable s) : IsSeparable (closure s) := by
  rcases hs with ⟨c, c_count, hs⟩
  exact ⟨c, c_count, by 

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s c : Set α
c_count : Set.Countable c
hs : s ⊆ _root_.closure c
⊢ _root_.closure s ⊆ _root_.closure c

Next tactic:
simpa using closure_mono hs
theorem isSeparable_iUnion {ι : Type*} [Countable ι] {s : ι → Set α}
    (hs : ∀ i, IsSeparable (s i)) : IsSeparable (⋃ i, s i) := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
ι : Type u_1
inst✝ : Countable ι
s : ι → Set α
hs : ∀ (i : ι), IsSeparable (s i)
⊢ IsSeparable (⋃ i, s i)

Next tactic:
choose c hc h'c using hs
theorem isSeparable_iUnion {ι : Type*} [Countable ι] {s : ι → Set α}
    (hs : ∀ i, IsSeparable (s i)) : IsSeparable (⋃ i, s i) := by
  choose c hc h'c using hs
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
ι : Type u_1
inst✝ : Countable ι
s c : ι → Set α
hc : ∀ (i : ι), Set.Countable (c i)
h'c : ∀ (i : ι), s i ⊆ closure (c i)
⊢ IsSeparable (⋃ i, s i)

Next tactic:
refine' ⟨⋃ i, c i, countable_iUnion hc, iUnion_subset_iff.2 fun i => _⟩
theorem isSeparable_iUnion {ι : Type*} [Countable ι] {s : ι → Set α}
    (hs : ∀ i, IsSeparable (s i)) : IsSeparable (⋃ i, s i) := by
  choose c hc h'c using hs
  refine' ⟨⋃ i, c i, countable_iUnion hc, iUnion_subset_iff.2 fun i => _⟩
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
ι : Type u_1
inst✝ : Countable ι
s c : ι → Set α
hc : ∀ (i : ι), Set.Countable (c i)
h'c : ∀ (i : ι), s i ⊆ closure (c i)
i : ι
⊢ s i ⊆ closure (⋃ i, c i)

Next tactic:
exact (h'c i).trans (closure_mono (subset_iUnion _ i))
lemma isSeparable_pi {ι : Type*} [Fintype ι] {α : ∀ (_ : ι), Type*} {s : ∀ i, Set (α i)}
    [∀ i, TopologicalSpace (α i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable {f : ∀ i, α i | ∀ i, f i ∈ s i} := by
  

Proof state:
α✝ : Type u
t : TopologicalSpace α✝
B : Set (Set α✝)
s✝ : Set α✝
ι : Type u_1
inst✝¹ : Fintype ι
α : ι → Type u_2
s : (i : ι) → Set (α i)
inst✝ : (i : ι) → TopologicalSpace (α i)
h : ∀ (i : ι), IsSeparable (s i)
⊢ IsSeparable {f | ∀ (i : ι), f i ∈ s i}

Next tactic:
choose c c_count hc using h
lemma isSeparable_pi {ι : Type*} [Fintype ι] {α : ∀ (_ : ι), Type*} {s : ∀ i, Set (α i)}
    [∀ i, TopologicalSpace (α i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable {f : ∀ i, α i | ∀ i, f i ∈ s i} := by
  choose c c_count hc using h
  

Proof state:
α✝ : Type u
t : TopologicalSpace α✝
B : Set (Set α✝)
s✝ : Set α✝
ι : Type u_1
inst✝¹ : Fintype ι
α : ι → Type u_2
s : (i : ι) → Set (α i)
inst✝ : (i : ι) → TopologicalSpace (α i)
c : (i : ι) → Set (α i)
c_count : ∀ (i : ι), Set.Countable (c i)
hc : ∀ (i : ι), s i ⊆ closure (c i)
⊢ IsSeparable {f | ∀ (i : ι), f i ∈ s i}

Next tactic:
refine ⟨{f | ∀ i, f i ∈ c i}, countable_pi c_count, ?_⟩
lemma isSeparable_pi {ι : Type*} [Fintype ι] {α : ∀ (_ : ι), Type*} {s : ∀ i, Set (α i)}
    [∀ i, TopologicalSpace (α i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable {f : ∀ i, α i | ∀ i, f i ∈ s i} := by
  choose c c_count hc using h
  refine ⟨{f | ∀ i, f i ∈ c i}, countable_pi c_count, ?_⟩
  

Proof state:
α✝ : Type u
t : TopologicalSpace α✝
B : Set (Set α✝)
s✝ : Set α✝
ι : Type u_1
inst✝¹ : Fintype ι
α : ι → Type u_2
s : (i : ι) → Set (α i)
inst✝ : (i : ι) → TopologicalSpace (α i)
c : (i : ι) → Set (α i)
c_count : ∀ (i : ι), Set.Countable (c i)
hc : ∀ (i : ι), s i ⊆ closure (c i)
⊢ {f | ∀ (i : ι), f i ∈ s i} ⊆ closure {f | ∀ (i : ι), f i ∈ c i}

Next tactic:
simp_rw [← mem_univ_pi]
lemma isSeparable_pi {ι : Type*} [Fintype ι] {α : ∀ (_ : ι), Type*} {s : ∀ i, Set (α i)}
    [∀ i, TopologicalSpace (α i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable {f : ∀ i, α i | ∀ i, f i ∈ s i} := by
  choose c c_count hc using h
  refine ⟨{f | ∀ i, f i ∈ c i}, countable_pi c_count, ?_⟩
  simp_rw [← mem_univ_pi]
  

Proof state:
α✝ : Type u
t : TopologicalSpace α✝
B : Set (Set α✝)
s✝ : Set α✝
ι : Type u_1
inst✝¹ : Fintype ι
α : ι → Type u_2
s : (i : ι) → Set (α i)
inst✝ : (i : ι) → TopologicalSpace (α i)
c : (i : ι) → Set (α i)
c_count : ∀ (i : ι), Set.Countable (c i)
hc : ∀ (i : ι), s i ⊆ closure (c i)
⊢ {f | (fun i => f i) ∈ Set.pi univ fun i => s i} ⊆ closure {f | (fun i => f i) ∈ Set.pi univ fun i => c i}

Next tactic:
dsimp
lemma isSeparable_pi {ι : Type*} [Fintype ι] {α : ∀ (_ : ι), Type*} {s : ∀ i, Set (α i)}
    [∀ i, TopologicalSpace (α i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable {f : ∀ i, α i | ∀ i, f i ∈ s i} := by
  choose c c_count hc using h
  refine ⟨{f | ∀ i, f i ∈ c i}, countable_pi c_count, ?_⟩
  simp_rw [← mem_univ_pi]
  dsimp
  

Proof state:
α✝ : Type u
t : TopologicalSpace α✝
B : Set (Set α✝)
s✝ : Set α✝
ι : Type u_1
inst✝¹ : Fintype ι
α : ι → Type u_2
s : (i : ι) → Set (α i)
inst✝ : (i : ι) → TopologicalSpace (α i)
c : (i : ι) → Set (α i)
c_count : ∀ (i : ι), Set.Countable (c i)
hc : ∀ (i : ι), s i ⊆ closure (c i)
⊢ (Set.pi univ fun i => s i) ⊆ closure (Set.pi univ fun i => c i)

Next tactic:
rw [closure_pi_set]
lemma isSeparable_pi {ι : Type*} [Fintype ι] {α : ∀ (_ : ι), Type*} {s : ∀ i, Set (α i)}
    [∀ i, TopologicalSpace (α i)] (h : ∀ i, IsSeparable (s i)) :
    IsSeparable {f : ∀ i, α i | ∀ i, f i ∈ s i} := by
  choose c c_count hc using h
  refine ⟨{f | ∀ i, f i ∈ c i}, countable_pi c_count, ?_⟩
  simp_rw [← mem_univ_pi]
  dsimp
  rw [closure_pi_set]
  

Proof state:
α✝ : Type u
t : TopologicalSpace α✝
B : Set (Set α✝)
s✝ : Set α✝
ι : Type u_1
inst✝¹ : Fintype ι
α : ι → Type u_2
s : (i : ι) → Set (α i)
inst✝ : (i : ι) → TopologicalSpace (α i)
c : (i : ι) → Set (α i)
c_count : ∀ (i : ι), Set.Countable (c i)
hc : ∀ (i : ι), s i ⊆ closure (c i)
⊢ (Set.pi univ fun i => s i) ⊆ Set.pi univ fun i => closure (c i)

Next tactic:
exact Set.pi_mono (fun i _ ↦ hc i)
lemma IsSeparable.prod {β : Type*} [TopologicalSpace β]
    {s : Set α} {t : Set β} (hs : IsSeparable s) (ht : IsSeparable t) :
    IsSeparable (s ×ˢ t) := by
  

Proof state:
α : Type u
t✝ : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
t : Set β
hs : IsSeparable s
ht : IsSeparable t
⊢ IsSeparable (s ×ˢ t)

Next tactic:
rcases hs with ⟨cs, cs_count, hcs⟩
lemma IsSeparable.prod {β : Type*} [TopologicalSpace β]
    {s : Set α} {t : Set β} (hs : IsSeparable s) (ht : IsSeparable t) :
    IsSeparable (s ×ˢ t) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  

Proof state:
case intro.intro
α : Type u
t✝ : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
t : Set β
ht : IsSeparable t
cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ _root_.closure cs
⊢ IsSeparable (s ×ˢ t)

Next tactic:
rcases ht with ⟨ct, ct_count, hct⟩
lemma IsSeparable.prod {β : Type*} [TopologicalSpace β]
    {s : Set α} {t : Set β} (hs : IsSeparable s) (ht : IsSeparable t) :
    IsSeparable (s ×ˢ t) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  rcases ht with ⟨ct, ct_count, hct⟩
  

Proof state:
case intro.intro.intro.intro
α : Type u
t✝ : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
t : Set β
cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ _root_.closure cs
ct : Set β
ct_count : Set.Countable ct
hct : t ⊆ _root_.closure ct
⊢ IsSeparable (s ×ˢ t)

Next tactic:
refine ⟨cs ×ˢ ct, cs_count.prod ct_count, ?_⟩
lemma IsSeparable.prod {β : Type*} [TopologicalSpace β]
    {s : Set α} {t : Set β} (hs : IsSeparable s) (ht : IsSeparable t) :
    IsSeparable (s ×ˢ t) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  rcases ht with ⟨ct, ct_count, hct⟩
  refine ⟨cs ×ˢ ct, cs_count.prod ct_count, ?_⟩
  

Proof state:
case intro.intro.intro.intro
α : Type u
t✝ : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
t : Set β
cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ _root_.closure cs
ct : Set β
ct_count : Set.Countable ct
hct : t ⊆ _root_.closure ct
⊢ s ×ˢ t ⊆ _root_.closure (cs ×ˢ ct)

Next tactic:
rw [closure_prod_eq]
lemma IsSeparable.prod {β : Type*} [TopologicalSpace β]
    {s : Set α} {t : Set β} (hs : IsSeparable s) (ht : IsSeparable t) :
    IsSeparable (s ×ˢ t) := by
  rcases hs with ⟨cs, cs_count, hcs⟩
  rcases ht with ⟨ct, ct_count, hct⟩
  refine ⟨cs ×ˢ ct, cs_count.prod ct_count, ?_⟩
  rw [closure_prod_eq]
  

Proof state:
case intro.intro.intro.intro
α : Type u
t✝ : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
t : Set β
cs : Set α
cs_count : Set.Countable cs
hcs : s ⊆ _root_.closure cs
ct : Set β
ct_count : Set.Countable ct
hct : t ⊆ _root_.closure ct
⊢ s ×ˢ t ⊆ _root_.closure cs ×ˢ _root_.closure ct

Next tactic:
exact Set.prod_mono hcs hct
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s : Set α
⊢ IsSeparable univ ↔ SeparableSpace α

Next tactic:
constructor
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · 

Proof state:
case mp
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s : Set α
⊢ IsSeparable univ → SeparableSpace α

Next tactic:
rintro ⟨c, c_count, hc⟩
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · rintro ⟨c, c_count, hc⟩
    

Proof state:
case mp.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s c : Set α
c_count : Set.Countable c
hc : univ ⊆ closure c
⊢ SeparableSpace α

Next tactic:
refine' ⟨⟨c, c_count, by rwa [dense_iff_closure_eq, ← univ_subset_iff]⟩⟩
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · rintro ⟨c, c_count, hc⟩
    refine' ⟨⟨c, c_count, by 

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s c : Set α
c_count : Set.Countable c
hc : univ ⊆ closure c
⊢ Dense c

Next tactic:
rwa [dense_iff_closure_eq, ← univ_subset_iff]
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · rintro ⟨c, c_count, hc⟩
    refine' ⟨⟨c, c_count, by rwa [dense_iff_closure_eq, ← univ_subset_iff]⟩⟩
  · 

Proof state:
case mpr
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s : Set α
⊢ SeparableSpace α → IsSeparable univ

Next tactic:
intro h
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · rintro ⟨c, c_count, hc⟩
    refine' ⟨⟨c, c_count, by rwa [dense_iff_closure_eq, ← univ_subset_iff]⟩⟩
  · intro h
    

Proof state:
case mpr
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s : Set α
h : SeparableSpace α
⊢ IsSeparable univ

Next tactic:
rcases exists_countable_dense α with ⟨c, c_count, hc⟩
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · rintro ⟨c, c_count, hc⟩
    refine' ⟨⟨c, c_count, by rwa [dense_iff_closure_eq, ← univ_subset_iff]⟩⟩
  · intro h
    rcases exists_countable_dense α with ⟨c, c_count, hc⟩
    

Proof state:
case mpr.intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s : Set α
h : SeparableSpace α
c : Set α
c_count : Set.Countable c
hc : Dense c
⊢ IsSeparable univ

Next tactic:
exact ⟨c, c_count, by rwa [univ_subset_iff, ← dense_iff_closure_eq]⟩
theorem isSeparable_univ_iff : IsSeparable (univ : Set α) ↔ SeparableSpace α := by
  constructor
  · rintro ⟨c, c_count, hc⟩
    refine' ⟨⟨c, c_count, by rwa [dense_iff_closure_eq, ← univ_subset_iff]⟩⟩
  · intro h
    rcases exists_countable_dense α with ⟨c, c_count, hc⟩
    exact ⟨c, c_count, by 

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s : Set α
h : SeparableSpace α
c : Set α
c_count : Set.Countable c
hc : Dense c
⊢ univ ⊆ closure c

Next tactic:
rwa [univ_subset_iff, ← dense_iff_closure_eq]
theorem IsSeparable.image {β : Type*} [TopologicalSpace β] {s : Set α} (hs : IsSeparable s)
    {f : α → β} (hf : Continuous f) : IsSeparable (f '' s) := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
hs : IsSeparable s
f : α → β
hf : Continuous f
⊢ IsSeparable (f '' s)

Next tactic:
rcases hs with ⟨c, c_count, hc⟩
theorem IsSeparable.image {β : Type*} [TopologicalSpace β] {s : Set α} (hs : IsSeparable s)
    {f : α → β} (hf : Continuous f) : IsSeparable (f '' s) := by
  rcases hs with ⟨c, c_count, hc⟩
  

Proof state:
case intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
f : α → β
hf : Continuous f
c : Set α
c_count : Set.Countable c
hc : s ⊆ _root_.closure c
⊢ IsSeparable (f '' s)

Next tactic:
refine' ⟨f '' c, c_count.image _, _⟩
theorem IsSeparable.image {β : Type*} [TopologicalSpace β] {s : Set α} (hs : IsSeparable s)
    {f : α → β} (hf : Continuous f) : IsSeparable (f '' s) := by
  rcases hs with ⟨c, c_count, hc⟩
  refine' ⟨f '' c, c_count.image _, _⟩
  

Proof state:
case intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
f : α → β
hf : Continuous f
c : Set α
c_count : Set.Countable c
hc : s ⊆ _root_.closure c
⊢ f '' s ⊆ _root_.closure (f '' c)

Next tactic:
rw [image_subset_iff]
theorem IsSeparable.image {β : Type*} [TopologicalSpace β] {s : Set α} (hs : IsSeparable s)
    {f : α → β} (hf : Continuous f) : IsSeparable (f '' s) := by
  rcases hs with ⟨c, c_count, hc⟩
  refine' ⟨f '' c, c_count.image _, _⟩
  rw [image_subset_iff]
  

Proof state:
case intro.intro
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ : Set α
β : Type u_1
inst✝ : TopologicalSpace β
s : Set α
f : α → β
hf : Continuous f
c : Set α
c_count : Set.Countable c
hc : s ⊆ _root_.closure c
⊢ s ⊆ f ⁻¹' _root_.closure (f '' c)

Next tactic:
exact hc.trans (closure_subset_preimage_closure_image hf)
theorem isSeparable_of_separableSpace_subtype (s : Set α) [SeparableSpace s] : IsSeparable s := by
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s : Set α
inst✝ : SeparableSpace ↑s
⊢ IsSeparable s

Next tactic:
have : IsSeparable (((↑) : s → α) '' (univ : Set s)) :=
    (isSeparable_of_separableSpace _).image continuous_subtype_val
theorem isSeparable_of_separableSpace_subtype (s : Set α) [SeparableSpace s] : IsSeparable s := by
  have : IsSeparable (((↑) : s → α) '' (univ : Set s)) :=
    (isSeparable_of_separableSpace _).image continuous_subtype_val
  

Proof state:
α : Type u
t : TopologicalSpace α
B : Set (Set α)
s✝ s : Set α
inst✝ : SeparableSpace ↑s
this : IsSeparable (Subtype.val '' univ)
⊢ IsSeparable s

Next tactic:
simpa only [image_univ, Subtype.range_val_subtype] using this
theorem isTopologicalBasis_pi {ι : Type*} {X : ι → Type*} [∀ i, TopologicalSpace (X i)]
    {T : ∀ i, Set (Set (X i))} (cond : ∀ i, IsTopologicalBasis (T i)) :
    IsTopologicalBasis { S | ∃ (U : ∀ i, Set (X i)) (F : Finset ι),
      (∀ i, i ∈ F → U i ∈ T i) ∧ S = (F : Set ι).pi U } := by
  

Proof state:
ι : Type u_1
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
T : (i : ι) → Set (Set (X i))
cond : ∀ (i : ι), IsTopologicalBasis (T i)
⊢ IsTopologicalBasis {S | ∃ U F, (∀ i ∈ F, U i ∈ T i) ∧ S = Set.pi (↑F) U}

Next tactic:
refine' isTopologicalBasis_of_isOpen_of_nhds _ _
theorem isTopologicalBasis_pi {ι : Type*} {X : ι → Type*} [∀ i, TopologicalSpace (X i)]
    {T : ∀ i, Set (Set (X i))} (cond : ∀ i, IsTopologicalBasis (T i)) :
    IsTopologicalBasis { S | ∃ (U : ∀ i, Set (X i)) (F : Finset ι),
      (∀ i, i ∈ F → U i ∈ T i) ∧ S = (F : Set ι).pi U } := by
  refine' isTopologicalBasis_of_isOpen_of_nhds _ _
  · 

Proof state:
case refine'_1
ι : Type u_1
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
T : (i : ι) → Set (Set (X i))
cond : ∀ (i : ι), IsTopologicalBasis (T i)
⊢ ∀ u ∈ {S | ∃ U F, (∀ i ∈ F, U i ∈ T i) ∧ S = Set.pi (↑F) U}, IsOpen u

Next tactic:
rintro _ ⟨U, F, h1, rfl⟩