l3lab/ntp-mathlib huggingface dataset:
@[simp]
theorem image_div_divisors_eq_divisors (n : ℕ) :
    image (fun x : ℕ => n / x) n.divisors = n.divisors := by
  by_cases hn : n = 0
  · simp [hn]
  ext a
  constructor
  · rw [mem_image]
    rintro ⟨x, hx1, hx2⟩
    rw [mem_divisors] at *
    refine' ⟨_, hn⟩
    

Proof state:
case neg.a.mp.intro.intro
n✝ n : ℕ
hn : ¬n = 0
a x : ℕ
hx1 : x ∣ n ∧ n ≠ 0
hx2 : n / x = a
⊢ a ∣ n

Next tactic:
rw [← hx2]
@[simp]
theorem image_div_divisors_eq_divisors (n : ℕ) :
    image (fun x : ℕ => n / x) n.divisors = n.divisors := by
  by_cases hn : n = 0
  · simp [hn]
  ext a
  constructor
  · rw [mem_image]
    rintro ⟨x, hx1, hx2⟩
    rw [mem_divisors] at *
    refine' ⟨_, hn⟩
    rw [← hx2]
    

Proof state:
case neg.a.mp.intro.intro
n✝ n : ℕ
hn : ¬n = 0
a x : ℕ
hx1 : x ∣ n ∧ n ≠ 0
hx2 : n / x = a
⊢ n / x ∣ n

Next tactic:
exact div_dvd_of_dvd hx1.1
@[simp]
theorem image_div_divisors_eq_divisors (n : ℕ) :
    image (fun x : ℕ => n / x) n.divisors = n.divisors := by
  by_cases hn : n = 0
  · simp [hn]
  ext a
  constructor
  · rw [mem_image]
    rintro ⟨x, hx1, hx2⟩
    rw [mem_divisors] at *
    refine' ⟨_, hn⟩
    rw [← hx2]
    exact div_dvd_of_dvd hx1.1
  · 

Proof state:
case neg.a.mpr
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ a ∈ divisors n → a ∈ image (fun x => n / x) (divisors n)

Next tactic:
rw [mem_divisors, mem_image]
@[simp]
theorem image_div_divisors_eq_divisors (n : ℕ) :
    image (fun x : ℕ => n / x) n.divisors = n.divisors := by
  by_cases hn : n = 0
  · simp [hn]
  ext a
  constructor
  · rw [mem_image]
    rintro ⟨x, hx1, hx2⟩
    rw [mem_divisors] at *
    refine' ⟨_, hn⟩
    rw [← hx2]
    exact div_dvd_of_dvd hx1.1
  · rw [mem_divisors, mem_image]
    

Proof state:
case neg.a.mpr
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
⊢ a ∣ n ∧ n ≠ 0 → ∃ a_2 ∈ divisors n, n / a_2 = a

Next tactic:
rintro ⟨h1, -⟩
@[simp]
theorem image_div_divisors_eq_divisors (n : ℕ) :
    image (fun x : ℕ => n / x) n.divisors = n.divisors := by
  by_cases hn : n = 0
  · simp [hn]
  ext a
  constructor
  · rw [mem_image]
    rintro ⟨x, hx1, hx2⟩
    rw [mem_divisors] at *
    refine' ⟨_, hn⟩
    rw [← hx2]
    exact div_dvd_of_dvd hx1.1
  · rw [mem_divisors, mem_image]
    rintro ⟨h1, -⟩
    

Proof state:
case neg.a.mpr.intro
n✝ n : ℕ
hn : ¬n = 0
a : ℕ
h1 : a ∣ n
⊢ ∃ a_1 ∈ divisors n, n / a_1 = a

Next tactic:
exact ⟨n / a, mem_divisors.mpr ⟨div_dvd_of_dvd h1, hn⟩, Nat.div_div_self h1 hn⟩
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  

Proof state:
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
⊢ ∏ d in divisors n, f (n / d) = Finset.prod (divisors n) f

Next tactic:
by_cases hn : n = 0
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · 

Proof state:
case pos
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : n = 0
⊢ ∏ d in divisors n, f (n / d) = Finset.prod (divisors n) f

Next tactic:
simp [hn]
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · simp [hn]
  

Proof state:
case neg
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : ¬n = 0
⊢ ∏ d in divisors n, f (n / d) = Finset.prod (divisors n) f

Next tactic:
rw [← prod_image]
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · simp [hn]
  rw [← prod_image]
  · 

Proof state:
case neg
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : ¬n = 0
⊢ ∏ x in image (fun d => n / d) (divisors n), f x = Finset.prod (divisors n) f

Next tactic:
exact prod_congr (image_div_divisors_eq_divisors n) (by simp)
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · simp [hn]
  rw [← prod_image]
  · exact prod_congr (image_div_divisors_eq_divisors n) (by 

Proof state:
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : ¬n = 0
⊢ ∀ x ∈ divisors n, f x = f x

Next tactic:
simp
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · simp [hn]
  rw [← prod_image]
  · exact prod_congr (image_div_divisors_eq_divisors n) (by simp)
  · 

Proof state:
case neg
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : ¬n = 0
⊢ ∀ x ∈ divisors n, ∀ y ∈ divisors n, n / x = n / y → x = y

Next tactic:
intro x hx y hy h
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · simp [hn]
  rw [← prod_image]
  · exact prod_congr (image_div_divisors_eq_divisors n) (by simp)
  · intro x hx y hy h
    

Proof state:
case neg
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : ¬n = 0
x : ℕ
hx : x ∈ divisors n
y : ℕ
hy : y ∈ divisors n
h : n / x = n / y
⊢ x = y

Next tactic:
rw [mem_divisors] at hx hy
@[to_additive sum_div_divisors]
theorem prod_div_divisors {α : Type*} [CommMonoid α] (n : ℕ) (f : ℕ → α) :
    (∏ d in n.divisors, f (n / d)) = n.divisors.prod f := by
  by_cases hn : n = 0; · simp [hn]
  rw [← prod_image]
  · exact prod_congr (image_div_divisors_eq_divisors n) (by simp)
  · intro x hx y hy h
    rw [mem_divisors] at hx hy
    

Proof state:
case neg
n✝ : ℕ
α : Type u_1
inst✝ : CommMonoid α
n : ℕ
f : ℕ → α
hn : ¬n = 0
x : ℕ
hx : x ∣ n ∧ n ≠ 0
y : ℕ
hy : y ∣ n ∧ n ≠ 0
h : n / x = n / y
⊢ x = y

Next tactic:
exact (div_eq_iff_eq_of_dvd_dvd hn hx.1 hy.1).mp h
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : IndepSet t t κ
⊢ ∀ᵐ (a : α) ∂μα, ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
⊢ ∀ᵐ (a : α) ∂μα, ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
filter_upwards [h_indep] with a ha
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  filter_upwards [h_indep] with a ha
  

Proof state:
case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
a : α
ha : ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
by_cases h0 : κ a t = 0
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  filter_upwards [h_indep] with a ha
  by_cases h0 : κ a t = 0
  · 

Proof state:
case pos
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
a : α
ha : ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
h0 : ↑↑(κ a) t = 0
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
exact Or.inl h0
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  filter_upwards [h_indep] with a ha
  by_cases h0 : κ a t = 0
  · exact Or.inl h0
  

Proof state:
case neg
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
a : α
ha : ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
h0 : ¬↑↑(κ a) t = 0
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
by_cases h_top : κ a t = ∞
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  filter_upwards [h_indep] with a ha
  by_cases h0 : κ a t = 0
  · exact Or.inl h0
  by_cases h_top : κ a t = ∞
  · 

Proof state:
case pos
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
a : α
ha : ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
h0 : ¬↑↑(κ a) t = 0
h_top : ↑↑(κ a) t = ⊤
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
exact Or.inr (Or.inr h_top)
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  filter_upwards [h_indep] with a ha
  by_cases h0 : κ a t = 0
  · exact Or.inl h0
  by_cases h_top : κ a t = ∞
  · exact Or.inr (Or.inr h_top)
  

Proof state:
case neg
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
a : α
ha : ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
h0 : ¬↑↑(κ a) t = 0
h_top : ¬↑↑(κ a) t = ⊤
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
rw [← one_mul (κ a (t ∩ t)), Set.inter_self, ENNReal.mul_eq_mul_right h0 h_top] at ha
theorem kernel.measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : kernel.IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 ∨ κ a t = ∞ := by
  specialize h_indep t t (measurableSet_generateFrom (Set.mem_singleton t))
    (measurableSet_generateFrom (Set.mem_singleton t))
  filter_upwards [h_indep] with a ha
  by_cases h0 : κ a t = 0
  · exact Or.inl h0
  by_cases h_top : κ a t = ∞
  · exact Or.inr (Or.inr h_top)
  rw [← one_mul (κ a (t ∩ t)), Set.inter_self, ENNReal.mul_eq_mul_right h0 h_top] at ha
  

Proof state:
case neg
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : ∀ᵐ (a : α) ∂μα, ↑↑(κ a) (t ∩ t) = ↑↑(κ a) t * ↑↑(κ a) t
a : α
ha : 1 = ↑↑(κ a) t
h0 : ¬↑↑(κ a) t = 0
h_top : ¬↑↑(κ a) t = ⊤
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤

Next tactic:
exact Or.inr (Or.inl ha.symm)
theorem measure_eq_zero_or_one_or_top_of_indepSet_self {t : Set Ω}
    (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1 ∨ μ t = ∞ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
t : Set Ω
h_indep : IndepSet t t
⊢ ↑↑μ t = 0 ∨ ↑↑μ t = 1 ∨ ↑↑μ t = ⊤

Next tactic:
simpa only [ae_dirac_eq, Filter.eventually_pure]
    using kernel.measure_eq_zero_or_one_or_top_of_indepSet_self h_indep
theorem kernel.measure_eq_zero_or_one_of_indepSet_self [∀ a, IsFiniteMeasure (κ a)] {t : Set Ω}
    (h_indep : IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝ : ∀ (a : α), IsFiniteMeasure (κ a)
t : Set Ω
h_indep : IndepSet t t κ
⊢ ∀ᵐ (a : α) ∂μα, ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1

Next tactic:
filter_upwards [measure_eq_zero_or_one_or_top_of_indepSet_self h_indep] with a h_0_1_top
theorem kernel.measure_eq_zero_or_one_of_indepSet_self [∀ a, IsFiniteMeasure (κ a)] {t : Set Ω}
    (h_indep : IndepSet t t κ μα) :
    ∀ᵐ a ∂μα, κ a t = 0 ∨ κ a t = 1 := by
  filter_upwards [measure_eq_zero_or_one_or_top_of_indepSet_self h_indep] with a h_0_1_top
  

Proof state:
case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝ : ∀ (a : α), IsFiniteMeasure (κ a)
t : Set Ω
h_indep : IndepSet t t κ
a : α
h_0_1_top : ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1 ∨ ↑↑(κ a) t = ⊤
⊢ ↑↑(κ a) t = 0 ∨ ↑↑(κ a) t = 1

Next tactic:
simpa only [measure_ne_top (κ a), or_false] using h_0_1_top
theorem measure_eq_zero_or_one_of_indepSet_self [IsFiniteMeasure μ] {t : Set Ω}
    (h_indep : IndepSet t t μ) : μ t = 0 ∨ μ t = 1 := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝ : IsFiniteMeasure μ
t : Set Ω
h_indep : IndepSet t t
⊢ ↑↑μ t = 0 ∨ ↑↑μ t = 1

Next tactic:
simpa only [ae_dirac_eq, Filter.eventually_pure]
    using kernel.measure_eq_zero_or_one_of_indepSet_self h_indep
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
⊢ ∀ᵐ (ω : Ω) ∂μ, (μ[Set.indicator t fun ω => 1|m]) ω = 0 ∨ (μ[Set.indicator t fun ω => 1|m]) ω = 1

Next tactic:
have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
⊢ ∀ᵐ (ω : Ω) ∂μ, (μ[Set.indicator t fun ω => 1|m]) ω = 0 ∨ (μ[Set.indicator t fun ω => 1|m]) ω = 1

Next tactic:
filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
  

Proof state:
case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ω : Ω
hω_eq : ENNReal.toReal (↑↑((condexpKernel μ m) ω) t) = (μ[Set.indicator t fun ω => 1|m]) ω
hω : ↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = 1
⊢ (μ[Set.indicator t fun ω => 1|m]) ω = 0 ∨ (μ[Set.indicator t fun ω => 1|m]) ω = 1

Next tactic:
rw [← hω_eq, ENNReal.toReal_eq_zero_iff, ENNReal.toReal_eq_one_iff]
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
  rw [← hω_eq, ENNReal.toReal_eq_zero_iff, ENNReal.toReal_eq_one_iff]
  

Proof state:
case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ω : Ω
hω_eq : ENNReal.toReal (↑↑((condexpKernel μ m) ω) t) = (μ[Set.indicator t fun ω => 1|m]) ω
hω : ↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = 1
⊢ (↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = ⊤) ∨ ↑↑((condexpKernel μ m) ω) t = 1

Next tactic:
cases hω with
  | inl h => exact Or.inl (Or.inl h)
  | inr h => exact Or.inr h
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
  rw [← hω_eq, ENNReal.toReal_eq_zero_iff, ENNReal.toReal_eq_one_iff]
  cases hω with
  

Proof state:
case h.inl
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ω : Ω
hω_eq : ENNReal.toReal (↑↑((condexpKernel μ m) ω) t) = (μ[Set.indicator t fun ω => 1|m]) ω
h : ↑↑((condexpKernel μ m) ω) t = 0
⊢ (↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = ⊤) ∨ ↑↑((condexpKernel μ m) ω) t = 1

Next tactic:
| inl h => exact Or.inl (Or.inl h)
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
  rw [← hω_eq, ENNReal.toReal_eq_zero_iff, ENNReal.toReal_eq_one_iff]
  cases hω with
  | inl h => 

Proof state:
case h.inl
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ω : Ω
hω_eq : ENNReal.toReal (↑↑((condexpKernel μ m) ω) t) = (μ[Set.indicator t fun ω => 1|m]) ω
h : ↑↑((condexpKernel μ m) ω) t = 0
⊢ (↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = ⊤) ∨ ↑↑((condexpKernel μ m) ω) t = 1

Next tactic:
exact Or.inl (Or.inl h)
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
  rw [← hω_eq, ENNReal.toReal_eq_zero_iff, ENNReal.toReal_eq_one_iff]
  cases hω with
  | inl h => exact Or.inl (Or.inl h)
  

Proof state:
case h.inr
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ω : Ω
hω_eq : ENNReal.toReal (↑↑((condexpKernel μ m) ω) t) = (μ[Set.indicator t fun ω => 1|m]) ω
h : ↑↑((condexpKernel μ m) ω) t = 1
⊢ (↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = ⊤) ∨ ↑↑((condexpKernel μ m) ω) t = 1

Next tactic:
| inr h => exact Or.inr h
theorem condexp_eq_zero_or_one_of_condIndepSet_self
    [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [hμ : IsFiniteMeasure μ] {t : Set Ω} (ht : MeasurableSet t)
    (h_indep : CondIndepSet m hm t t μ) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm (kernel.measure_eq_zero_or_one_of_indepSet_self h_indep)
  filter_upwards [condexpKernel_ae_eq_condexp hm ht, h] with ω hω_eq hω
  rw [← hω_eq, ENNReal.toReal_eq_zero_iff, ENNReal.toReal_eq_one_iff]
  cases hω with
  | inl h => exact Or.inl (Or.inl h)
  | inr h => 

Proof state:
case h.inr
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝¹ : StandardBorelSpace Ω
inst✝ : Nonempty Ω
hm : m ≤ m0
hμ : IsFiniteMeasure μ
t : Set Ω
ht : MeasurableSet t
h_indep : CondIndepSet m hm t t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ω : Ω
hω_eq : ENNReal.toReal (↑↑((condexpKernel μ m) ω) t) = (μ[Set.indicator t fun ω => 1|m]) ω
h : ↑↑((condexpKernel μ m) ω) t = 1
⊢ (↑↑((condexpKernel μ m) ω) t = 0 ∨ ↑↑((condexpKernel μ m) ω) t = ⊤) ∨ ↑↑((condexpKernel μ m) ω) t = 1

Next tactic:
exact Or.inr h
theorem kernel.indep_biSup_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα)
    (hf : ∀ t, p t → tᶜ ∈ f) {t : Set ι} (ht : p t) :
    Indep (⨆ n ∈ t, s n) (limsup s f) κ μα := by
  

Proof state:
α✝ : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α✝
m m0 : MeasurableSpace Ω
κ : ↥(kernel α✝ Ω)
μα : Measure α✝
μ : Measure Ω
inst✝¹ : IsMarkovKernel κ
inst✝ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
t : Set ι
ht : p t
⊢ Indep (⨆ n ∈ t, s n) (limsup s f) κ

Next tactic:
refine' indep_of_indep_of_le_right (indep_biSup_compl h_le h_indep t) _