-- Mathlib/MeasureTheory/Integral/Marginal.lean
theorem lmarginal_univ [Fintype δ] {f : (∀ i, π i) → ℝ≥0∞} :
    ∫⋯∫⁻_univ, f ∂μ = fun _ => ∫⁻ x, f x ∂Measure.pi μ

Proof state:
case h
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
x : (i : δ) → π i
⊢ (∫⁻ (y : (i : { x // x ∈ Finset.univ }) → π ↑i),
      f fun i => if hi : i ∈ Finset.univ then y ⟨i, hi⟩ else x i ∂Measure.pi fun i => μ ↑i) =
    ∫⁻ (a : (b : { j // j ∈ Finset.univ }) → π (e b)),
      f ((MeasurableEquiv.piCongrLeft π e) a) ∂Measure.pi fun i' => μ (e i')

Tactic:
simp

Result:
case h
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
x : (i : δ) → π i
⊢ (∫⁻ (y : (i : { x // x ∈ Finset.univ }) → π ↑i), f fun i => y ⟨i, ⋯⟩ ∂Measure.pi fun i => μ ↑i) =
    ∫⁻ (a : (b : { j // j ∈ Finset.univ }) → π (e b)),
      f ((MeasurableEquiv.piCongrLeft π e) a) ∂Measure.pi fun i' => μ (e i')

Proof state:
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
⊢ ∫⋯∫⁻_Finset.univ, f ∂μ = fun x => ∫⁻ (x : (i : δ) → π i), f x ∂Measure.pi μ

Tactic:
ext1 x

Result:
case h
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
x : (i : δ) → π i
⊢ (∫⋯∫⁻_Finset.univ, f ∂μ) x = ∫⁻ (x : (i : δ) → π i), f x ∂Measure.pi μ

Proof state:
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
⊢ ∫⋯∫⁻_Finset.univ, f ∂μ = fun x => ∫⁻ (x : (i : δ) → π i), f x ∂Measure.pi μ

Tactic:
let e : { j // j ∈ Finset.univ } ≃ δ := Equiv.subtypeUnivEquiv mem_univ

Result:
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
⊢ ∫⋯∫⁻_Finset.univ, f ∂μ = fun x => ∫⁻ (x : (i : δ) → π i), f x ∂Measure.pi μ

Proof state:
case h
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
x : (i : δ) → π i
⊢ (∫⋯∫⁻_Finset.univ, f ∂μ) x = ∫⁻ (x : (i : δ) → π i), f x ∂Measure.pi μ

Tactic:
simp_rw [lmarginal, measurePreserving_piCongrLeft μ e |>.lintegral_map_equiv, updateFinset_def]

Result:
case h
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
x : (i : δ) → π i
⊢ (∫⁻ (y : (i : { x // x ∈ Finset.univ }) → π ↑i),
      f fun i => if hi : i ∈ Finset.univ then y ⟨i, hi⟩ else x i ∂Measure.pi fun i => μ ↑i) =
    ∫⁻ (a : (b : { j // j ∈ Finset.univ }) → π (e b)),
      f ((MeasurableEquiv.piCongrLeft π e) a) ∂Measure.pi fun i' => μ (e i')

Proof state:
case h
δ : Type u_1
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : DecidableEq δ
inst✝¹ : ∀ (i : δ), SigmaFinite (μ i)
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
e : { j // j ∈ Finset.univ } ≃ δ := subtypeUnivEquiv ⋯
x : (i : δ) → π i
⊢ (∫⁻ (y : (i : { x // x ∈ Finset.univ }) → π ↑i), f fun i => y ⟨i, ⋯⟩ ∂Measure.pi fun i => μ ↑i) =
    ∫⁻ (a : (b : { j // j ∈ Finset.univ }) → π (e b)),
      f ((MeasurableEquiv.piCongrLeft π e) a) ∂Measure.pi fun i' => μ (e i')

Tactic:
rfl

Result:
no goals