Theorem: ProbabilityTheory.kernel.iIndepFun.indepFun_finset_prod_of_not_mem
File: Mathlib/Probability/Independence/Kernel.lean

tactic: classical
have h_right : f i =
  (fun p : ({i} : Finset ι) → β => p ⟨i, Finset.mem_singleton_self i⟩) ∘
  fun a (j : ({i} : Finset ι)) => f j a := rfl
have h_meas_right : Measurable fun p : ({i} : Finset ι) → β
  => p ⟨i, Finset.mem_singleton_self i⟩ := measurable_pi_apply ⟨i, Finset.mem_singleton_self i⟩
have h_left : ∏ j ∈ s, f j = (fun p : s → β => ∏ j, p j) ∘ fun a (j : s) => f j a := by
  ext1 a
  simp only [Function.comp_apply]
  have : (∏ j : ↥s, f (↑j) a) = (∏ j : ↥s, f ↑j) a := by rw [Finset.prod_apply]
  rw [this, Finset.prod_coe_sort]
have h_meas_left : Measurable fun p : s → β => ∏ j, p j :=
  Finset.univ.measurable_prod fun (j : ↥s) (_H : j ∈ Finset.univ) => measurable_pi_apply j
rw [h_left, h_right]
exact
  (hf_Indep.indepFun_finset s {i} (Finset.disjoint_singleton_left.mpr hi).symm hf_meas).comp
    h_meas_left h_meas_right
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ
state_after: no goals

tactic: have h_right : f i =
  (fun p : ({i} : Finset ι) → β => p ⟨i, Finset.mem_singleton_self i⟩) ∘
  fun a (j : ({i} : Finset ι)) => f j a := rfl
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ
state_after: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ

tactic: have h_meas_right : Measurable fun p : ({i} : Finset ι) → β
  => p ⟨i, Finset.mem_singleton_self i⟩ := measurable_pi_apply ⟨i, Finset.mem_singleton_self i⟩
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ
state_after: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ

tactic: have h_left : ∏ j ∈ s, f j = (fun p : s → β => ∏ j, p j) ∘ fun a (j : s) => f j a := by
  ext1 a
  simp only [Function.comp_apply]
  have : (∏ j : ↥s, f (↑j) a) = (∏ j : ↥s, f ↑j) a := by rw [Finset.prod_apply]
  rw [this, Finset.prod_coe_sort]
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ
state_after: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
h_left : ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ

tactic: have h_meas_left : Measurable fun p : s → β => ∏ j, p j :=
  Finset.univ.measurable_prod fun (j : ↥s) (_H : j ∈ Finset.univ) => measurable_pi_apply j
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
h_left : ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ
state_after: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
h_left : ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
h_meas_left : Measurable fun p => ∏ j : { x // x ∈ s }, p j
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ

tactic: rw [h_left, h_right]
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
h_left : ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
h_meas_left : Measurable fun p => ∏ j : { x // x ∈ s }, p j
⊢ IndepFun (∏ j ∈ s, f j) (f i) κ μ
state_after: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
h_left : ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
h_meas_left : Measurable fun p => ∏ j : { x // x ∈ s }, p j
⊢ IndepFun ((fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a) ((fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a) κ μ

tactic: exact
  (hf_Indep.indepFun_finset s {i} (Finset.disjoint_singleton_left.mpr hi).symm hf_meas).comp
    h_meas_left h_meas_right
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
h_left : ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
h_meas_left : Measurable fun p => ∏ j : { x // x ∈ s }, p j
⊢ IndepFun ((fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a) ((fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a) κ μ
state_after: no goals

tactic: ext1 a
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
⊢ ∏ j ∈ s, f j = (fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a
state_after: case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
⊢ (∏ j ∈ s, f j) a = ((fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a) a

tactic: simp only [Function.comp_apply]
state_before: case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
⊢ (∏ j ∈ s, f j) a = ((fun p => ∏ j : { x // x ∈ s }, p j) ∘ fun a j => f (↑j) a) a
state_after: case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
⊢ (∏ j ∈ s, f j) a = ∏ j : { x // x ∈ s }, f (↑j) a

tactic: have : (∏ j : ↥s, f (↑j) a) = (∏ j : ↥s, f ↑j) a := by rw [Finset.prod_apply]
state_before: case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
⊢ (∏ j ∈ s, f j) a = ∏ j : { x // x ∈ s }, f (↑j) a
state_after: case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
this : ∏ j : { x // x ∈ s }, f (↑j) a = (∏ j : { x // x ∈ s }, f ↑j) a
⊢ (∏ j ∈ s, f j) a = ∏ j : { x // x ∈ s }, f (↑j) a

tactic: rw [this, Finset.prod_coe_sort]
state_before: case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
this : ∏ j : { x // x ∈ s }, f (↑j) a = (∏ j : { x // x ∈ s }, f ↑j) a
⊢ (∏ j ∈ s, f j) a = ∏ j : { x // x ∈ s }, f (↑j) a
state_after: no goals

tactic: rw [Finset.prod_apply]
state_before: α : Type u_1
Ω : Type u_2
ι : Type u_3
β✝ : Type u_4
β' : Type u_5
γ : Type u_6
γ' : Type u_7
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
f✝ : Ω → β✝
g : Ω → β'
β : Type u_8
m : MeasurableSpace β
inst✝² : CommMonoid β
inst✝¹ : MeasurableMul₂ β
f : ι → Ω → β
inst✝ : IsMarkovKernel κ
hf_Indep : iIndepFun (fun x => m) f κ μ
hf_meas : ∀ (i : ι), Measurable (f i)
s : Finset ι
i : ι
hi : i ∉ s
h_right : f i = (fun p => p ⟨i, ⋯⟩) ∘ fun a j => f (↑j) a
h_meas_right : Measurable fun p => p ⟨i, ⋯⟩
a : Ω
⊢ ∏ j : { x // x ∈ s }, f (↑j) a = (∏ j : { x // x ∈ s }, f ↑j) a
state_after: no goals