l3lab/ntp-mathlib huggingface dataset:
theorem extend_iUnion_nat {f : ℕ → Set α} (hm : ∀ i, P (f i))
    (mU : m (⋃ i, f i) (PU hm) = ∑' i, m (f i) (hm i)) :
    extend m (⋃ i, f i) = ∑' i, extend m (f i) :=
  (extend_eq _ _).trans <|
    mU.trans <| by
      

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU✝ :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
f : ℕ → Set α
hm : ∀ (i : ℕ), P (f i)
mU : m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
⊢ ∑' (i : ℕ), m (f i) (_ : P (f i)) = ∑' (i : ℕ), extend m (f i)

Next tactic:
congr with i
theorem extend_iUnion_nat {f : ℕ → Set α} (hm : ∀ i, P (f i))
    (mU : m (⋃ i, f i) (PU hm) = ∑' i, m (f i) (hm i)) :
    extend m (⋃ i, f i) = ∑' i, extend m (f i) :=
  (extend_eq _ _).trans <|
    mU.trans <| by
      congr with i
      

Proof state:
case e_f.h
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU✝ :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
f : ℕ → Set α
hm : ∀ (i : ℕ), P (f i)
mU : m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
i : ℕ
⊢ m (f i) (_ : P (f i)) = extend m (f i)

Next tactic:
rw [extend_eq]
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
⊢ extend m (⋃ i, s i) ≤ ∑' (i : ℕ), extend m (s i)

Next tactic:
by_cases h : ∀ i, P (s i)
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  by_cases h : ∀ i, P (s i)
  · 

Proof state:
case pos
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
h : ∀ (i : ℕ), P (s i)
⊢ extend m (⋃ i, s i) ≤ ∑' (i : ℕ), extend m (s i)

Next tactic:
rw [extend_eq _ (PU h), congr_arg tsum _]
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  by_cases h : ∀ i, P (s i)
  · rw [extend_eq _ (PU h), congr_arg tsum _]
    · 

Proof state:
case pos
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
h : ∀ (i : ℕ), P (s i)
⊢ m (⋃ i, s i) (_ : P (⋃ i, s i)) ≤ tsum ?m.267562

Next tactic:
apply msU h
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  by_cases h : ∀ i, P (s i)
  · rw [extend_eq _ (PU h), congr_arg tsum _]
    · apply msU h
    

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
h : ∀ (i : ℕ), P (s i)
⊢ (fun i => extend m (s i)) = fun i => m (s i) (_ : P (s i))

Next tactic:
funext i
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  by_cases h : ∀ i, P (s i)
  · rw [extend_eq _ (PU h), congr_arg tsum _]
    · apply msU h
    funext i
    

Proof state:
case h
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
h : ∀ (i : ℕ), P (s i)
i : ℕ
⊢ extend m (s i) = m (s i) (_ : P (s i))

Next tactic:
apply extend_eq _ (h i)
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  by_cases h : ∀ i, P (s i)
  · rw [extend_eq _ (PU h), congr_arg tsum _]
    · apply msU h
    funext i
    apply extend_eq _ (h i)
  · 

Proof state:
case neg
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
h : ¬∀ (i : ℕ), P (s i)
⊢ extend m (⋃ i, s i) ≤ ∑' (i : ℕ), extend m (s i)

Next tactic:
cases' not_forall.1 h with i hi
theorem extend_iUnion_le_tsum_nat' (s : ℕ → Set α) :
    extend m (⋃ i, s i) ≤ ∑' i, extend m (s i) := by
  by_cases h : ∀ i, P (s i)
  · rw [extend_eq _ (PU h), congr_arg tsum _]
    · apply msU h
    funext i
    apply extend_eq _ (h i)
  · cases' not_forall.1 h with i hi
    

Proof state:
case neg.intro
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : ℕ → Set α
h : ¬∀ (i : ℕ), P (s i)
i : ℕ
hi : ¬P (s i)
⊢ extend m (⋃ i, s i) ≤ ∑' (i : ℕ), extend m (s i)

Next tactic:
exact le_trans (le_iInf fun h => hi.elim h) (ENNReal.le_tsum i)
theorem extend_mono' ⦃s₁ s₂ : Set α⦄ (h₁ : P s₁) (hs : s₁ ⊆ s₂) : extend m s₁ ≤ extend m s₂ := by
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
h₁ : P s₁
hs : s₁ ⊆ s₂
⊢ extend m s₁ ≤ extend m s₂

Next tactic:
refine' le_iInf _
theorem extend_mono' ⦃s₁ s₂ : Set α⦄ (h₁ : P s₁) (hs : s₁ ⊆ s₂) : extend m s₁ ≤ extend m s₂ := by
  refine' le_iInf _
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
h₁ : P s₁
hs : s₁ ⊆ s₂
⊢ ∀ (i : (fun s => P s) s₂), extend m s₁ ≤ m s₂ i

Next tactic:
intro h₂
theorem extend_mono' ⦃s₁ s₂ : Set α⦄ (h₁ : P s₁) (hs : s₁ ⊆ s₂) : extend m s₁ ≤ extend m s₂ := by
  refine' le_iInf _
  intro h₂
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
h₁ : P s₁
hs : s₁ ⊆ s₂
h₂ : (fun s => P s) s₂
⊢ extend m s₁ ≤ m s₂ h₂

Next tactic:
rw [extend_eq m h₁]
theorem extend_mono' ⦃s₁ s₂ : Set α⦄ (h₁ : P s₁) (hs : s₁ ⊆ s₂) : extend m s₁ ≤ extend m s₂ := by
  refine' le_iInf _
  intro h₂
  rw [extend_eq m h₁]
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
h₁ : P s₁
hs : s₁ ⊆ s₂
h₂ : (fun s => P s) s₂
⊢ m s₁ h₁ ≤ m s₂ h₂

Next tactic:
exact m_mono h₁ h₂ hs
theorem extend_iUnion {β} [Countable β] {f : β → Set α} (hd : Pairwise (Disjoint on f))
    (hm : ∀ i, P (f i)) : extend m (⋃ i, f i) = ∑' i, extend m (f i) := by
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
β : Type u_2
inst✝ : Countable β
f : β → Set α
hd : Pairwise (Disjoint on f)
hm : ∀ (i : β), P (f i)
⊢ extend m (⋃ i, f i) = ∑' (i : β), extend m (f i)

Next tactic:
cases nonempty_encodable β
theorem extend_iUnion {β} [Countable β] {f : β → Set α} (hd : Pairwise (Disjoint on f))
    (hm : ∀ i, P (f i)) : extend m (⋃ i, f i) = ∑' i, extend m (f i) := by
  cases nonempty_encodable β
  

Proof state:
case intro
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
β : Type u_2
inst✝ : Countable β
f : β → Set α
hd : Pairwise (Disjoint on f)
hm : ∀ (i : β), P (f i)
val✝ : Encodable β
⊢ extend m (⋃ i, f i) = ∑' (i : β), extend m (f i)

Next tactic:
rw [← Encodable.iUnion_decode₂, ← tsum_iUnion_decode₂]
theorem extend_iUnion {β} [Countable β] {f : β → Set α} (hd : Pairwise (Disjoint on f))
    (hm : ∀ i, P (f i)) : extend m (⋃ i, f i) = ∑' i, extend m (f i) := by
  cases nonempty_encodable β
  rw [← Encodable.iUnion_decode₂, ← tsum_iUnion_decode₂]
  · 

Proof state:
case intro
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
β : Type u_2
inst✝ : Countable β
f : β → Set α
hd : Pairwise (Disjoint on f)
hm : ∀ (i : β), P (f i)
val✝ : Encodable β
⊢ extend m (⋃ i, ⋃ b ∈ Encodable.decode₂ β i, f b) = ∑' (i : ℕ), extend m (⋃ b ∈ Encodable.decode₂ β i, f b)

Next tactic:
exact
      extend_iUnion_nat PU (fun n => Encodable.iUnion_decode₂_cases P0 hm)
        (mU _ (Encodable.iUnion_decode₂_disjoint_on hd))
theorem extend_iUnion {β} [Countable β] {f : β → Set α} (hd : Pairwise (Disjoint on f))
    (hm : ∀ i, P (f i)) : extend m (⋃ i, f i) = ∑' i, extend m (f i) := by
  cases nonempty_encodable β
  rw [← Encodable.iUnion_decode₂, ← tsum_iUnion_decode₂]
  · exact
      extend_iUnion_nat PU (fun n => Encodable.iUnion_decode₂_cases P0 hm)
        (mU _ (Encodable.iUnion_decode₂_disjoint_on hd))
  · 

Proof state:
case intro.m0
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
β : Type u_2
inst✝ : Countable β
f : β → Set α
hd : Pairwise (Disjoint on f)
hm : ∀ (i : β), P (f i)
val✝ : Encodable β
⊢ extend m ∅ = 0

Next tactic:
exact extend_empty P0 m0
theorem extend_union {s₁ s₂ : Set α} (hd : Disjoint s₁ s₂) (h₁ : P s₁) (h₂ : P s₂) :
    extend m (s₁ ∪ s₂) = extend m s₁ + extend m s₂ := by
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
hd : Disjoint s₁ s₂
h₁ : P s₁
h₂ : P s₂
⊢ extend m (s₁ ∪ s₂) = extend m s₁ + extend m s₂

Next tactic:
rw [union_eq_iUnion,
    extend_iUnion P0 m0 PU mU (pairwise_disjoint_on_bool.2 hd) (Bool.forall_bool.2 ⟨h₂, h₁⟩),
    tsum_fintype]
theorem extend_union {s₁ s₂ : Set α} (hd : Disjoint s₁ s₂) (h₁ : P s₁) (h₂ : P s₂) :
    extend m (s₁ ∪ s₂) = extend m s₁ + extend m s₂ := by
  rw [union_eq_iUnion,
    extend_iUnion P0 m0 PU mU (pairwise_disjoint_on_bool.2 hd) (Bool.forall_bool.2 ⟨h₂, h₁⟩),
    tsum_fintype]
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s₁ s₂ : Set α
hd : Disjoint s₁ s₂
h₁ : P s₁
h₂ : P s₂
⊢ ∑ b : Bool, extend m (bif b then s₁ else s₂) = extend m s₁ + extend m s₂

Next tactic:
simp
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  

Proof state:
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : Set α
⊢ ↑(inducedOuterMeasure m P0 m0) s = ⨅ t, ⨅ (ht : P t), ⨅ (_ : s ⊆ t), m t ht

Next tactic:
apply le_antisymm
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · 

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : Set α
⊢ ↑(inducedOuterMeasure m P0 m0) s ≤ ⨅ t, ⨅ (ht : P t), ⨅ (_ : s ⊆ t), m t ht

Next tactic:
simp only [le_iInf_iff]
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · simp only [le_iInf_iff]
    

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : Set α
⊢ ∀ (i : Set α) (i_1 : P i), s ⊆ i → ↑(inducedOuterMeasure m P0 m0) s ≤ m i i_1

Next tactic:
intro t ht hs
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · simp only [le_iInf_iff]
    intro t ht hs
    

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s t : Set α
ht : P t
hs : s ⊆ t
⊢ ↑(inducedOuterMeasure m P0 m0) s ≤ m t ht

Next tactic:
refine' le_trans (mono' _ hs) _
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · simp only [le_iInf_iff]
    intro t ht hs
    refine' le_trans (mono' _ hs) _
    

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s t : Set α
ht : P t
hs : s ⊆ t
⊢ ↑(inducedOuterMeasure m P0 m0) t ≤ m t ht

Next tactic:
exact le_of_eq (inducedOuterMeasure_eq' _ msU m_mono _)
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · simp only [le_iInf_iff]
    intro t ht hs
    refine' le_trans (mono' _ hs) _
    exact le_of_eq (inducedOuterMeasure_eq' _ msU m_mono _)
  · 

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : Set α
⊢ ⨅ t, ⨅ (ht : P t), ⨅ (_ : s ⊆ t), m t ht ≤ ↑(inducedOuterMeasure m P0 m0) s

Next tactic:
refine' le_iInf _
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · simp only [le_iInf_iff]
    intro t ht hs
    refine' le_trans (mono' _ hs) _
    exact le_of_eq (inducedOuterMeasure_eq' _ msU m_mono _)
  · refine' le_iInf _
    

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : Set α
⊢ ∀ (i : ℕ → Set α), ⨅ t, ⨅ (ht : P t), ⨅ (_ : s ⊆ t), m t ht ≤ ⨅ (_ : s ⊆ ⋃ i_1, i i_1), ∑' (i_1 : ℕ), extend m (i i_1)

Next tactic:
intro f
theorem inducedOuterMeasure_eq_iInf (s : Set α) :
    inducedOuterMeasure m P0 m0 s = ⨅ (t : Set α) (ht : P t) (_ : s ⊆ t), m t ht := by
  apply le_antisymm
  · simp only [le_iInf_iff]
    intro t ht hs
    refine' le_trans (mono' _ hs) _
    exact le_of_eq (inducedOuterMeasure_eq' _ msU m_mono _)
  · refine' le_iInf _
    intro f
    

Proof state:
case a
α : Type u_1
P : Set α → Prop
m : (s : Set α) → P s → ℝ≥0∞
P0 : P ∅
m0 : m ∅ P0 = 0
PU : ∀ ⦃f : ℕ → Set α⦄, (∀ (i : ℕ), P (f i)) → P (⋃ i, f i)
mU :
  ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)),
    Pairwise (Disjoint on f) → m (⋃ i, f i) (_ : P (⋃ i, f i)) = ∑' (i : ℕ), m (f i) (_ : P (f i))
msU : ∀ ⦃f : ℕ → Set α⦄ (hm : ∀ (i : ℕ), P (f i)), m (⋃ i, f i) (_ : P (⋃ i, f i)) ≤ ∑' (i : ℕ), m (f i) (_ : P (f i))
m_mono : ∀ ⦃s₁ s₂ : Set α⦄ (hs₁ : P s₁) (hs₂ : P s₂), s₁ ⊆ s₂ → m s₁ hs₁ ≤ m s₂ hs₂
s : Set α
f : ℕ → Set α
⊢ ⨅ t, ⨅ (ht : P t), ⨅ (_ : s ⊆ t), m t ht ≤ ⨅ (_ : s ⊆ ⋃ i, f i), ∑' (i : ℕ), extend m (f i)

Next tactic:
refine' le_iInf _