Theorem: Set.PairwiseDisjoint.countable_of_isOpen
File: Mathlib/Topology/Bases.lean

tactic: rcases exists_countable_dense α with ⟨u, ⟨u_encodable⟩, u_dense⟩
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), i ∈ a → Set.Nonempty (s i)
⊢ Set.Countable a

tactic: 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)
state_before: case intro.intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), i ∈ a → Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
⊢ Set.Countable a

tactic: choose f hfs hfu using this
state_before: case intro.intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), i ∈ a → Set.Nonempty (s i)
u : Set α
u_dense : Dense u
u_encodable : Encodable ↑u
this : ∀ (i : ↑a), ∃ y, y ∈ s ↑i ∩ u
⊢ Set.Countable a

tactic: lift f to a → u using hfu
state_before: case intro.intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), 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

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]
state_before: case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), 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

tactic: exact ⟨@Encodable.ofInj _ _ u_encodable f f_inj⟩
state_before: case intro.intro.intro.intro
α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), 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

tactic: refine' injective_iff_pairwise_ne.mpr
  ((h.subtype _ _).mono fun i j hij hfij => hij.le_bot ⟨hfs i, _⟩)
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), 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

tactic: simp only [congr_arg Subtype.val hfij, hfs j]
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SeparableSpace α
ι : Type u_1
s : ι → Set α
a : Set ι
h : PairwiseDisjoint a s
ha : ∀ (i : ι), i ∈ a → IsOpen (s i)
h'a : ∀ (i : ι), 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