l3lab/ntp-mathlib huggingface dataset:
theorem measure_zero_or_one_of_measurableSet_limsup (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] 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✝¹ : 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
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
⊢ ↑↑μ t = 0 ∨ ↑↑μ t = 1

Next tactic:
simpa only [ae_dirac_eq, Filter.eventually_pure]
    using kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ
      ht_tail
theorem condexp_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] 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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet 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_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
theorem condexp_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  

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 ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet 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:
have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
theorem condexp_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  

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 ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
⊢ ∀ᵐ (ω : Ω) ∂μ, (μ[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_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
ω : Ω
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_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
ω : Ω
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_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
ω : Ω
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_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
ω : Ω
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_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
ω : Ω
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_zero_or_one_of_measurableSet_limsup [StandardBorelSpace Ω] [Nonempty Ω]
    (hm : m ≤ m0) [IsFiniteMeasure μ]
    (h_le : ∀ n, s n ≤ m0) (h_indep : iCondIndep m hm s μ)
    (hf : ∀ t, p t → tᶜ ∈ f) (hns : Directed (· ≤ ·) ns) (hnsp : ∀ a, p (ns a))
    (hns_univ : ∀ n, ∃ a, n ∈ ns a) {t : Set Ω} (ht_tail : MeasurableSet[limsup s f] t) :
    ∀ᵐ ω ∂μ, (μ⟦t | m⟧) ω = 0 ∨ (μ⟦t | m⟧) ω = 1 := by
  have h := ae_of_ae_trim hm
    (kernel.measure_zero_or_one_of_measurableSet_limsup h_le h_indep hf hns hnsp hns_univ ht_tail)
  have ht : MeasurableSet t := limsup_le_iSup.trans (iSup_le h_le) t ht_tail
  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✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
α : Type u_4
p : Set ι → Prop
f : Filter ι
ns : α → Set ι
inst✝² : StandardBorelSpace Ω
inst✝¹ : Nonempty Ω
hm : m ≤ m0
inst✝ : IsFiniteMeasure μ
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iCondIndep m hm s
hf : ∀ (t : Set ι), p t → tᶜ ∈ f
hns : Directed (fun x x_1 => x ≤ x_1) ns
hnsp : ∀ (a : α), p (ns a)
hns_univ : ∀ (n : ι), ∃ a, n ∈ ns a
t : Set Ω
ht_tail : MeasurableSet t
h✝ : ∀ᵐ (x : Ω) ∂μ, ↑↑((condexpKernel μ m) x) t = 0 ∨ ↑↑((condexpKernel μ m) x) t = 1
ht : MeasurableSet t
ω : Ω
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_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := 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 Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
⊢ Indep (limsup s atTop) (limsup s atTop) κ

Next tactic:
let ns : ι → Set ι := Set.Iic
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  

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 Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
⊢ Indep (limsup s atTop) (limsup s atTop) κ

Next tactic:
have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
  

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 Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
hnsp : ∀ (i : ι), BddAbove (ns i)
⊢ Indep (limsup s atTop) (limsup s atTop) κ

Next tactic:
refine' indep_limsup_self h_le h_indep _ _ hnsp _
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · 

Proof state:
case refine'_1
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
hnsp : ∀ (i : ι), BddAbove (ns i)
⊢ ∀ (t : Set ι), BddAbove t → tᶜ ∈ atTop

Next tactic:
simp only [mem_atTop_sets, ge_iff_le, Set.mem_compl_iff, BddAbove, upperBounds, Set.Nonempty]
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atTop_sets, ge_iff_le, Set.mem_compl_iff, BddAbove, upperBounds, Set.Nonempty]
    

Proof state:
case refine'_1
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
hnsp : ∀ (i : ι), BddAbove (ns i)
⊢ ∀ (t : Set ι), (∃ x, x ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → a ≤ x}) → ∃ a, ∀ (b : ι), a ≤ b → b ∉ t

Next tactic:
rintro t ⟨a, ha⟩
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atTop_sets, ge_iff_le, Set.mem_compl_iff, BddAbove, upperBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    

Proof state:
case refine'_1.intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
hnsp : ∀ (i : ι), BddAbove (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → a ≤ x}
⊢ ∃ a, ∀ (b : ι), a ≤ b → b ∉ t

Next tactic:
obtain ⟨b, hb⟩ : ∃ b, a < b := exists_gt a
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atTop_sets, ge_iff_le, Set.mem_compl_iff, BddAbove, upperBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, a < b := exists_gt a
    

Proof state:
case refine'_1.intro.intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
hnsp : ∀ (i : ι), BddAbove (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → a ≤ x}
b : ι
hb : a < b
⊢ ∃ a, ∀ (b : ι), a ≤ b → b ∉ t

Next tactic:
refine' ⟨b, fun c hc hct => _⟩
theorem kernel.indep_limsup_atTop_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atTop) (limsup s atTop) κ μα := by
  let ns : ι → Set ι := Set.Iic
  have hnsp : ∀ i, BddAbove (ns i) := fun i => bddAbove_Iic
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atTop_sets, ge_iff_le, Set.mem_compl_iff, BddAbove, upperBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, a < b := exists_gt a
    refine' ⟨b, fun c hc hct => _⟩
    

Proof state:
case refine'_1.intro.intro
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Iic
hnsp : ∀ (i : ι), BddAbove (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → a ≤ x}
b : ι
hb : a < b
c : ι
hc : b ≤ c
hct : c ∈ t
⊢ False

Next tactic:
suffices : ∀ i ∈ t, i < c