lemma iCondIndepSets_iff (π : ι → Set (Set Ω)) (hπ : ∀ i s (_hs : s ∈ π i), MeasurableSet s)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' π μ ↔ ∀ (s : Finset ι) {f : ι → Set Ω} (_H : ∀ i, i ∈ s → f i ∈ π i),
      μ⟦⋂ i ∈ s, f i | m'⟧ =ᵐ[μ] ∏ i in s, (μ⟦f i | m'⟧) := by
  simp only [iCondIndepSets, kernel.iIndepSets]
  have h_eq' : ∀ (s : Finset ι) (f : ι → Set Ω) (_H : ∀ i, i ∈ s → f i ∈ π i) i (_hi : i ∈ s),
      (fun ω ↦ ENNReal.toReal (condexpKernel μ m' ω (f i))) =ᵐ[μ] μ⟦f i | m'⟧ :=
    fun s f H i hi ↦ condexpKernel_ae_eq_condexp hm' (hπ i (f i) (H i hi))
  have h_eq : ∀ (s : Finset ι) (f : ι → Set Ω) (_H : ∀ i, i ∈ s → f i ∈ π i), ∀ᵐ ω ∂μ,
      ∀ i ∈ s, ENNReal.toReal (condexpKernel μ m' ω (f i)) = (μ⟦f i | m'⟧) ω := by
    intros s f H
    simp_rw [← Finset.mem_coe]
    rw [ae_ball_iff (Finset.countable_toSet s)]
    exact h_eq' s f H
  have h_inter_eq : ∀ (s : Finset ι) (f : ι → Set Ω) (_H : ∀ i, i ∈ s → f i ∈ π i),
      (fun ω ↦ ENNReal.toReal (condexpKernel μ m' ω (⋂ i ∈ s, f i)))
        =ᵐ[μ] μ⟦⋂ i ∈ s, f i | m'⟧ := by
    refine fun s f H ↦ condexpKernel_ae_eq_condexp hm' ?_
    exact MeasurableSet.biInter (Finset.countable_toSet _) (fun i hi ↦ hπ i _ (H i hi))
  refine ⟨fun h s f hf ↦ ?_, fun h s f hf ↦ ?_⟩ <;> specialize h s hf
  · have h' := ae_eq_of_ae_eq_trim h
    filter_upwards [h_eq s f hf, h_inter_eq s f hf, h'] with ω h_eq h_inter_eq h'
    rw [← h_inter_eq, h', ENNReal.toReal_prod, Finset.prod_apply]
    exact Finset.prod_congr rfl h_eq
  · refine (ae_eq_trim_iff hm' ?_ ?_).mpr ?_
    · refine stronglyMeasurable_condexpKernel ?_
      exact MeasurableSet.biInter (Finset.countable_toSet _) (fun i hi ↦ hπ i _ (hf i hi))
    · refine Measurable.stronglyMeasurable ?_
      exact Finset.measurable_prod s (fun i hi ↦ measurable_condexpKernel (hπ i _ (hf i hi)))
    filter_upwards [h_eq s f hf, h_inter_eq s f hf, h] with ω h_eq h_inter_eq h
    have h_ne_top : condexpKernel μ m' ω (⋂ i ∈ s, f i) ≠ ∞ :=
      (measure_ne_top (condexpKernel μ m' ω) _)
    have : (∏ i in s, condexpKernel μ m' ω (f i)) ≠ ∞ :=
      (ENNReal.prod_lt_top (fun _ _ ↦ measure_ne_top (condexpKernel μ m' ω) _)).ne
    rw [← ENNReal.ofReal_toReal h_ne_top, h_inter_eq, h, Finset.prod_apply,
      ← ENNReal.ofReal_toReal this, ENNReal.toReal_prod]
    congr 1
    

Proof state:
case h.e_r
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
π : ι → Set (Set Ω)
hπ : ∀ (i : ι), ∀ s ∈ π i, MeasurableSet s
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h_eq' :
  ∀ (s : Finset ι) (f : ι → Set Ω),
    (∀ i ∈ s, f i ∈ π i) →
      ∀ i ∈ s, (fun ω => ENNReal.toReal (↑↑((condexpKernel μ m') ω) (f i))) =ᵐ[μ] μ[Set.indicator (f i) fun ω => 1|m']
h_eq✝ :
  ∀ (s : Finset ι) (f : ι → Set Ω),
    (∀ i ∈ s, f i ∈ π i) →
      ∀ᵐ (ω : Ω) ∂μ,
        ∀ i ∈ s, ENNReal.toReal (↑↑((condexpKernel μ m') ω) (f i)) = (μ[Set.indicator (f i) fun ω => 1|m']) ω
h_inter_eq✝ :
  ∀ (s : Finset ι) (f : ι → Set Ω),
    (∀ i ∈ s, f i ∈ π i) →
      (fun ω => ENNReal.toReal (↑↑((condexpKernel μ m') ω) (⋂ i ∈ s, f i))) =ᵐ[μ]
        μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m']
s : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ s, f i ∈ π i
h✝ : μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m'] =ᵐ[μ] ∏ i in s, μ[Set.indicator (f i) fun ω => 1|m']
ω : Ω
h_eq : ∀ i ∈ s, ENNReal.toReal (↑↑((condexpKernel μ m') ω) (f i)) = (μ[Set.indicator (f i) fun ω => 1|m']) ω
h_inter_eq :
  ENNReal.toReal (↑↑((condexpKernel μ m') ω) (⋂ i ∈ s, f i)) = (μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m']) ω
h : (μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m']) ω = Finset.prod s (fun i => μ[Set.indicator (f i) fun ω => 1|m']) ω
h_ne_top : ↑↑((condexpKernel μ m') ω) (⋂ i ∈ s, f i) ≠ ⊤
this : ∏ i in s, ↑↑((condexpKernel μ m') ω) (f i) ≠ ⊤
⊢ ∏ c in s, (μ[Set.indicator (f c) fun ω => 1|m']) ω = ∏ i in s, ENNReal.toReal (↑↑((condexpKernel μ m') ω) (f i))

Next tactic:
exact Finset.prod_congr rfl (fun i hi ↦ (h_eq i hi).symm)