l3lab/ntp-mathlib huggingface dataset:
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 => _⟩
    suffices : ∀ i ∈ t, i < c; 

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
this : ∀ i ∈ t, i < c
⊢ False
case this
α : 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
⊢ ∀ i ∈ t, i < c

Next tactic:
exact lt_irrefl c (this c 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 => _⟩
    suffices : ∀ i ∈ t, i < c; exact lt_irrefl c (this c hct)
    

Proof state:
case this
α : 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
⊢ ∀ i ∈ t, i < c

Next tactic:
exact fun i hi => (ha hi).trans_lt (hb.trans_le hc)
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 => _⟩
    suffices : ∀ i ∈ t, i < c; exact lt_irrefl c (this c hct)
    exact fun i hi => (ha hi).trans_lt (hb.trans_le hc)
  · 

Proof state:
case refine'_2
α : 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)
⊢ Directed (fun x x_1 => x ≤ x_1) fun a => ns a

Next tactic:
exact Monotone.directed_le fun i j hij k hki => le_trans hki hij
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 => _⟩
    suffices : ∀ i ∈ t, i < c; exact lt_irrefl c (this c hct)
    exact fun i hi => (ha hi).trans_lt (hb.trans_le hc)
  · exact Monotone.directed_le fun i j hij k hki => le_trans hki hij
  · 

Proof state:
case refine'_3
α : 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)
⊢ ∀ (n : ι), ∃ a, n ∈ ns a

Next tactic:
exact fun n => ⟨n, le_rfl⟩
/-- **Kolmogorov's 0-1 law** : any event in the tail σ-algebra of an independent sequence of
sub-σ-algebras has probability 0 or 1.
The tail σ-algebra `limsup s atTop` is the same as `⋂ n, ⋃ i ≥ n, s i`. -/
theorem measure_zero_or_one_of_measurableSet_limsup_atTop (h_le : ∀ n, s n ≤ m0)
    (h_indep : iIndep s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atTop] 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 Ω
inst✝² : SemilatticeSup ι
inst✝¹ : NoMaxOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s
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_atTop h_le h_indep ht_tail
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := 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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
⊢ Indep (limsup s atBot) (limsup s atBot) κ

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

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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
⊢ Indep (limsup s atBot) (limsup s atBot) κ

Next tactic:
have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  

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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
⊢ Indep (limsup s atBot) (limsup s atBot) κ

Next tactic:
refine' indep_limsup_self h_le h_indep _ _ hnsp _
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
⊢ ∀ (t : Set ι), BddBelow t → tᶜ ∈ atBot

Next tactic:
simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, 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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
⊢ ∀ (t : Set ι), (∃ x, x ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → x ≤ a}) → ∃ a, ∀ b ≤ a, b ∉ t

Next tactic:
rintro t ⟨a, ha⟩
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, 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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → x ≤ a}
⊢ ∃ a, ∀ b ≤ a, b ∉ t

Next tactic:
obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt a
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt 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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → x ≤ a}
b : ι
hb : b < a
⊢ ∃ a, ∀ b ≤ a, b ∉ t

Next tactic:
refine' ⟨b, fun c hc hct => _⟩
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt 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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → x ≤ a}
b : ι
hb : b < a
c : ι
hc : c ≤ b
hct : c ∈ t
⊢ False

Next tactic:
suffices : ∀ i ∈ t, c < i
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt a
    refine' ⟨b, fun c hc hct => _⟩
    suffices : ∀ i ∈ t, c < i; 

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✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → x ≤ a}
b : ι
hb : b < a
c : ι
hc : c ≤ b
hct : c ∈ t
this : ∀ i ∈ t, c < i
⊢ False
case this
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
t : Set ι
a : ι
ha : a ∈ {x | ∀ ⦃a : ι⦄, a ∈ t → x ≤ a}
b : ι
hb : b < a
c : ι
hc : c ≤ b
hct : c ∈ t
⊢ ∀ i ∈ t, c < i

Next tactic:
exact lt_irrefl c (this c hct)
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt a
    refine' ⟨b, fun c hc hct => _⟩
    suffices : ∀ i ∈ t, c < i; exact lt_irrefl c (this c hct)
    

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

Next tactic:
exact fun i hi => hc.trans_lt (hb.trans_le (ha hi))
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt a
    refine' ⟨b, fun c hc hct => _⟩
    suffices : ∀ i ∈ t, c < i; exact lt_irrefl c (this c hct)
    exact fun i hi => hc.trans_lt (hb.trans_le (ha hi))
  · 

Proof state:
case refine'_2
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
⊢ Directed (fun x x_1 => x ≤ x_1) fun a => ns a

Next tactic:
exact Antitone.directed_le fun _ _ ↦ Set.Ici_subset_Ici.2
theorem kernel.indep_limsup_atBot_self (h_le : ∀ n, s n ≤ m0) (h_indep : iIndep s κ μα) :
    Indep (limsup s atBot) (limsup s atBot) κ μα := by
  let ns : ι → Set ι := Set.Ici
  have hnsp : ∀ i, BddBelow (ns i) := fun i => bddBelow_Ici
  refine' indep_limsup_self h_le h_indep _ _ hnsp _
  · simp only [mem_atBot_sets, ge_iff_le, Set.mem_compl_iff, BddBelow, lowerBounds, Set.Nonempty]
    rintro t ⟨a, ha⟩
    obtain ⟨b, hb⟩ : ∃ b, b < a := exists_lt a
    refine' ⟨b, fun c hc hct => _⟩
    suffices : ∀ i ∈ t, c < i; exact lt_irrefl c (this c hct)
    exact fun i hi => hc.trans_lt (hb.trans_le (ha hi))
  · exact Antitone.directed_le fun _ _ ↦ Set.Ici_subset_Ici.2
  · 

Proof state:
case refine'_3
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m m0 : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μα : Measure α
μ : Measure Ω
inst✝⁴ : IsMarkovKernel κ
inst✝³ : IsProbabilityMeasure μ
s : ι → MeasurableSpace Ω
inst✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s κ
ns : ι → Set ι := Set.Ici
hnsp : ∀ (i : ι), BddBelow (ns i)
⊢ ∀ (n : ι), ∃ a, n ∈ ns a

Next tactic:
exact fun n => ⟨n, le_rfl⟩
/-- **Kolmogorov's 0-1 law** : any event in the tail σ-algebra of an independent sequence of
sub-σ-algebras has probability 0 or 1. -/
theorem measure_zero_or_one_of_measurableSet_limsup_atBot (h_le : ∀ n, s n ≤ m0)
    (h_indep : iIndep s μ) {t : Set Ω} (ht_tail : MeasurableSet[limsup s atBot] 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 Ω
inst✝² : SemilatticeInf ι
inst✝¹ : NoMinOrder ι
inst✝ : Nonempty ι
h_le : ∀ (n : ι), s n ≤ m0
h_indep : iIndep s
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_atBot h_le h_indep ht_tail
theorem map_nhds_eq : map φ.leftFun (𝓝 φ.pt) = 𝓝 (φ.leftFun φ.pt) :=
  show map (Prod.fst ∘ φ.prodFun) (𝓝 φ.pt) = 𝓝 (φ.prodFun φ.pt).1 by
    

Proof state:
𝕜 : Type u_1
inst✝⁹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : CompleteSpace E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : CompleteSpace F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace G
φ : ImplicitFunctionData 𝕜 E F G
⊢ map (Prod.fst ∘ prodFun φ) (𝓝 φ.pt) = 𝓝 (prodFun φ φ.pt).1

Next tactic:
rw [← map_map, φ.hasStrictFDerivAt.map_nhds_eq_of_equiv, map_fst_nhds]
theorem implicitFunction_hasStrictFDerivAt (g'inv : G →L[𝕜] E)
    (hg'inv : φ.rightDeriv.comp g'inv = ContinuousLinearMap.id 𝕜 G)
    (hg'invf : φ.leftDeriv.comp g'inv = 0) :
    HasStrictFDerivAt (φ.implicitFunction (φ.leftFun φ.pt)) g'inv (φ.rightFun φ.pt) := by
  

Proof state:
𝕜 : Type u_1
inst✝⁹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : CompleteSpace E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : CompleteSpace F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace G
φ : ImplicitFunctionData 𝕜 E F G
g'inv : G →L[𝕜] E
hg'inv : ContinuousLinearMap.comp φ.rightDeriv g'inv = ContinuousLinearMap.id 𝕜 G
hg'invf : ContinuousLinearMap.comp φ.leftDeriv g'inv = 0
⊢ HasStrictFDerivAt (implicitFunction φ (leftFun φ φ.pt)) g'inv (rightFun φ φ.pt)

Next tactic:
have := φ.hasStrictFDerivAt.to_localInverse
theorem implicitFunction_hasStrictFDerivAt (g'inv : G →L[𝕜] E)
    (hg'inv : φ.rightDeriv.comp g'inv = ContinuousLinearMap.id 𝕜 G)
    (hg'invf : φ.leftDeriv.comp g'inv = 0) :
    HasStrictFDerivAt (φ.implicitFunction (φ.leftFun φ.pt)) g'inv (φ.rightFun φ.pt) := by
  have := φ.hasStrictFDerivAt.to_localInverse
  

Proof state:
𝕜 : Type u_1
inst✝⁹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : CompleteSpace E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : CompleteSpace F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace G
φ : ImplicitFunctionData 𝕜 E F G
g'inv : G →L[𝕜] E
hg'inv : ContinuousLinearMap.comp φ.rightDeriv g'inv = ContinuousLinearMap.id 𝕜 G
hg'invf : ContinuousLinearMap.comp φ.leftDeriv g'inv = 0
this :
  HasStrictFDerivAt
    (HasStrictFDerivAt.localInverse (prodFun φ)
      (ContinuousLinearMap.equivProdOfSurjectiveOfIsCompl φ.leftDeriv φ.rightDeriv (_ : range φ.leftDeriv = ⊤)
        (_ : range φ.rightDeriv = ⊤) (_ : IsCompl (LinearMap.ker φ.leftDeriv) (LinearMap.ker φ.rightDeriv)))
      φ.pt
      (_ :
        HasStrictFDerivAt (prodFun φ)
          (↑(ContinuousLinearMap.equivProdOfSurjectiveOfIsCompl φ.leftDeriv φ.rightDeriv (_ : range φ.leftDeriv = ⊤)
              (_ : range φ.rightDeriv = ⊤) (_ : IsCompl (LinearMap.ker φ.leftDeriv) (LinearMap.ker φ.rightDeriv))))
          φ.pt))
    (↑(ContinuousLinearEquiv.symm
        (ContinuousLinearMap.equivProdOfSurjectiveOfIsCompl φ.leftDeriv φ.rightDeriv (_ : range φ.leftDeriv = ⊤)
          (_ : range φ.rightDeriv = ⊤) (_ : IsCompl (LinearMap.ker φ.leftDeriv) (LinearMap.ker φ.rightDeriv)))))
    (prodFun φ φ.pt)
⊢ HasStrictFDerivAt (implicitFunction φ (leftFun φ φ.pt)) g'inv (rightFun φ φ.pt)

Next tactic:
simp only [prodFun] at this
theorem implicitFunction_hasStrictFDerivAt (g'inv : G →L[𝕜] E)
    (hg'inv : φ.rightDeriv.comp g'inv = ContinuousLinearMap.id 𝕜 G)
    (hg'invf : φ.leftDeriv.comp g'inv = 0) :
    HasStrictFDerivAt (φ.implicitFunction (φ.leftFun φ.pt)) g'inv (φ.rightFun φ.pt) := by
  have := φ.hasStrictFDerivAt.to_localInverse
  simp only [prodFun] at this
  

Proof state:
𝕜 : Type u_1
inst✝⁹ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace 𝕜 E
inst✝⁶ : CompleteSpace E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
inst✝³ : CompleteSpace F
G : Type u_4
inst✝² : NormedAddCommGroup G
inst✝¹ : NormedSpace 𝕜 G
inst✝ : CompleteSpace G
φ : ImplicitFunctionData 𝕜 E F G
g'inv : G →L[𝕜] E
hg'inv : ContinuousLinearMap.comp φ.rightDeriv g'inv = ContinuousLinearMap.id 𝕜 G
hg'invf : ContinuousLinearMap.comp φ.leftDeriv g'inv = 0
this :
  HasStrictFDerivAt
    (HasStrictFDerivAt.localInverse (prodFun φ)
      (ContinuousLinearMap.equivProdOfSurjectiveOfIsCompl φ.leftDeriv φ.rightDeriv (_ : range φ.leftDeriv = ⊤)
        (_ : range φ.rightDeriv = ⊤) (_ : IsCompl (LinearMap.ker φ.leftDeriv) (LinearMap.ker φ.rightDeriv)))
      φ.pt
      (_ :
        HasStrictFDerivAt (prodFun φ)
          (↑(ContinuousLinearMap.equivProdOfSurjectiveOfIsCompl φ.leftDeriv φ.rightDeriv (_ : range φ.leftDeriv = ⊤)
              (_ : range φ.rightDeriv = ⊤) (_ : IsCompl (LinearMap.ker φ.leftDeriv) (LinearMap.ker φ.rightDeriv))))
          φ.pt))
    ↑(ContinuousLinearEquiv.symm
        (ContinuousLinearMap.equivProdOfSurjectiveOfIsCompl φ.leftDeriv φ.rightDeriv (_ : range φ.leftDeriv = ⊤)
          (_ : range φ.rightDeriv = ⊤) (_ : IsCompl (LinearMap.ker φ.leftDeriv) (LinearMap.ker φ.rightDeriv))))
    (leftFun φ φ.pt, rightFun φ φ.pt)
⊢ HasStrictFDerivAt (implicitFunction φ (leftFun φ φ.pt)) g'inv (rightFun φ φ.pt)

Next tactic:
convert this.comp (φ.rightFun φ.pt) ((hasStrictFDerivAt_const _ _).prod (hasStrictFDerivAt_id _))