l3lab/ntp-mathlib huggingface dataset:
/-- If an `r`-decreasing chain `l` is empty or its head is accessible by `r`, then
  `l` is accessible by the lexicographic order `List.Lex r`. -/
theorem Acc.list_chain' {l : List.chains r} (acc : ∀ a ∈ l.val.head?, Acc r a) :
    Acc (List.lex_chains r) l := by
  obtain ⟨_ | ⟨a, l⟩, hl⟩ := l
  · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
  specialize acc a _
  · rw [List.head?_cons, Option.mem_some_iff]
  /- For an r-decreasing chain of the form a :: l, apply induction on a -/
  induction acc generalizing l with
  | intro a _ ih =>
    /- Bundle l with a proof that it is r-decreasing to form l' -/
    have hl' := (List.chain'_cons'.1 hl).2
    let l' : List.chains r := ⟨l, hl'⟩
    have : Acc (List.lex_chains r) l' := by
      cases' l with b l
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      /- l' is accessible by induction hypothesis -/
      · apply ih b (List.chain'_cons.1 hl).1
    /- make l' a free variable and induct on l' -/
    revert hl
    rw [(by rfl : l = l'.1)]
    clear_value l'
    induction this with
    | intro l _ ihl =>
      intro hl
      

Proof state:
case mk.cons.intro.intro
α : Type u_1
r : α → α → Prop
a✝ a : α
h✝¹ : ∀ (y : α), r y a → Acc r y
ih :
  ∀ (y : α),
    r y a →
      ∀ (l : List α) (hl : List.Chain' (flip r) (y :: l)), Acc (List.lex_chains r) { val := y :: l, property := hl }
l✝ : List α
hl' : List.Chain' (flip r) l✝
l' l : List.chains r
h✝ : ∀ (y : List.chains r), List.lex_chains r y l → Acc (List.lex_chains r) y
ihl :
  ∀ (y : List.chains r),
    List.lex_chains r y l →
      ∀ (hl : List.Chain' (flip r) (a :: ↑y)), Acc (List.lex_chains r) { val := a :: ↑y, property := hl }
hl : List.Chain' (flip r) (a :: ↑l)
⊢ Acc (List.lex_chains r) { val := a :: ↑l, property := hl }

Next tactic:
apply Acc.intro
/-- If an `r`-decreasing chain `l` is empty or its head is accessible by `r`, then
  `l` is accessible by the lexicographic order `List.Lex r`. -/
theorem Acc.list_chain' {l : List.chains r} (acc : ∀ a ∈ l.val.head?, Acc r a) :
    Acc (List.lex_chains r) l := by
  obtain ⟨_ | ⟨a, l⟩, hl⟩ := l
  · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
  specialize acc a _
  · rw [List.head?_cons, Option.mem_some_iff]
  /- For an r-decreasing chain of the form a :: l, apply induction on a -/
  induction acc generalizing l with
  | intro a _ ih =>
    /- Bundle l with a proof that it is r-decreasing to form l' -/
    have hl' := (List.chain'_cons'.1 hl).2
    let l' : List.chains r := ⟨l, hl'⟩
    have : Acc (List.lex_chains r) l' := by
      cases' l with b l
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      /- l' is accessible by induction hypothesis -/
      · apply ih b (List.chain'_cons.1 hl).1
    /- make l' a free variable and induct on l' -/
    revert hl
    rw [(by rfl : l = l'.1)]
    clear_value l'
    induction this with
    | intro l _ ihl =>
      intro hl
      apply Acc.intro
      

Proof state:
case mk.cons.intro.intro.h
α : Type u_1
r : α → α → Prop
a✝ a : α
h✝¹ : ∀ (y : α), r y a → Acc r y
ih :
  ∀ (y : α),
    r y a →
      ∀ (l : List α) (hl : List.Chain' (flip r) (y :: l)), Acc (List.lex_chains r) { val := y :: l, property := hl }
l✝ : List α
hl' : List.Chain' (flip r) l✝
l' l : List.chains r
h✝ : ∀ (y : List.chains r), List.lex_chains r y l → Acc (List.lex_chains r) y
ihl :
  ∀ (y : List.chains r),
    List.lex_chains r y l →
      ∀ (hl : List.Chain' (flip r) (a :: ↑y)), Acc (List.lex_chains r) { val := a :: ↑y, property := hl }
hl : List.Chain' (flip r) (a :: ↑l)
⊢ ∀ (y : List.chains r), List.lex_chains r y { val := a :: ↑l, property := hl } → Acc (List.lex_chains r) y

Next tactic:
rintro ⟨_ | ⟨b, m⟩, hm⟩ (_ | hr | hr)
/-- If an `r`-decreasing chain `l` is empty or its head is accessible by `r`, then
  `l` is accessible by the lexicographic order `List.Lex r`. -/
theorem Acc.list_chain' {l : List.chains r} (acc : ∀ a ∈ l.val.head?, Acc r a) :
    Acc (List.lex_chains r) l := by
  obtain ⟨_ | ⟨a, l⟩, hl⟩ := l
  · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
  specialize acc a _
  · rw [List.head?_cons, Option.mem_some_iff]
  /- For an r-decreasing chain of the form a :: l, apply induction on a -/
  induction acc generalizing l with
  | intro a _ ih =>
    /- Bundle l with a proof that it is r-decreasing to form l' -/
    have hl' := (List.chain'_cons'.1 hl).2
    let l' : List.chains r := ⟨l, hl'⟩
    have : Acc (List.lex_chains r) l' := by
      cases' l with b l
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      /- l' is accessible by induction hypothesis -/
      · apply ih b (List.chain'_cons.1 hl).1
    /- make l' a free variable and induct on l' -/
    revert hl
    rw [(by rfl : l = l'.1)]
    clear_value l'
    induction this with
    | intro l _ ihl =>
      intro hl
      apply Acc.intro
      rintro ⟨_ | ⟨b, m⟩, hm⟩ (_ | hr | hr)
      · 

Proof state:
case mk.cons.intro.intro.h.mk.nil.nil
α : Type u_1
r : α → α → Prop
a✝ a : α
h✝¹ : ∀ (y : α), r y a → Acc r y
ih :
  ∀ (y : α),
    r y a →
      ∀ (l : List α) (hl : List.Chain' (flip r) (y :: l)), Acc (List.lex_chains r) { val := y :: l, property := hl }
l✝ : List α
hl' : List.Chain' (flip r) l✝
l' l : List.chains r
h✝ : ∀ (y : List.chains r), List.lex_chains r y l → Acc (List.lex_chains r) y
ihl :
  ∀ (y : List.chains r),
    List.lex_chains r y l →
      ∀ (hl : List.Chain' (flip r) (a :: ↑y)), Acc (List.lex_chains r) { val := a :: ↑y, property := hl }
hl : List.Chain' (flip r) (a :: ↑l)
hm : List.Chain' (flip r) []
⊢ Acc (List.lex_chains r) { val := [], property := hm }

Next tactic:
apply Acc.intro
/-- If an `r`-decreasing chain `l` is empty or its head is accessible by `r`, then
  `l` is accessible by the lexicographic order `List.Lex r`. -/
theorem Acc.list_chain' {l : List.chains r} (acc : ∀ a ∈ l.val.head?, Acc r a) :
    Acc (List.lex_chains r) l := by
  obtain ⟨_ | ⟨a, l⟩, hl⟩ := l
  · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
  specialize acc a _
  · rw [List.head?_cons, Option.mem_some_iff]
  /- For an r-decreasing chain of the form a :: l, apply induction on a -/
  induction acc generalizing l with
  | intro a _ ih =>
    /- Bundle l with a proof that it is r-decreasing to form l' -/
    have hl' := (List.chain'_cons'.1 hl).2
    let l' : List.chains r := ⟨l, hl'⟩
    have : Acc (List.lex_chains r) l' := by
      cases' l with b l
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      /- l' is accessible by induction hypothesis -/
      · apply ih b (List.chain'_cons.1 hl).1
    /- make l' a free variable and induct on l' -/
    revert hl
    rw [(by rfl : l = l'.1)]
    clear_value l'
    induction this with
    | intro l _ ihl =>
      intro hl
      apply Acc.intro
      rintro ⟨_ | ⟨b, m⟩, hm⟩ (_ | hr | hr)
      · apply Acc.intro; 

Proof state:
case mk.cons.intro.intro.h.mk.nil.nil.h
α : Type u_1
r : α → α → Prop
a✝ a : α
h✝¹ : ∀ (y : α), r y a → Acc r y
ih :
  ∀ (y : α),
    r y a →
      ∀ (l : List α) (hl : List.Chain' (flip r) (y :: l)), Acc (List.lex_chains r) { val := y :: l, property := hl }
l✝ : List α
hl' : List.Chain' (flip r) l✝
l' l : List.chains r
h✝ : ∀ (y : List.chains r), List.lex_chains r y l → Acc (List.lex_chains r) y
ihl :
  ∀ (y : List.chains r),
    List.lex_chains r y l →
      ∀ (hl : List.Chain' (flip r) (a :: ↑y)), Acc (List.lex_chains r) { val := a :: ↑y, property := hl }
hl : List.Chain' (flip r) (a :: ↑l)
hm : List.Chain' (flip r) []
⊢ ∀ (y : List.chains r), List.lex_chains r y { val := [], property := hm } → Acc (List.lex_chains r) y

Next tactic:
rintro ⟨_⟩ ⟨_⟩
/-- If an `r`-decreasing chain `l` is empty or its head is accessible by `r`, then
  `l` is accessible by the lexicographic order `List.Lex r`. -/
theorem Acc.list_chain' {l : List.chains r} (acc : ∀ a ∈ l.val.head?, Acc r a) :
    Acc (List.lex_chains r) l := by
  obtain ⟨_ | ⟨a, l⟩, hl⟩ := l
  · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
  specialize acc a _
  · rw [List.head?_cons, Option.mem_some_iff]
  /- For an r-decreasing chain of the form a :: l, apply induction on a -/
  induction acc generalizing l with
  | intro a _ ih =>
    /- Bundle l with a proof that it is r-decreasing to form l' -/
    have hl' := (List.chain'_cons'.1 hl).2
    let l' : List.chains r := ⟨l, hl'⟩
    have : Acc (List.lex_chains r) l' := by
      cases' l with b l
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      /- l' is accessible by induction hypothesis -/
      · apply ih b (List.chain'_cons.1 hl).1
    /- make l' a free variable and induct on l' -/
    revert hl
    rw [(by rfl : l = l'.1)]
    clear_value l'
    induction this with
    | intro l _ ihl =>
      intro hl
      apply Acc.intro
      rintro ⟨_ | ⟨b, m⟩, hm⟩ (_ | hr | hr)
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      · 

Proof state:
case mk.cons.intro.intro.h.mk.cons.cons
α : Type u_1
r : α → α → Prop
a✝ a : α
h✝¹ : ∀ (y : α), r y a → Acc r y
ih :
  ∀ (y : α),
    r y a →
      ∀ (l : List α) (hl : List.Chain' (flip r) (y :: l)), Acc (List.lex_chains r) { val := y :: l, property := hl }
l✝ : List α
hl' : List.Chain' (flip r) l✝
l' l : List.chains r
h✝ : ∀ (y : List.chains r), List.lex_chains r y l → Acc (List.lex_chains r) y
ihl :
  ∀ (y : List.chains r),
    List.lex_chains r y l →
      ∀ (hl : List.Chain' (flip r) (a :: ↑y)), Acc (List.lex_chains r) { val := a :: ↑y, property := hl }
hl : List.Chain' (flip r) (a :: ↑l)
m : List α
hm : List.Chain' (flip r) (a :: m)
hr : List.Lex r m ↑l
⊢ Acc (List.lex_chains r) { val := a :: m, property := hm }

Next tactic:
apply ihl ⟨m, (List.chain'_cons'.1 hm).2⟩ hr
/-- If an `r`-decreasing chain `l` is empty or its head is accessible by `r`, then
  `l` is accessible by the lexicographic order `List.Lex r`. -/
theorem Acc.list_chain' {l : List.chains r} (acc : ∀ a ∈ l.val.head?, Acc r a) :
    Acc (List.lex_chains r) l := by
  obtain ⟨_ | ⟨a, l⟩, hl⟩ := l
  · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
  specialize acc a _
  · rw [List.head?_cons, Option.mem_some_iff]
  /- For an r-decreasing chain of the form a :: l, apply induction on a -/
  induction acc generalizing l with
  | intro a _ ih =>
    /- Bundle l with a proof that it is r-decreasing to form l' -/
    have hl' := (List.chain'_cons'.1 hl).2
    let l' : List.chains r := ⟨l, hl'⟩
    have : Acc (List.lex_chains r) l' := by
      cases' l with b l
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      /- l' is accessible by induction hypothesis -/
      · apply ih b (List.chain'_cons.1 hl).1
    /- make l' a free variable and induct on l' -/
    revert hl
    rw [(by rfl : l = l'.1)]
    clear_value l'
    induction this with
    | intro l _ ihl =>
      intro hl
      apply Acc.intro
      rintro ⟨_ | ⟨b, m⟩, hm⟩ (_ | hr | hr)
      · apply Acc.intro; rintro ⟨_⟩ ⟨_⟩
      · apply ihl ⟨m, (List.chain'_cons'.1 hm).2⟩ hr
      · 

Proof state:
case mk.cons.intro.intro.h.mk.cons.rel
α : Type u_1
r : α → α → Prop
a✝ a : α
h✝¹ : ∀ (y : α), r y a → Acc r y
ih :
  ∀ (y : α),
    r y a →
      ∀ (l : List α) (hl : List.Chain' (flip r) (y :: l)), Acc (List.lex_chains r) { val := y :: l, property := hl }
l✝ : List α
hl' : List.Chain' (flip r) l✝
l' l : List.chains r
h✝ : ∀ (y : List.chains r), List.lex_chains r y l → Acc (List.lex_chains r) y
ihl :
  ∀ (y : List.chains r),
    List.lex_chains r y l →
      ∀ (hl : List.Chain' (flip r) (a :: ↑y)), Acc (List.lex_chains r) { val := a :: ↑y, property := hl }
hl : List.Chain' (flip r) (a :: ↑l)
b : α
m : List α
hm : List.Chain' (flip r) (b :: m)
hr : r b a
⊢ Acc (List.lex_chains r) { val := b :: m, property := hm }

Next tactic:
apply ih b hr
lemma iIndepSets.meas_iInter [Fintype ι] (h : iIndepSets π κ μ) (hs : ∀ i, s i ∈ π i) :
    ∀ᵐ a ∂μ, κ a (⋂ i, s i) = ∏ i, κ a (s i) := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
β : ι → Type u_4
mβ : (i : ι) → MeasurableSpace (β i)
_mα : MeasurableSpace α
m : ι → MeasurableSpace Ω
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
π : ι → Set (Set Ω)
s : ι → Set Ω
S : Finset ι
f : (x : ι) → Ω → β x
inst✝ : Fintype ι
h : iIndepSets π κ
hs : ∀ (i : ι), s i ∈ π i
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (⋂ i, s i) = ∏ i : ι, ↑↑(κ a) (s i)

Next tactic:
filter_upwards [h.meas_biInter Finset.univ (fun _i _ ↦ hs _)] with a ha using by simp [← ha]
lemma iIndepSets.meas_iInter [Fintype ι] (h : iIndepSets π κ μ) (hs : ∀ i, s i ∈ π i) :
    ∀ᵐ a ∂μ, κ a (⋂ i, s i) = ∏ i, κ a (s i) := by
  filter_upwards [h.meas_biInter Finset.univ (fun _i _ ↦ hs _)] with a ha using by 

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
β : ι → Type u_4
mβ : (i : ι) → MeasurableSpace (β i)
_mα : MeasurableSpace α
m : ι → MeasurableSpace Ω
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
π : ι → Set (Set Ω)
s : ι → Set Ω
S : Finset ι
f : (x : ι) → Ω → β x
inst✝ : Fintype ι
h : iIndepSets π κ
hs : ∀ (i : ι), s i ∈ π i
a : α
ha : ↑↑(κ a) (⋂ i ∈ Finset.univ, s i) = ∏ i : ι, ↑↑(κ a) (s i)
⊢ ↑↑(κ a) (⋂ i, s i) = ∏ i : ι, ↑↑(κ a) (s i)

Next tactic:
simp [← ha]
lemma iIndep.meas_iInter [Fintype ι] (h : iIndep m κ μ) (hs : ∀ i, MeasurableSet[m i] (s i)) :
    ∀ᵐ a ∂μ, κ a (⋂ i, s i) = ∏ i, κ a (s i) := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
β : ι → Type u_4
mβ : (i : ι) → MeasurableSpace (β i)
_mα : MeasurableSpace α
m : ι → MeasurableSpace Ω
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
π : ι → Set (Set Ω)
s : ι → Set Ω
S : Finset ι
f : (x : ι) → Ω → β x
inst✝ : Fintype ι
h : iIndep m κ
hs : ∀ (i : ι), MeasurableSet (s i)
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (⋂ i, s i) = ∏ i : ι, ↑↑(κ a) (s i)

Next tactic:
filter_upwards [h.meas_biInter (fun i (_ : i ∈ Finset.univ) ↦ hs _)] with a ha
lemma iIndep.meas_iInter [Fintype ι] (h : iIndep m κ μ) (hs : ∀ i, MeasurableSet[m i] (s i)) :
    ∀ᵐ a ∂μ, κ a (⋂ i, s i) = ∏ i, κ a (s i) := by
  filter_upwards [h.meas_biInter (fun i (_ : i ∈ Finset.univ) ↦ hs _)] with a ha
  

Proof state:
case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
β : ι → Type u_4
mβ : (i : ι) → MeasurableSpace (β i)
_mα : MeasurableSpace α
m : ι → MeasurableSpace Ω
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
π : ι → Set (Set Ω)
s : ι → Set Ω
S : Finset ι
f : (x : ι) → Ω → β x
inst✝ : Fintype ι
h : iIndep m κ
hs : ∀ (i : ι), MeasurableSet (s i)
a : α
ha : ↑↑(κ a) (⋂ i ∈ Finset.univ, s i) = ∏ i : ι, ↑↑(κ a) (s i)
⊢ ↑↑(κ a) (⋂ i, s i) = ∏ i : ι, ↑↑(κ a) (s i)

Next tactic:
simp [← ha]
@[symm]
theorem IndepSets.symm {_mΩ : MeasurableSpace Ω} {κ : kernel α Ω} {μ : Measure α}
    {s₁ s₂ : Set (Set Ω)} (h : IndepSets s₁ s₂ κ μ) :
    IndepSets s₂ s₁ κ μ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
s₁ s₂ : Set (Set Ω)
h : IndepSets s₁ s₂ κ
⊢ IndepSets s₂ s₁ κ

Next tactic:
intros t1 t2 ht1 ht2
@[symm]
theorem IndepSets.symm {_mΩ : MeasurableSpace Ω} {κ : kernel α Ω} {μ : Measure α}
    {s₁ s₂ : Set (Set Ω)} (h : IndepSets s₁ s₂ κ μ) :
    IndepSets s₂ s₁ κ μ := by
  intros t1 t2 ht1 ht2
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
s₁ s₂ : Set (Set Ω)
h : IndepSets s₁ s₂ κ
t1 t2 : Set Ω
ht1 : t1 ∈ s₂
ht2 : t2 ∈ s₁
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
filter_upwards [h t2 t1 ht2 ht1] with a ha
@[symm]
theorem IndepSets.symm {_mΩ : MeasurableSpace Ω} {κ : kernel α Ω} {μ : Measure α}
    {s₁ s₂ : Set (Set Ω)} (h : IndepSets s₁ s₂ κ μ) :
    IndepSets s₂ s₁ κ μ := by
  intros t1 t2 ht1 ht2
  filter_upwards [h t2 t1 ht2 ht1] with a ha
  

Proof state:
case h
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
s₁ s₂ : Set (Set Ω)
h : IndepSets s₁ s₂ κ
t1 t2 : Set Ω
ht1 : t1 ∈ s₂
ht2 : t2 ∈ s₁
a : α
ha : ↑↑(κ a) (t2 ∩ t1) = ↑↑(κ a) t2 * ↑↑(κ a) t1
⊢ ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
rwa [Set.inter_comm, mul_comm]
theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep m' ⊥ κ μ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m' _mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
⊢ Indep m' ⊥ κ

Next tactic:
intros s t _ ht
theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep m' ⊥ κ μ := by
  intros s t _ ht
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m' _mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s t : Set Ω
a✝ : s ∈ {s | MeasurableSet s}
ht : t ∈ {s | MeasurableSet s}
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (s ∩ t) = ↑↑(κ a) s * ↑↑(κ a) t

Next tactic:
rw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht
theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep m' ⊥ κ μ := by
  intros s t _ ht
  rw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m' _mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s t : Set Ω
a✝ : s ∈ {s | MeasurableSet s}
ht : t = ∅ ∨ t = Set.univ
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (s ∩ t) = ↑↑(κ a) s * ↑↑(κ a) t

Next tactic:
refine Filter.eventually_of_forall (fun a ↦ ?_)
theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep m' ⊥ κ μ := by
  intros s t _ ht
  rw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht
  refine Filter.eventually_of_forall (fun a ↦ ?_)
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m' _mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s t : Set Ω
a✝ : s ∈ {s | MeasurableSet s}
ht : t = ∅ ∨ t = Set.univ
a : α
⊢ ↑↑(κ a) (s ∩ t) = ↑↑(κ a) s * ↑↑(κ a) t

Next tactic:
cases' ht with ht ht
theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep m' ⊥ κ μ := by
  intros s t _ ht
  rw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht
  refine Filter.eventually_of_forall (fun a ↦ ?_)
  cases' ht with ht ht
  · 

Proof state:
case inl
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m' _mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s t : Set Ω
a✝ : s ∈ {s | MeasurableSet s}
a : α
ht : t = ∅
⊢ ↑↑(κ a) (s ∩ t) = ↑↑(κ a) s * ↑↑(κ a) t

Next tactic:
rw [ht, Set.inter_empty, measure_empty, mul_zero]
theorem indep_bot_right (m' : MeasurableSpace Ω) {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] :
    Indep m' ⊥ κ μ := by
  intros s t _ ht
  rw [Set.mem_setOf_eq, MeasurableSpace.measurableSet_bot_iff] at ht
  refine Filter.eventually_of_forall (fun a ↦ ?_)
  cases' ht with ht ht
  · rw [ht, Set.inter_empty, measure_empty, mul_zero]
  · 

Proof state:
case inr
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
m' _mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s t : Set Ω
a✝ : s ∈ {s | MeasurableSet s}
a : α
ht : t = Set.univ
⊢ ↑↑(κ a) (s ∩ t) = ↑↑(κ a) s * ↑↑(κ a) t

Next tactic:
rw [ht, Set.inter_univ, measure_univ, mul_one]
theorem indepSet_empty_right {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] (s : Set Ω) :
    IndepSet s ∅ κ μ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s : Set Ω
⊢ IndepSet s ∅ κ

Next tactic:
simp only [IndepSet, generateFrom_singleton_empty]
theorem indepSet_empty_right {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} [IsMarkovKernel κ] (s : Set Ω) :
    IndepSet s ∅ κ μ := by
  simp only [IndepSet, generateFrom_singleton_empty];
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
inst✝ : IsMarkovKernel κ
s : Set Ω
⊢ Indep (generateFrom {s}) ⊥ κ

Next tactic:
exact indep_bot_right _
theorem IndepSets.union {s₁ s₂ s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α}
    (h₁ : IndepSets s₁ s' κ μ) (h₂ : IndepSets s₂ s' κ μ) :
    IndepSets (s₁ ∪ s₂) s' κ μ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s₁ s₂ s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h₁ : IndepSets s₁ s' κ
h₂ : IndepSets s₂ s' κ
⊢ IndepSets (s₁ ∪ s₂) s' κ

Next tactic:
intro t1 t2 ht1 ht2
theorem IndepSets.union {s₁ s₂ s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α}
    (h₁ : IndepSets s₁ s' κ μ) (h₂ : IndepSets s₂ s' κ μ) :
    IndepSets (s₁ ∪ s₂) s' κ μ := by
  intro t1 t2 ht1 ht2
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s₁ s₂ s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h₁ : IndepSets s₁ s' κ
h₂ : IndepSets s₂ s' κ
t1 t2 : Set Ω
ht1 : t1 ∈ s₁ ∪ s₂
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
cases' (Set.mem_union _ _ _).mp ht1 with ht1₁ ht1₂
theorem IndepSets.union {s₁ s₂ s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α}
    (h₁ : IndepSets s₁ s' κ μ) (h₂ : IndepSets s₂ s' κ μ) :
    IndepSets (s₁ ∪ s₂) s' κ μ := by
  intro t1 t2 ht1 ht2
  cases' (Set.mem_union _ _ _).mp ht1 with ht1₁ ht1₂
  · 

Proof state:
case inl
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s₁ s₂ s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h₁ : IndepSets s₁ s' κ
h₂ : IndepSets s₂ s' κ
t1 t2 : Set Ω
ht1 : t1 ∈ s₁ ∪ s₂
ht2 : t2 ∈ s'
ht1₁ : t1 ∈ s₁
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
exact h₁ t1 t2 ht1₁ ht2
theorem IndepSets.union {s₁ s₂ s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α}
    (h₁ : IndepSets s₁ s' κ μ) (h₂ : IndepSets s₂ s' κ μ) :
    IndepSets (s₁ ∪ s₂) s' κ μ := by
  intro t1 t2 ht1 ht2
  cases' (Set.mem_union _ _ _).mp ht1 with ht1₁ ht1₂
  · exact h₁ t1 t2 ht1₁ ht2
  · 

Proof state:
case inr
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s₁ s₂ s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
h₁ : IndepSets s₁ s' κ
h₂ : IndepSets s₂ s' κ
t1 t2 : Set Ω
ht1 : t1 ∈ s₁ ∪ s₂
ht2 : t2 ∈ s'
ht1₂ : t1 ∈ s₂
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
exact h₂ t1 t2 ht1₂ ht2
theorem IndepSets.iUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} (hyp : ∀ n, IndepSets (s n) s' κ μ) :
    IndepSets (⋃ n, s n) s' κ μ := by
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
hyp : ∀ (n : ι), IndepSets (s n) s' κ
⊢ IndepSets (⋃ n, s n) s' κ

Next tactic:
intro t1 t2 ht1 ht2
theorem IndepSets.iUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} (hyp : ∀ n, IndepSets (s n) s' κ μ) :
    IndepSets (⋃ n, s n) s' κ μ := by
  intro t1 t2 ht1 ht2
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
hyp : ∀ (n : ι), IndepSets (s n) s' κ
t1 t2 : Set Ω
ht1 : t1 ∈ ⋃ n, s n
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
rw [Set.mem_iUnion] at ht1
theorem IndepSets.iUnion {s : ι → Set (Set Ω)} {s' : Set (Set Ω)} {_mΩ : MeasurableSpace Ω}
    {κ : kernel α Ω} {μ : Measure α} (hyp : ∀ n, IndepSets (s n) s' κ μ) :
    IndepSets (⋃ n, s n) s' κ μ := by
  intro t1 t2 ht1 ht2
  rw [Set.mem_iUnion] at ht1
  

Proof state:
α : Type u_1
Ω : Type u_2
ι : Type u_3
_mα : MeasurableSpace α
s : ι → Set (Set Ω)
s' : Set (Set Ω)
_mΩ : MeasurableSpace Ω
κ : ↥(kernel α Ω)
μ : Measure α
hyp : ∀ (n : ι), IndepSets (s n) s' κ
t1 t2 : Set Ω
ht1 : ∃ i, t1 ∈ s i
ht2 : t2 ∈ s'
⊢ ∀ᵐ (a : α) ∂μ, ↑↑(κ a) (t1 ∩ t2) = ↑↑(κ a) t1 * ↑↑(κ a) t2

Next tactic:
cases' ht1 with n ht1