-- Mathlib/Probability/Independence/Kernel.lean
theorem iIndepFun.indepFun_finset (S T : Finset ι) (hST : Disjoint S T)
    (hf_Indep : iIndepFun m f κ μ) (hf_meas : ∀ i, Measurable (f i)) :
    IndepFun (fun a (i : S) => f i a) (fun a (i : T) => f i a) κ μ

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : Kernel α Ω
μ : Measure α
β : ι → Type u_8
m : (i : ι) → MeasurableSpace (β i)
f : (i : ι) → Ω → β i
S T : Finset ι
hST : Disjoint S T
hf_Indep : iIndepFun m f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
hμ : μ ≠ 0
η : Kernel α Ω
η_eq : ⇑κ =ᶠ[ae μ] ⇑η
hη : IsMarkovKernel η
πSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := univ.pi '' univ.pi fun i => {s | MeasurableSet s}
πS : Set (Set Ω) := {s | ∃ t ∈ πSβ, (fun a i => f (↑i) a) ⁻¹' t = s}
hπS_pi : IsPiSystem πS
hπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) MeasurableSpace.pi = generateFrom πS
πTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := univ.pi '' univ.pi fun i => {s | MeasurableSet s}
πT : Set (Set Ω) := {s | ∃ t ∈ πTβ, (fun a i => f (↑i) a) ⁻¹' t = s}
hπT_pi : IsPiSystem πT
hπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) MeasurableSpace.pi = generateFrom πT
s : Set ((i : { x // x ∈ S }) → β ↑i)
sets_s : (i : { x // x ∈ S }) → Set (β ↑i)
hs2 : univ.pi sets_s = s
t : Set ((i : { x // x ∈ T }) → β ↑i)
sets_t : (i : { x // x ∈ T }) → Set (β ↑i)
ht2 : univ.pi sets_t = t
hs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)
ht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)
sets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s ⟨i, hi⟩ else univ
i : ι
hi : i ∈ S
⊢ sets_s' i = sets_s ⟨i, hi⟩

Tactic:
simp_rw [sets_s', dif_pos hi]

Result:
no goals

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : Kernel α Ω
μ : Measure α
β : ι → Type u_8
m : (i : ι) → MeasurableSpace (β i)
f : (i : ι) → Ω → β i
S T : Finset ι
hST : Disjoint S T
hf_Indep : iIndepFun m f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
hμ : μ ≠ 0
η : Kernel α Ω
η_eq : ⇑κ =ᶠ[ae μ] ⇑η
hη : IsMarkovKernel η
πSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := univ.pi '' univ.pi fun i => {s | MeasurableSet s}
πS : Set (Set Ω) := {s | ∃ t ∈ πSβ, (fun a i => f (↑i) a) ⁻¹' t = s}
hπS_pi : IsPiSystem πS
hπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) MeasurableSpace.pi = generateFrom πS
πTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := univ.pi '' univ.pi fun i => {s | MeasurableSet s}
πT : Set (Set Ω) := {s | ∃ t ∈ πTβ, (fun a i => f (↑i) a) ⁻¹' t = s}
hπT_pi : IsPiSystem πT
hπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) MeasurableSpace.pi = generateFrom πT
s : Set ((i : { x // x ∈ S }) → β ↑i)
sets_s : (i : { x // x ∈ S }) → Set (β ↑i)
hs2 : univ.pi sets_s = s
t : Set ((i : { x // x ∈ T }) → β ↑i)
sets_t : (i : { x // x ∈ T }) → Set (β ↑i)
ht2 : univ.pi sets_t = t
hs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)
ht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)
sets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s ⟨i, hi⟩ else univ
⊢ ∀ {i : ι} (hi : i ∈ S), sets_s' i = sets_s ⟨i, hi⟩

Tactic:
intro i hi

Result:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : Kernel α Ω
μ : Measure α
β : ι → Type u_8
m : (i : ι) → MeasurableSpace (β i)
f : (i : ι) → Ω → β i
S T : Finset ι
hST : Disjoint S T
hf_Indep : iIndepFun m f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
hμ : μ ≠ 0
η : Kernel α Ω
η_eq : ⇑κ =ᶠ[ae μ] ⇑η
hη : IsMarkovKernel η
πSβ : Set (Set ((i : { x // x ∈ S }) → β ↑i)) := univ.pi '' univ.pi fun i => {s | MeasurableSet s}
πS : Set (Set Ω) := {s | ∃ t ∈ πSβ, (fun a i => f (↑i) a) ⁻¹' t = s}
hπS_pi : IsPiSystem πS
hπS_gen : MeasurableSpace.comap (fun a i => f (↑i) a) MeasurableSpace.pi = generateFrom πS
πTβ : Set (Set ((i : { x // x ∈ T }) → β ↑i)) := univ.pi '' univ.pi fun i => {s | MeasurableSet s}
πT : Set (Set Ω) := {s | ∃ t ∈ πTβ, (fun a i => f (↑i) a) ⁻¹' t = s}
hπT_pi : IsPiSystem πT
hπT_gen : MeasurableSpace.comap (fun a i => f (↑i) a) MeasurableSpace.pi = generateFrom πT
s : Set ((i : { x // x ∈ S }) → β ↑i)
sets_s : (i : { x // x ∈ S }) → Set (β ↑i)
hs2 : univ.pi sets_s = s
t : Set ((i : { x // x ∈ T }) → β ↑i)
sets_t : (i : { x // x ∈ T }) → Set (β ↑i)
ht2 : univ.pi sets_t = t
hs1 : ∀ (i : { x // x ∈ S }), MeasurableSet (sets_s i)
ht1 : ∀ (i : { x // x ∈ T }), MeasurableSet (sets_t i)
sets_s' : (i : ι) → Set (β i) := fun i => if hi : i ∈ S then sets_s ⟨i, hi⟩ else univ
i : ι
hi : i ∈ S
⊢ sets_s' i = sets_s ⟨i, hi⟩