Theorem: generateFrom_piiUnionInter_singleton_left
File: Mathlib/MeasureTheory/PiSystem.lean

tactic: refine le_antisymm (generateFrom_le ?_) (generateFrom_mono ?_)
state_before: α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
⊢ generateFrom (piiUnionInter (fun k => {s k}) S) = generateFrom {t | ∃ k ∈ S, s k = t}
state_after: case refine_1
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
⊢ ∀ t ∈ piiUnionInter (fun k => {s k}) S, MeasurableSet t

case refine_2
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
⊢ {t | ∃ k ∈ S, s k = t} ⊆ piiUnionInter (fun k => {s k}) S

tactic: rintro _ ⟨I, hI, f, hf, rfl⟩
state_before: case refine_1
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
⊢ ∀ t ∈ piiUnionInter (fun k => {s k}) S, MeasurableSet t
state_after: case refine_1.intro.intro.intro.intro
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
I : Finset ι
hI : ↑I ⊆ S
f : ι → Set α
hf : ∀ x ∈ I, f x ∈ (fun k => {s k}) x
⊢ MeasurableSet (⋂ x ∈ I, f x)

tactic: refine Finset.measurableSet_biInter _ fun m hm => measurableSet_generateFrom ?_
state_before: case refine_1.intro.intro.intro.intro
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
I : Finset ι
hI : ↑I ⊆ S
f : ι → Set α
hf : ∀ x ∈ I, f x ∈ (fun k => {s k}) x
⊢ MeasurableSet (⋂ x ∈ I, f x)
state_after: case refine_1.intro.intro.intro.intro
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
I : Finset ι
hI : ↑I ⊆ S
f : ι → Set α
hf : ∀ x ∈ I, f x ∈ (fun k => {s k}) x
m : ι
hm : m ∈ I
⊢ f m ∈ {t | ∃ k ∈ S, s k = t}

tactic: exact ⟨m, hI hm, (hf m hm).symm⟩
state_before: case refine_1.intro.intro.intro.intro
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
I : Finset ι
hI : ↑I ⊆ S
f : ι → Set α
hf : ∀ x ∈ I, f x ∈ (fun k => {s k}) x
m : ι
hm : m ∈ I
⊢ f m ∈ {t | ∃ k ∈ S, s k = t}
state_after: no goals

tactic: rintro _ ⟨k, hk, rfl⟩
state_before: case refine_2
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
⊢ {t | ∃ k ∈ S, s k = t} ⊆ piiUnionInter (fun k => {s k}) S
state_after: case refine_2.intro.intro
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
⊢ s k ∈ piiUnionInter (fun k => {s k}) S

tactic: refine ⟨{k}, fun m hm => ?_, s, fun i _ => ?_, ?_⟩
state_before: case refine_2.intro.intro
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
⊢ s k ∈ piiUnionInter (fun k => {s k}) S
state_after: case refine_2.intro.intro.refine_1
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
m : ι
hm : m ∈ ↑{k}
⊢ m ∈ S

case refine_2.intro.intro.refine_2
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
i : ι
x✝ : i ∈ {k}
⊢ s i ∈ (fun k => {s k}) i

case refine_2.intro.intro.refine_3
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
⊢ s k = ⋂ x ∈ {k}, s x

tactic: rw [Finset.mem_coe, Finset.mem_singleton] at hm
state_before: case refine_2.intro.intro.refine_1
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
m : ι
hm : m ∈ ↑{k}
⊢ m ∈ S
state_after: case refine_2.intro.intro.refine_1
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
m : ι
hm : m = k
⊢ m ∈ S

tactic: rwa [hm]
state_before: case refine_2.intro.intro.refine_1
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
m : ι
hm : m = k
⊢ m ∈ S
state_after: no goals

tactic: exact Set.mem_singleton _
state_before: case refine_2.intro.intro.refine_2
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
i : ι
x✝ : i ∈ {k}
⊢ s i ∈ (fun k => {s k}) i
state_after: no goals

tactic: simp only [Finset.mem_singleton, Set.iInter_iInter_eq_left]
state_before: case refine_2.intro.intro.refine_3
α : Type u_1
ι : Type u_2
s : ι → Set α
S : Set ι
k : ι
hk : k ∈ S
⊢ s k = ⋂ x ∈ {k}, s x
state_after: no goals