Theorem: HasCountableSeparatingOn.subtype_iff
File: Mathlib/Order/Filter/CountableSeparatingOn.lean

tactic: constructor <;> intro h
state_before: α : Type u_1
p : Set α → Prop
t : Set α
⊢ HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ ↔ HasCountableSeparatingOn α p t
state_after: case mp
α : Type u_1
p : Set α → Prop
t : Set α
h : HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ
⊢ HasCountableSeparatingOn α p t

case mpr
α : Type u_1
p : Set α → Prop
t : Set α
h : HasCountableSeparatingOn α p t
⊢ HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ

tactic: rcases h with ⟨S, Sct, Sp, hS⟩
state_before: case mpr
α : Type u_1
p : Set α → Prop
t : Set α
h : HasCountableSeparatingOn α p t
⊢ HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ
state_after: case mpr.mk.intro.intro.intro
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
⊢ HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ

tactic: use {Subtype.val ⁻¹' s | s ∈ S}, Sct.image _, ?_, ?_
state_before: case mpr.mk.intro.intro.intro
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
⊢ HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ
state_after: case left
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
⊢ ∀ s ∈ {x | ∃ s ∈ S, Subtype.val ⁻¹' s = x}, ∃ v, p v ∧ Subtype.val ⁻¹' v = s

case right
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
⊢ ∀ x ∈ univ, ∀ y ∈ univ, (∀ s ∈ {x | ∃ s ∈ S, Subtype.val ⁻¹' s = x}, x ∈ s ↔ y ∈ s) → x = y

tactic: rintro x - y - hxy
state_before: case right
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
⊢ ∀ x ∈ univ, ∀ y ∈ univ, (∀ s ∈ {x | ∃ s ∈ S, Subtype.val ⁻¹' s = x}, x ∈ s ↔ y ∈ s) → x = y
state_after: case right
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
x y : ↑t
hxy : ∀ s ∈ {x | ∃ s ∈ S, Subtype.val ⁻¹' s = x}, x ∈ s ↔ y ∈ s
⊢ x = y

tactic: exact Subtype.val_injective $ hS _ (Subtype.coe_prop _) _ (Subtype.coe_prop _)
  fun s hs ↦ hxy (Subtype.val ⁻¹' s) ⟨s, hs, rfl⟩
state_before: case right
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
x y : ↑t
hxy : ∀ s ∈ {x | ∃ s ∈ S, Subtype.val ⁻¹' s = x}, x ∈ s ↔ y ∈ s
⊢ x = y
state_after: no goals

tactic: exact h.of_subtype $ fun s ↦ id
state_before: case mp
α : Type u_1
p : Set α → Prop
t : Set α
h : HasCountableSeparatingOn (↑t) (fun u => ∃ v, p v ∧ Subtype.val ⁻¹' v = u) univ
⊢ HasCountableSeparatingOn α p t
state_after: no goals

tactic: rintro u ⟨t, tS, rfl⟩
state_before: case left
α : Type u_1
p : Set α → Prop
t : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t, ∀ y ∈ t, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
⊢ ∀ s ∈ {x | ∃ s ∈ S, Subtype.val ⁻¹' s = x}, ∃ v, p v ∧ Subtype.val ⁻¹' v = s
state_after: case left.intro.intro
α : Type u_1
p : Set α → Prop
t✝ : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t✝, ∀ y ∈ t✝, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
t : Set α
tS : t ∈ S
⊢ ∃ v, p v ∧ Subtype.val ⁻¹' v = Subtype.val ⁻¹' t

tactic: exact ⟨t, Sp _ tS, rfl⟩
state_before: case left.intro.intro
α : Type u_1
p : Set α → Prop
t✝ : Set α
S : Set (Set α)
Sct : S.Countable
Sp : ∀ s ∈ S, p s
hS : ∀ x ∈ t✝, ∀ y ∈ t✝, (∀ s ∈ S, x ∈ s ↔ y ∈ s) → x = y
t : Set α
tS : t ∈ S
⊢ ∃ v, p v ∧ Subtype.val ⁻¹' v = Subtype.val ⁻¹' t
state_after: no goals