l3lab/ntp-mathlib huggingface dataset:
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · 

Proof state:
case h.refine_1.e_f.hx
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']
S : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ S, f i = s i
a : Ω
ha : (μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m']) a = Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a
⊢ ⋂ i ∈ S, f i = ⋂ i ∈ S, s i

Next tactic:
exact Set.iInter₂_congr hf
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · exact Set.iInter₂_congr hf
      · 

Proof state:
case h.refine_1.e_f.hy
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']
S : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ S, f i = s i
a : Ω
ha : (μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m']) a = Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a
⊢ (fun ω => 1) = fun ω => 1

Next tactic:
rfl
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · exact Set.iInter₂_congr hf
      · rfl
    · 

Proof state:
case h.refine_2
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']
S : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ S, f i = s i
a : Ω
ha : (μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m']) a = Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a
⊢ Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a =
    Finset.prod S (fun i => μ[Set.indicator (f i) fun ω => 1|m']) a

Next tactic:
congr
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · exact Set.iInter₂_congr hf
      · rfl
    · congr
      

Proof state:
case h.refine_2
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']
S : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ S, f i = s i
a : Ω
ha : (μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m']) a = Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a
⊢ Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a =
    Finset.prod S (fun i => μ[Set.indicator (f i) fun ω => 1|m']) a

Next tactic:
simp_rw [Finset.prod_apply]
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · exact Set.iInter₂_congr hf
      · rfl
    · congr
      simp_rw [Finset.prod_apply]
      

Proof state:
case h.refine_2
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']
S : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ S, f i = s i
a : Ω
ha : (μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m']) a = Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a
⊢ ∏ c in S, (μ[Set.indicator (s c) fun ω => 1|m']) a = ∏ c in S, (μ[Set.indicator (f c) fun ω => 1|m']) a

Next tactic:
refine Finset.prod_congr rfl (fun i hi ↦ ?_)
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · exact Set.iInter₂_congr hf
      · rfl
    · congr
      simp_rw [Finset.prod_apply]
      refine Finset.prod_congr rfl (fun i hi ↦ ?_)
      

Proof state:
case h.refine_2
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
h : ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']
S : Finset ι
f : ι → Set Ω
hf : ∀ i ∈ S, f i = s i
a : Ω
ha : (μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m']) a = Finset.prod S (fun i => μ[Set.indicator (s i) fun ω => 1|m']) a
i : ι
hi : i ∈ S
⊢ (μ[Set.indicator (s i) fun ω => 1|m']) a = (μ[Set.indicator (f i) fun ω => 1|m']) a

Next tactic:
rw [hf i hi]
lemma iCondIndepSets_singleton_iff (s : ι → Set Ω) (hπ : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSets m' hm' (fun i ↦ {s i}) μ ↔ ∀ S : Finset ι,
      μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, (μ⟦s i | m'⟧) := by
  rw [iCondIndepSets_iff]
  · simp only [Set.mem_singleton_iff]
    refine ⟨fun h S ↦ h S (fun i _ ↦ rfl), fun h S f hf ↦ ?_⟩
    filter_upwards [h S] with a ha
    refine Eq.trans ?_ (ha.trans ?_)
    · congr
      apply congr_arg₂
      · exact Set.iInter₂_congr hf
      · rfl
    · congr
      simp_rw [Finset.prod_apply]
      refine Finset.prod_congr rfl (fun i hi ↦ ?_)
      rw [hf i hi]
  · 

Proof state:
case hπ
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hπ : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ ∀ (i : ι), ∀ s_1 ∈ {s i}, MeasurableSet s_1

Next tactic:
simpa only [Set.mem_singleton_iff, forall_eq]
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
⊢ CondIndepSets m' hm' {s} {t} ↔
    μ[Set.indicator (s ∩ t) fun ω => 1|m'] =ᵐ[μ] μ[Set.indicator s fun ω => 1|m'] * μ[Set.indicator t fun ω => 1|m']

Next tactic:
rw [condIndepSets_iff _ _ _ _ ?_ ?_]
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
⊢ (∀ (t1 t2 : Set Ω),
      t1 ∈ {s} →
        t2 ∈ {t} →
          μ[Set.indicator (t1 ∩ t2) fun ω => 1|m'] =ᵐ[μ]
            μ[Set.indicator t1 fun ω => 1|m'] * μ[Set.indicator t2 fun ω => 1|m']) ↔
    μ[Set.indicator (s ∩ t) fun ω => 1|m'] =ᵐ[μ] μ[Set.indicator s fun ω => 1|m'] * μ[Set.indicator t fun ω => 1|m']

Next tactic:
simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
⊢ ∀ s_1 ∈ {s}, MeasurableSet s_1

Next tactic:
intros s' hs'
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
  · intros s' hs'
    

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
s' : Set Ω
hs' : s' ∈ {s}
⊢ MeasurableSet s'

Next tactic:
rw [Set.mem_singleton_iff] at hs'
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
  · intros s' hs'
    rw [Set.mem_singleton_iff] at hs'
    

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
s' : Set Ω
hs' : s' = s
⊢ MeasurableSet s'

Next tactic:
rwa [hs']
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
  · intros s' hs'
    rw [Set.mem_singleton_iff] at hs'
    rwa [hs']
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
⊢ ∀ s ∈ {t}, MeasurableSet s

Next tactic:
intros s' hs'
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
  · intros s' hs'
    rw [Set.mem_singleton_iff] at hs'
    rwa [hs']
  · intros s' hs'
    

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
s' : Set Ω
hs' : s' ∈ {t}
⊢ MeasurableSet s'

Next tactic:
rw [Set.mem_singleton_iff] at hs'
theorem condIndepSets_singleton_iff {μ : Measure Ω} [IsFiniteMeasure μ]
    {s t : Set Ω} (hs : MeasurableSet s) (ht : MeasurableSet t) :
    CondIndepSets m' hm' {s} {t} μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  rw [condIndepSets_iff _ _ _ _ ?_ ?_]
  · simp only [Set.mem_singleton_iff, forall_eq_apply_imp_iff, forall_eq]
  · intros s' hs'
    rw [Set.mem_singleton_iff] at hs'
    rwa [hs']
  · intros s' hs'
    rw [Set.mem_singleton_iff] at hs'
    

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
s' : Set Ω
hs' : s' = t
⊢ MeasurableSet s'

Next tactic:
rwa [hs']
lemma iCondIndep_iff_iCondIndepSets (m : ι → MeasurableSpace Ω)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndep m' hm' m μ ↔ iCondIndepSets m' hm' (fun x ↦ {s | MeasurableSet[m x] s}) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
m : ι → MeasurableSpace Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ iCondIndep m' hm' m ↔ iCondIndepSets m' hm' fun x => {s | MeasurableSet s}

Next tactic:
simp only [iCondIndep, iCondIndepSets, kernel.iIndep]
lemma iCondIndep_iff (m : ι → MeasurableSpace Ω) (hm : ∀ i, m i ≤ mΩ)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndep m' hm' m μ
      ↔ ∀ (s : Finset ι) {f : ι → Set Ω} (_H : ∀ i, i ∈ s → MeasurableSet[m i] (f i)),
      μ⟦⋂ i ∈ s, f i | m'⟧ =ᵐ[μ] ∏ i in s, (μ⟦f i | m'⟧) := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
m : ι → MeasurableSpace Ω
hm : ∀ (i : ι), m i ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ iCondIndep m' hm' m ↔
    ∀ (s : Finset ι) {f : ι → Set Ω},
      (∀ i ∈ s, MeasurableSet (f i)) →
        μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m'] =ᵐ[μ] ∏ i in s, μ[Set.indicator (f i) fun ω => 1|m']

Next tactic:
rw [iCondIndep_iff_iCondIndepSets, iCondIndepSets_iff]
lemma iCondIndep_iff (m : ι → MeasurableSpace Ω) (hm : ∀ i, m i ≤ mΩ)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndep m' hm' m μ
      ↔ ∀ (s : Finset ι) {f : ι → Set Ω} (_H : ∀ i, i ∈ s → MeasurableSet[m i] (f i)),
      μ⟦⋂ i ∈ s, f i | m'⟧ =ᵐ[μ] ∏ i in s, (μ⟦f i | m'⟧) := by
  rw [iCondIndep_iff_iCondIndepSets, iCondIndepSets_iff]
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
m : ι → MeasurableSpace Ω
hm : ∀ (i : ι), m i ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ (∀ (s : Finset ι) {f : ι → Set Ω},
      (∀ i ∈ s, f i ∈ {s | MeasurableSet s}) →
        μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m'] =ᵐ[μ] ∏ i in s, μ[Set.indicator (f i) fun ω => 1|m']) ↔
    ∀ (s : Finset ι) {f : ι → Set Ω},
      (∀ i ∈ s, MeasurableSet (f i)) →
        μ[Set.indicator (⋂ i ∈ s, f i) fun ω => 1|m'] =ᵐ[μ] ∏ i in s, μ[Set.indicator (f i) fun ω => 1|m']

Next tactic:
rfl
lemma iCondIndep_iff (m : ι → MeasurableSpace Ω) (hm : ∀ i, m i ≤ mΩ)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndep m' hm' m μ
      ↔ ∀ (s : Finset ι) {f : ι → Set Ω} (_H : ∀ i, i ∈ s → MeasurableSet[m i] (f i)),
      μ⟦⋂ i ∈ s, f i | m'⟧ =ᵐ[μ] ∏ i in s, (μ⟦f i | m'⟧) := by
  rw [iCondIndep_iff_iCondIndepSets, iCondIndepSets_iff]
  · rfl
  · 

Proof state:
case hπ
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
m : ι → MeasurableSpace Ω
hm : ∀ (i : ι), m i ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ ∀ (i : ι), ∀ s ∈ {s | MeasurableSet s}, MeasurableSet s

Next tactic:
exact hm
lemma condIndep_iff_condIndepSets (m' m₁ m₂ : MeasurableSpace Ω) [mΩ : MeasurableSpace Ω]
    [StandardBorelSpace Ω] [Nonempty Ω] (hm' : m' ≤ mΩ) (μ : Measure Ω ) [IsFiniteMeasure μ] :
    CondIndep m' m₁ m₂ hm' μ
      ↔ CondIndepSets m' hm' {s | MeasurableSet[m₁] s} {s | MeasurableSet[m₂] s} μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' m₁ m₂ mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ CondIndep m' m₁ m₂ hm' ↔ CondIndepSets m' hm' {s | MeasurableSet s} {s | MeasurableSet s}

Next tactic:
simp only [CondIndep, CondIndepSets, kernel.Indep]
lemma condIndep_iff (m' m₁ m₂ : MeasurableSpace Ω)
    [mΩ : MeasurableSpace Ω] [StandardBorelSpace Ω] [Nonempty Ω]
    (hm' : m' ≤ mΩ) (hm₁ : m₁ ≤ mΩ) (hm₂ : m₂ ≤ mΩ) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndep m' m₁ m₂ hm' μ
      ↔ ∀ t1 t2, MeasurableSet[m₁] t1 → MeasurableSet[m₂] t2
        → (μ⟦t1 ∩ t2 | m'⟧) =ᵐ[μ] (μ⟦t1 | m'⟧) * (μ⟦t2 | m'⟧) := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' m₁ m₂ mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
hm₁ : m₁ ≤ mΩ
hm₂ : m₂ ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ CondIndep m' m₁ m₂ hm' ↔
    ∀ (t1 t2 : Set Ω),
      MeasurableSet t1 →
        MeasurableSet t2 →
          μ[Set.indicator (t1 ∩ t2) fun ω => 1|m'] =ᵐ[μ]
            μ[Set.indicator t1 fun ω => 1|m'] * μ[Set.indicator t2 fun ω => 1|m']

Next tactic:
rw [condIndep_iff_condIndepSets, condIndepSets_iff]
lemma condIndep_iff (m' m₁ m₂ : MeasurableSpace Ω)
    [mΩ : MeasurableSpace Ω] [StandardBorelSpace Ω] [Nonempty Ω]
    (hm' : m' ≤ mΩ) (hm₁ : m₁ ≤ mΩ) (hm₂ : m₂ ≤ mΩ) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndep m' m₁ m₂ hm' μ
      ↔ ∀ t1 t2, MeasurableSet[m₁] t1 → MeasurableSet[m₂] t2
        → (μ⟦t1 ∩ t2 | m'⟧) =ᵐ[μ] (μ⟦t1 | m'⟧) * (μ⟦t2 | m'⟧) := by
  rw [condIndep_iff_condIndepSets, condIndepSets_iff]
  · 

Proof state:
Ω : Type u_1
ι : Type u_2
m' m₁ m₂ mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
hm₁ : m₁ ≤ mΩ
hm₂ : m₂ ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ (∀ (t1 t2 : Set Ω),
      t1 ∈ {s | MeasurableSet s} →
        t2 ∈ {s | MeasurableSet s} →
          μ[Set.indicator (t1 ∩ t2) fun ω => 1|m'] =ᵐ[μ]
            μ[Set.indicator t1 fun ω => 1|m'] * μ[Set.indicator t2 fun ω => 1|m']) ↔
    ∀ (t1 t2 : Set Ω),
      MeasurableSet t1 →
        MeasurableSet t2 →
          μ[Set.indicator (t1 ∩ t2) fun ω => 1|m'] =ᵐ[μ]
            μ[Set.indicator t1 fun ω => 1|m'] * μ[Set.indicator t2 fun ω => 1|m']

Next tactic:
rfl
lemma condIndep_iff (m' m₁ m₂ : MeasurableSpace Ω)
    [mΩ : MeasurableSpace Ω] [StandardBorelSpace Ω] [Nonempty Ω]
    (hm' : m' ≤ mΩ) (hm₁ : m₁ ≤ mΩ) (hm₂ : m₂ ≤ mΩ) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndep m' m₁ m₂ hm' μ
      ↔ ∀ t1 t2, MeasurableSet[m₁] t1 → MeasurableSet[m₂] t2
        → (μ⟦t1 ∩ t2 | m'⟧) =ᵐ[μ] (μ⟦t1 | m'⟧) * (μ⟦t2 | m'⟧) := by
  rw [condIndep_iff_condIndepSets, condIndepSets_iff]
  · rfl
  · 

Proof state:
case hs1
Ω : Type u_1
ι : Type u_2
m' m₁ m₂ mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
hm₁ : m₁ ≤ mΩ
hm₂ : m₂ ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ ∀ s ∈ {s | MeasurableSet s}, MeasurableSet s

Next tactic:
exact hm₁
lemma condIndep_iff (m' m₁ m₂ : MeasurableSpace Ω)
    [mΩ : MeasurableSpace Ω] [StandardBorelSpace Ω] [Nonempty Ω]
    (hm' : m' ≤ mΩ) (hm₁ : m₁ ≤ mΩ) (hm₂ : m₂ ≤ mΩ) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndep m' m₁ m₂ hm' μ
      ↔ ∀ t1 t2, MeasurableSet[m₁] t1 → MeasurableSet[m₂] t2
        → (μ⟦t1 ∩ t2 | m'⟧) =ᵐ[μ] (μ⟦t1 | m'⟧) * (μ⟦t2 | m'⟧) := by
  rw [condIndep_iff_condIndepSets, condIndepSets_iff]
  · rfl
  · exact hm₁
  · 

Proof state:
case hs2
Ω : Type u_1
ι : Type u_2
m' m₁ m₂ mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
hm₁ : m₁ ≤ mΩ
hm₂ : m₂ ≤ mΩ
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ ∀ s ∈ {s | MeasurableSet s}, MeasurableSet s

Next tactic:
exact hm₂
lemma iCondIndepSet_iff_iCondIndep (s : ι → Set Ω) (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSet m' hm' s μ ↔ iCondIndep m' hm' (fun i ↦ generateFrom {s i}) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ iCondIndepSet m' hm' s ↔ iCondIndep m' hm' fun i => generateFrom {s i}

Next tactic:
simp only [iCondIndepSet, iCondIndep, kernel.iIndepSet]
lemma iCondIndepSet_iff (s : ι → Set Ω) (hs : ∀ i, MeasurableSet (s i))
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepSet m' hm' s μ ↔
      ∀ S : Finset ι, μ⟦⋂ i ∈ S, s i | m'⟧ =ᵐ[μ] ∏ i in S, μ⟦s i | m'⟧ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s : ι → Set Ω
hs : ∀ (i : ι), MeasurableSet (s i)
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ iCondIndepSet m' hm' s ↔
    ∀ (S : Finset ι), μ[Set.indicator (⋂ i ∈ S, s i) fun ω => 1|m'] =ᵐ[μ] ∏ i in S, μ[Set.indicator (s i) fun ω => 1|m']

Next tactic:
rw [iCondIndepSet_iff_iCondIndepSets_singleton _ _ _ hs, iCondIndepSets_singleton_iff _ _ _ hs]
lemma condIndepSet_iff_condIndep (s t : Set Ω) (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndepSet m' hm' s t μ ↔ CondIndep m' (generateFrom {s}) (generateFrom {t}) hm' μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s t : Set Ω
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ CondIndepSet m' hm' s t ↔ CondIndep m' (generateFrom {s}) (generateFrom {t}) hm'

Next tactic:
simp only [CondIndepSet, CondIndep, kernel.IndepSet]
lemma condIndepSet_iff (s t : Set Ω) (hs : MeasurableSet s) (ht : MeasurableSet t)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    CondIndepSet m' hm' s t μ ↔ (μ⟦s ∩ t | m'⟧) =ᵐ[μ] (μ⟦s | m'⟧) * (μ⟦t | m'⟧) := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
s t : Set Ω
hs : MeasurableSet s
ht : MeasurableSet t
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ CondIndepSet m' hm' s t ↔
    μ[Set.indicator (s ∩ t) fun ω => 1|m'] =ᵐ[μ] μ[Set.indicator s fun ω => 1|m'] * μ[Set.indicator t fun ω => 1|m']

Next tactic:
rw [condIndepSet_iff_condIndepSets_singleton _ _ hs ht μ, condIndepSets_singleton_iff _ _ hs ht]
lemma iCondIndepFun_iff_iCondIndep {β : ι → Type*}
    (m : ∀ x : ι, MeasurableSpace (β x)) (f : ∀ x : ι, Ω → β x)
    (μ : Measure Ω) [IsFiniteMeasure μ] :
    iCondIndepFun m' hm' m f μ
      ↔ iCondIndep m' hm' (fun x ↦ MeasurableSpace.comap (f x) (m x)) μ := by
  

Proof state:
Ω : Type u_1
ι : Type u_2
m' mΩ : MeasurableSpace Ω
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm' : m' ≤ mΩ
β : ι → Type u_3
m : (x : ι) → MeasurableSpace (β x)
f : (x : ι) → Ω → β x
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
⊢ iCondIndepFun m' hm' m f ↔ iCondIndep m' hm' fun x => MeasurableSpace.comap (f x) (m x)

Next tactic:
simp only [iCondIndepFun, iCondIndep, kernel.iIndepFun]