l3lab/ntp-mathlib huggingface dataset:
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  

Proof state:
case mk.intro
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
i : ℕ
x : α
hx : x ∈ s i
this : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
⊢ x ∈ s n ∪ ⋃ i, s (i + n + 1) \ s (i + n)

Next tactic:
clear hx i
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  

Proof state:
case mk.intro
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
⊢ x ∈ s n ∪ ⋃ i, s (i + n + 1) \ s (i + n)

Next tactic:
rcases le_or_lt j n with hjn | hnj
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  rcases le_or_lt j n with hjn | hnj
  · 

Proof state:
case mk.intro.inl
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
hjn : j ≤ n
⊢ x ∈ s n ∪ ⋃ i, s (i + n + 1) \ s (i + n)

Next tactic:
exact Or.inl (h' hjn hj)
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  rcases le_or_lt j n with hjn | hnj
  · exact Or.inl (h' hjn hj)
  

Proof state:
case mk.intro.inr
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
hnj : n < j
⊢ x ∈ s n ∪ ⋃ i, s (i + n + 1) \ s (i + n)

Next tactic:
have : j - (n + 1) + n + 1 = j := by rw [add_assoc, tsub_add_cancel_of_le hnj.nat_succ_le]
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  rcases le_or_lt j n with hjn | hnj
  · exact Or.inl (h' hjn hj)
  have : j - (n + 1) + n + 1 = j := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
hnj : n < j
⊢ j - (n + 1) + n + 1 = j

Next tactic:
rw [add_assoc, tsub_add_cancel_of_le hnj.nat_succ_le]
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  rcases le_or_lt j n with hjn | hnj
  · exact Or.inl (h' hjn hj)
  have : j - (n + 1) + n + 1 = j := by rw [add_assoc, tsub_add_cancel_of_le hnj.nat_succ_le]
  

Proof state:
case mk.intro.inr
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this✝ : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
hnj : n < j
this : j - (n + 1) + n + 1 = j
⊢ x ∈ s n ∪ ⋃ i, s (i + n + 1) \ s (i + n)

Next tactic:
refine' Or.inr (mem_iUnion.2 ⟨j - (n + 1), _, hlt _ _⟩)
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  rcases le_or_lt j n with hjn | hnj
  · exact Or.inl (h' hjn hj)
  have : j - (n + 1) + n + 1 = j := by rw [add_assoc, tsub_add_cancel_of_le hnj.nat_succ_le]
  refine' Or.inr (mem_iUnion.2 ⟨j - (n + 1), _, hlt _ _⟩)
  · 

Proof state:
case mk.intro.inr.refine'_1
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this✝ : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
hnj : n < j
this : j - (n + 1) + n + 1 = j
⊢ x ∈ s (j - (n + 1) + n + 1)

Next tactic:
rwa [this]
/-- If `s : ℕ → Set α` is a monotone sequence of sets such that `∑' k, m (s (k + 1) \ s k) ≠ ∞`,
then `m (⋃ n, s n) = ⨆ n, m (s n)`. -/
theorem iUnion_nat_of_monotone_of_tsum_ne_top (m : OuterMeasure α) {s : ℕ → Set α}
    (h_mono : ∀ n, s n ⊆ s (n + 1)) (h0 : (∑' k, m (s (k + 1) \ s k)) ≠ ∞)
    [∀ i:ℕ, DecidablePred (· ∈ s i)] : m (⋃ n, s n) = ⨆ n, m (s n) := by
  refine' m.iUnion_of_tendsto_zero atTop _
  refine' tendsto_nhds_bot_mono' (ENNReal.tendsto_sum_nat_add _ h0) fun n => _
  refine' (m.mono _).trans (m.iUnion _)
  -- Current goal: `(⋃ k, s k) \ s n ⊆ ⋃ k, s (k + n + 1) \ s (k + n)`
  have h' : Monotone s := @monotone_nat_of_le_succ (Set α) _ _ h_mono
  simp only [diff_subset_iff, iUnion_subset_iff]
  intro i x hx
  have : ∃i, x ∈ s i := by exists i
  rcases Nat.findX this with ⟨j, hj, hlt⟩
  clear hx i
  rcases le_or_lt j n with hjn | hnj
  · exact Or.inl (h' hjn hj)
  have : j - (n + 1) + n + 1 = j := by rw [add_assoc, tsub_add_cancel_of_le hnj.nat_succ_le]
  refine' Or.inr (mem_iUnion.2 ⟨j - (n + 1), _, hlt _ _⟩)
  · rwa [this]
  · 

Proof state:
case mk.intro.inr.refine'_2
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s : ℕ → Set α
h_mono : ∀ (n : ℕ), s n ⊆ s (n + 1)
h0 : ∑' (k : ℕ), ↑m (s (k + 1) \ s k) ≠ ⊤
inst✝ : (i : ℕ) → DecidablePred fun x => x ∈ s i
n : ℕ
h' : Monotone s
x : α
this✝ : ∃ i, x ∈ s i
j : ℕ
hj : x ∈ s j
hlt : ∀ m < j, x ∉ s m
hnj : n < j
this : j - (n + 1) + n + 1 = j
⊢ j - (n + 1) + n < j

Next tactic:
rw [← Nat.succ_le_iff, Nat.succ_eq_add_one, this]
theorem le_inter_add_diff {m : OuterMeasure α} {t : Set α} (s : Set α) :
    m t ≤ m (t ∩ s) + m (t \ s) := by
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
t s : Set α
⊢ ↑m t ≤ ↑m (t ∩ s) + ↑m (t \ s)

Next tactic:
convert m.union _ _
theorem le_inter_add_diff {m : OuterMeasure α} {t : Set α} (s : Set α) :
    m t ≤ m (t ∩ s) + m (t \ s) := by
  convert m.union _ _
  

Proof state:
case h.e'_3.h.e'_3
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
t s : Set α
⊢ t = t ∩ s ∪ t \ s

Next tactic:
rw [inter_union_diff t s]
theorem diff_null (m : OuterMeasure α) (s : Set α) {t : Set α} (ht : m t = 0) :
    m (s \ t) = m s := by
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s t : Set α
ht : ↑m t = 0
⊢ ↑m (s \ t) = ↑m s

Next tactic:
refine' le_antisymm (m.mono <| diff_subset _ _) _
theorem diff_null (m : OuterMeasure α) (s : Set α) {t : Set α} (ht : m t = 0) :
    m (s \ t) = m s := by
  refine' le_antisymm (m.mono <| diff_subset _ _) _
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s t : Set α
ht : ↑m t = 0
⊢ ↑m s ≤ ↑m (s \ t)

Next tactic:
calc
    m s ≤ m (s ∩ t) + m (s \ t) := le_inter_add_diff _
    _ ≤ m t + m (s \ t) := (add_le_add_right (m.mono <| inter_subset_right _ _) _)
    _ = m (s \ t) := by rw [ht, zero_add]
theorem diff_null (m : OuterMeasure α) (s : Set α) {t : Set α} (ht : m t = 0) :
    m (s \ t) = m s := by
  refine' le_antisymm (m.mono <| diff_subset _ _) _
  calc
    m s ≤ m (s ∩ t) + m (s \ t) := le_inter_add_diff _
    _ ≤ m t + m (s \ t) := (add_le_add_right (m.mono <| inter_subset_right _ _) _)
    _ = m (s \ t) := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s t : Set α
ht : ↑m t = 0
⊢ ↑m t + ↑m (s \ t) = ↑m (s \ t)

Next tactic:
rw [ht, zero_add]
theorem union_null (m : OuterMeasure α) {s₁ s₂ : Set α} (h₁ : m s₁ = 0) (h₂ : m s₂ = 0) :
    m (s₁ ∪ s₂) = 0 := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ m : OuterMeasure α
s₁ s₂ : Set α
h₁ : ↑m s₁ = 0
h₂ : ↑m s₂ = 0
⊢ ↑m (s₁ ∪ s₂) = 0

Next tactic:
simpa [h₁, h₂] using m.union s₁ s₂
theorem coe_fn_injective : Injective fun (μ : OuterMeasure α) (s : Set α) => μ s :=
  fun μ₁ μ₂ h => by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m μ₁ μ₂ : OuterMeasure α
h : (fun μ s => ↑μ s) μ₁ = (fun μ s => ↑μ s) μ₂
⊢ μ₁ = μ₂

Next tactic:
cases μ₁
theorem coe_fn_injective : Injective fun (μ : OuterMeasure α) (s : Set α) => μ s :=
  fun μ₁ μ₂ h => by cases μ₁; 

Proof state:
case mk
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m μ₂ : OuterMeasure α
measureOf✝ : Set α → ℝ≥0∞
empty✝ : measureOf✝ ∅ = 0
mono✝ : ∀ {s₁ s₂ : Set α}, s₁ ⊆ s₂ → measureOf✝ s₁ ≤ measureOf✝ s₂
iUnion_nat✝ : ∀ (s : ℕ → Set α), measureOf✝ (⋃ i, s i) ≤ ∑' (i : ℕ), measureOf✝ (s i)
h :
  (fun μ s => ↑μ s) { measureOf := measureOf✝, empty := empty✝, mono := mono✝, iUnion_nat := iUnion_nat✝ } =
    (fun μ s => ↑μ s) μ₂
⊢ { measureOf := measureOf✝, empty := empty✝, mono := mono✝, iUnion_nat := iUnion_nat✝ } = μ₂

Next tactic:
cases μ₂
theorem coe_fn_injective : Injective fun (μ : OuterMeasure α) (s : Set α) => μ s :=
  fun μ₁ μ₂ h => by cases μ₁; cases μ₂; 

Proof state:
case mk.mk
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m : OuterMeasure α
measureOf✝¹ : Set α → ℝ≥0∞
empty✝¹ : measureOf✝¹ ∅ = 0
mono✝¹ : ∀ {s₁ s₂ : Set α}, s₁ ⊆ s₂ → measureOf✝¹ s₁ ≤ measureOf✝¹ s₂
iUnion_nat✝¹ : ∀ (s : ℕ → Set α), measureOf✝¹ (⋃ i, s i) ≤ ∑' (i : ℕ), measureOf✝¹ (s i)
measureOf✝ : Set α → ℝ≥0∞
empty✝ : measureOf✝ ∅ = 0
mono✝ : ∀ {s₁ s₂ : Set α}, s₁ ⊆ s₂ → measureOf✝ s₁ ≤ measureOf✝ s₂
iUnion_nat✝ : ∀ (s : ℕ → Set α), measureOf✝ (⋃ i, s i) ≤ ∑' (i : ℕ), measureOf✝ (s i)
h :
  (fun μ s => ↑μ s) { measureOf := measureOf✝¹, empty := empty✝¹, mono := mono✝¹, iUnion_nat := iUnion_nat✝¹ } =
    (fun μ s => ↑μ s) { measureOf := measureOf✝, empty := empty✝, mono := mono✝, iUnion_nat := iUnion_nat✝ }
⊢ { measureOf := measureOf✝¹, empty := empty✝¹, mono := mono✝¹, iUnion_nat := iUnion_nat✝¹ } =
    { measureOf := measureOf✝, empty := empty✝, mono := mono✝, iUnion_nat := iUnion_nat✝ }

Next tactic:
congr
/-- A version of `MeasureTheory.OuterMeasure.ext` that assumes `μ₁ s = μ₂ s` on all *nonempty*
sets `s`, and gets `μ₁ ∅ = μ₂ ∅` from `MeasureTheory.OuterMeasure.empty'`. -/
theorem ext_nonempty {μ₁ μ₂ : OuterMeasure α} (h : ∀ s : Set α, s.Nonempty → μ₁ s = μ₂ s) :
    μ₁ = μ₂ :=
  ext fun s => s.eq_empty_or_nonempty.elim (fun he => by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m μ₁ μ₂ : OuterMeasure α
h : ∀ (s : Set α), Set.Nonempty s → ↑μ₁ s = ↑μ₂ s
s : Set α
he : s = ∅
⊢ ↑μ₁ s = ↑μ₂ s

Next tactic:
rw [he, empty', empty']
instance instZero : Zero (OuterMeasure α) :=
  ⟨{  measureOf := fun _ => 0
      empty := rfl
      mono := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m : OuterMeasure α
⊢ ∀ {s₁ s₂ : Set α}, s₁ ⊆ s₂ → (fun x => 0) s₁ ≤ (fun x => 0) s₂

Next tactic:
intro _ _ _
instance instZero : Zero (OuterMeasure α) :=
  ⟨{  measureOf := fun _ => 0
      empty := rfl
      mono := by intro _ _ _; 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m : OuterMeasure α
s₁✝ s₂✝ : Set α
a✝ : s₁✝ ⊆ s₂✝
⊢ (fun x => 0) s₁✝ ≤ (fun x => 0) s₂✝

Next tactic:
exact le_refl 0
instance instAdd : Add (OuterMeasure α) :=
  ⟨fun m₁ m₂ =>
    { measureOf := fun s => m₁ s + m₂ s
      empty := show m₁ ∅ + m₂ ∅ = 0 by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m m₁ m₂ : OuterMeasure α
⊢ ↑m₁ ∅ + ↑m₂ ∅ = 0

Next tactic:
simp [OuterMeasure.empty]
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
⊢ (fun s => c • ↑m s) ∅ = 0

Next tactic:
simp
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
⊢ c • 0 = 0

Next tactic:
rw [← smul_one_mul c]
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; rw [← smul_one_mul c]; 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
⊢ c • 1 * 0 = 0

Next tactic:
simp
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; rw [← smul_one_mul c]; simp
      mono := fun {s t} h => by
        

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
s t : Set α
h : s ⊆ t
⊢ (fun s => c • ↑m s) s ≤ (fun s => c • ↑m s) t

Next tactic:
simp only
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; rw [← smul_one_mul c]; simp
      mono := fun {s t} h => by
        simp only
        

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
s t : Set α
h : s ⊆ t
⊢ c • ↑m s ≤ c • ↑m t

Next tactic:
rw [← smul_one_mul c, ← smul_one_mul c (m t)]
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; rw [← smul_one_mul c]; simp
      mono := fun {s t} h => by
        simp only
        rw [← smul_one_mul c, ← smul_one_mul c (m t)]
        

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
s t : Set α
h : s ⊆ t
⊢ c • 1 * ↑m s ≤ c • 1 * ↑m t

Next tactic:
exact ENNReal.mul_left_mono (m.mono h)
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; rw [← smul_one_mul c]; simp
      mono := fun {s t} h => by
        simp only
        rw [← smul_one_mul c, ← smul_one_mul c (m t)]
        exact ENNReal.mul_left_mono (m.mono h)
      iUnion_nat := fun s => by
        

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
s : ℕ → Set α
⊢ (fun s => c • ↑m s) (⋃ i, s i) ≤ ∑' (i : ℕ), (fun s => c • ↑m s) (s i)

Next tactic:
simp_rw [← smul_one_mul c (m _), ENNReal.tsum_mul_left]
instance instSMul : SMul R (OuterMeasure α) :=
  ⟨fun c m =>
    { measureOf := fun s => c • m s
      empty := by simp; rw [← smul_one_mul c]; simp
      mono := fun {s t} h => by
        simp only
        rw [← smul_one_mul c, ← smul_one_mul c (m t)]
        exact ENNReal.mul_left_mono (m.mono h)
      iUnion_nat := fun s => by
        simp_rw [← smul_one_mul c (m _), ENNReal.tsum_mul_left]
        

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝¹ : SMul R' ℝ≥0∞
inst✝ : IsScalarTower R' ℝ≥0∞ ℝ≥0∞
c : R
m : OuterMeasure α
s : ℕ → Set α
⊢ c • 1 * ↑m (⋃ i, s i) ≤ c • 1 * ∑' (i : ℕ), ↑m (s i)

Next tactic:
exact ENNReal.mul_left_mono (m.iUnion_nat _)
instance OuterMeasure.orderBot : OrderBot (OuterMeasure α) :=
  { bot := 0,
    bot_le := fun a s => by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m a : OuterMeasure α
s : Set α
⊢ ↑⊥ s ≤ ↑a s

Next tactic:
simp only [coe_zero, Pi.zero_apply, coe_bot, zero_le]
instance instSupSet : SupSet (OuterMeasure α) :=
  ⟨fun ms =>
    { measureOf := fun s => ⨆ m ∈ ms, (m : OuterMeasure α) s
      empty := nonpos_iff_eq_zero.1 <| iSup₂_le fun m _ => le_of_eq m.empty
      mono := fun {s₁ s₂} hs => iSup₂_mono fun m _ => m.mono hs
      iUnion_nat := fun f =>
        iSup₂_le fun m hm =>
          calc
            m (⋃ i, f i) ≤ ∑' i : ℕ, m (f i) := m.iUnion_nat _
            _ ≤ ∑' i, ⨆ m ∈ ms, (m : OuterMeasure α) (f i) :=
               ENNReal.tsum_le_tsum fun i => by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms✝ : Set (OuterMeasure α)
m✝ : OuterMeasure α
ms : Set (OuterMeasure α)
f : ℕ → Set α
m : OuterMeasure α
hm : m ∈ ms
i : ℕ
⊢ ↑m (f i) ≤ ⨆ m ∈ ms, ↑m (f i)

Next tactic:
apply le_iSup₂ m hm
instance instCompleteLattice : CompleteLattice (OuterMeasure α) :=
  { OuterMeasure.orderBot,
    completeLatticeOfSup (OuterMeasure α) fun ms =>
      ⟨fun m hm s => by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms✝ : Set (OuterMeasure α)
m✝ : OuterMeasure α
src✝ : OrderBot (OuterMeasure α) := OuterMeasure.orderBot
ms : Set (OuterMeasure α)
m : OuterMeasure α
hm : m ∈ ms
s : Set α
⊢ ↑m s ≤ ↑(sSup ms) s

Next tactic:
apply le_iSup₂ m hm
@[simp]
theorem iSup_apply {ι} (f : ι → OuterMeasure α) (s : Set α) : (⨆ i : ι, f i) s = ⨆ i, f i s := by
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m : OuterMeasure α
ι : Sort u_5
f : ι → OuterMeasure α
s : Set α
⊢ ↑(⨆ i, f i) s = ⨆ i, ↑(f i) s

Next tactic:
rw [iSup, sSup_apply, iSup_range, iSup]
@[norm_cast]
theorem coe_iSup {ι} (f : ι → OuterMeasure α) : ⇑(⨆ i, f i) = ⨆ i, ⇑(f i) :=
  funext fun s => by 

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m : OuterMeasure α
ι : Sort u_5
f : ι → OuterMeasure α
s : Set α
⊢ ↑(⨆ i, f i) s = iSup (fun i => ↑(f i)) s

Next tactic:
simp
@[simp]
theorem sup_apply (m₁ m₂ : OuterMeasure α) (s : Set α) : (m₁ ⊔ m₂) s = m₁ s ⊔ m₂ s := by
  

Proof state:
α : Type u_1
β : Type u_2
R : Type u_3
R' : Type u_4
ms : Set (OuterMeasure α)
m m₁ m₂ : OuterMeasure α
s : Set α
⊢ ↑(m₁ ⊔ m₂) s = ↑m₁ s ⊔ ↑m₂ s

Next tactic:
have := iSup_apply (fun b => cond b m₁ m₂) s