Theorem: ProbabilityTheory.iIndepSets.piiUnionInter_of_not_mem
File: Mathlib/Probability/Independence/Basic.lean

tactic: rintro t1 t2 ⟨s, hs_mem, ft1, hft1_mem, ht1_eq⟩ ht2_mem_pia
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
⊢ IndepSets (piiUnionInter π ↑S) (π a)

tactic: rw [Finset.coe_subset] at hs_mem
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : ↑s ⊆ ↑S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: let f := fun n => ite (n = a) t2 (ite (n ∈ s) (ft1 n) Set.univ)
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: have h_f_mem_pi : ∀ n ∈ s, f n ∈ π n := fun x hxS => h_f_mem x (by simp [hxS])
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: have h_μ_t1 : μ t1 = ∏ n in s, μ (f n) := by rw [h_t1, ← hp_ind s h_f_mem_pi]
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: have h_t2 : t2 = f a := by simp
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: have h_μ_inter : μ (t1 ∩ t2) = ∏ n in insert a s, μ (f n) := by
  have h_t1_inter_t2 : t1 ∩ t2 = ⋂ n ∈ insert a s, f n := by
    rw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]
  rw [h_t1_inter_t2, ← hp_ind (insert a s) h_f_mem]
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
h_t2 : t2 = f a
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: have has : a ∉ s := fun has_mem => haS (hs_mem has_mem)
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
h_t2 : t2 = f a
h_μ_inter : ↑↑μ (t1 ∩ t2) = ∏ n in insert a s, ↑↑μ (f n)
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: rw [h_μ_inter, Finset.prod_insert has, h_t2, mul_comm, h_μ_t1]
state_before: case intro.intro.intro.intro
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
h_t2 : t2 = f a
h_μ_inter : ↑↑μ (t1 ∩ t2) = ∏ n in insert a s, ↑↑μ (f n)
has : ¬a ∈ s
⊢ ↑↑μ (t1 ∩ t2) = ↑↑μ t1 * ↑↑μ t2

tactic: intro n hn_mem_insert
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
⊢ ∀ (n : ι), n ∈ insert a s → f n ∈ π n

tactic: dsimp only
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
n : ι
hn_mem_insert : n ∈ insert a s
⊢ f n ∈ π n

tactic: cases' Finset.mem_insert.mp hn_mem_insert with hn_mem hn_mem
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
n : ι
hn_mem_insert : n ∈ insert a s
⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n

tactic: simp [hn_mem, ht2_mem_pia]
state_before: case inl
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
n : ι
hn_mem_insert : n ∈ insert a s
hn_mem : n = a
⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n

tactic: have hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hn_mem)
state_before: case inr
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
n : ι
hn_mem_insert : n ∈ insert a s
hn_mem : n ∈ s
⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n

tactic: simp [hn_ne_a, hn_mem, hft1_mem n hn_mem]
state_before: case inr
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
n : ι
hn_mem_insert : n ∈ insert a s
hn_mem : n ∈ s
hn_ne_a : n ≠ a
⊢ (if n = a then t2 else if n ∈ s then ft1 n else Set.univ) ∈ π n

tactic: rintro rfl
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
n : ι
hn_mem_insert : n ∈ insert a s
hn_mem : n ∈ s
⊢ n ≠ a

tactic: exact haS (hs_mem hn_mem)
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
S : Finset ι
hp_ind : iIndepSets π
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
n : ι
hn_mem : n ∈ s
haS : ¬n ∈ S
ht2_mem_pia : t2 ∈ π n
f : ι → Set Ω := fun n_1 => if n_1 = n then t2 else if n_1 ∈ s then ft1 n_1 else Set.univ
hn_mem_insert : n ∈ insert n s
⊢ False

tactic: simp [hxS]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
x : ι
hxS : x ∈ s
⊢ x ∈ insert a s

tactic: suffices h_forall : ∀ n ∈ s, f n = ft1 n
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
⊢ t1 = ⋂ (n : ι) (_ : n ∈ s), f n

tactic: intro n hnS
state_before: case h_forall
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
⊢ ∀ (n : ι), n ∈ s → f n = ft1 n

tactic: have hn_ne_a : n ≠ a := by rintro rfl; exact haS (hs_mem hnS)
state_before: case h_forall
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
n : ι
hnS : n ∈ s
⊢ f n = ft1 n

tactic: simp_rw [if_pos hnS, if_neg hn_ne_a]
state_before: case h_forall
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
n : ι
hnS : n ∈ s
hn_ne_a : n ≠ a
⊢ f n = ft1 n

tactic: rw [ht1_eq]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_forall : ∀ (n : ι), n ∈ s → f n = ft1 n
⊢ t1 = ⋂ (n : ι) (_ : n ∈ s), f n

tactic: ext x
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_forall : ∀ (n : ι), n ∈ s → f n = ft1 n
⊢ (⋂ (x : ι) (_ : x ∈ s), ft1 x) = ⋂ (n : ι) (_ : n ∈ s), f n

tactic: simp_rw [Set.mem_iInter]
state_before: case h
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_forall : ∀ (n : ι), n ∈ s → f n = ft1 n
x : Ω
⊢ (x ∈ ⋂ (x : ι) (_ : x ∈ s), ft1 x) ↔ x ∈ ⋂ (n : ι) (_ : n ∈ s), f n

tactic: conv => lhs; intro i hns; rw [← h_forall i hns]
state_before: case h
Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_forall : ∀ (n : ι), n ∈ s → f n = ft1 n
x : Ω
⊢ (∀ (i : ι), i ∈ s → x ∈ ft1 i) ↔ ∀ (i : ι), i ∈ s → x ∈ if i = a then t2 else if i ∈ s then ft1 i else Set.univ

tactic: rintro rfl
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
n : ι
hnS : n ∈ s
⊢ n ≠ a

tactic: exact haS (hs_mem hnS)
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
S : Finset ι
hp_ind : iIndepSets π
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
n : ι
hnS : n ∈ s
haS : ¬n ∈ S
ht2_mem_pia : t2 ∈ π n
f : ι → Set Ω := fun n_1 => if n_1 = n then t2 else if n_1 ∈ s then ft1 n_1 else Set.univ
h_f_mem : ∀ (n_1 : ι), n_1 ∈ insert n s → f n_1 ∈ π n_1
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
⊢ False

tactic: rw [h_t1, ← hp_ind s h_f_mem_pi]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
⊢ ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)

tactic: simp
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
⊢ t2 = f a

tactic: have h_t1_inter_t2 : t1 ∩ t2 = ⋂ n ∈ insert a s, f n := by
  rw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
h_t2 : t2 = f a
⊢ ↑↑μ (t1 ∩ t2) = ∏ n in insert a s, ↑↑μ (f n)

tactic: rw [h_t1_inter_t2, ← hp_ind (insert a s) h_f_mem]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
h_t2 : t2 = f a
h_t1_inter_t2 : t1 ∩ t2 = ⋂ (n : ι) (_ : n ∈ insert a s), f n
⊢ ↑↑μ (t1 ∩ t2) = ∏ n in insert a s, ↑↑μ (f n)

tactic: rw [h_t1, h_t2, Finset.set_biInter_insert, Set.inter_comm]
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : MeasureTheory.Measure Ω
π : ι → Set (Set Ω)
a : ι
S : Finset ι
hp_ind : iIndepSets π
haS : ¬a ∈ S
t1 t2 : Set Ω
s : Finset ι
hs_mem : s ⊆ S
ft1 : ι → Set Ω
hft1_mem : ∀ (x : ι), x ∈ s → ft1 x ∈ π x
ht1_eq : t1 = ⋂ (x : ι) (_ : x ∈ s), ft1 x
ht2_mem_pia : t2 ∈ π a
f : ι → Set Ω := fun n => if n = a then t2 else if n ∈ s then ft1 n else Set.univ
h_f_mem : ∀ (n : ι), n ∈ insert a s → f n ∈ π n
h_f_mem_pi : ∀ (n : ι), n ∈ s → f n ∈ π n
h_t1 : t1 = ⋂ (n : ι) (_ : n ∈ s), f n
h_μ_t1 : ↑↑μ t1 = ∏ n in s, ↑↑μ (f n)
h_t2 : t2 = f a
⊢ t1 ∩ t2 = ⋂ (n : ι) (_ : n ∈ insert a s), f n