-- Mathlib/MeasureTheory/Decomposition/SignedHahn.lean
theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂ : s i < 0)
    (hn : ¬∀ n : ℕ, ¬s ≤[i \ ⋃ l < n, restrictNonposSeq s i l] 0) :
    ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0

Proof state:
case h.e'_4.h.e'_7.h
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h✝ : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
h₁ : ∀ l < k, 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
l : ℕ
h : ¬l < k
x✝ : α
⊢ l < k → x✝ ∉ MeasureTheory.SignedMeasure.restrictNonposSeq s i l

Tactic:
exact fun h' => False.elim (h h')

Result:
no goals

Proof state:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ ↑s j < 0

Tactic:
set k := Nat.find hn

Result:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ ↑s j < 0

Proof state:
case neg.h
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
a : ℕ
x : α
⊢ a < k → x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i a → x ∈ i

Tactic:
intro _ hx

Result:
case neg.h
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
a : ℕ
x : α
a✝ : a < k
hx : x ∈ MeasureTheory.SignedMeasure.restrictNonposSeq s i a
⊢ x ∈ i

Proof state:
case pos
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
hn : ¬∀ (n : ℕ), ¬s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
h : s ≤[i] 0
⊢ ∃ j, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ ↑s j < 0

Tactic:
exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩

Result:
no goals

Proof state:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
⊢ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l ⊆ i

Tactic:
apply Set.iUnion_subset

Result:
case neg.h
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
⊢ ∀ (i_1 : ℕ), ⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1 ⊆ i

Proof state:
case neg.h
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
⊢ ∀ (i_1 : ℕ), ⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1 ⊆ i

Tactic:
intro a x

Result:
case neg.h
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
a : ℕ
x : α
⊢ x ∈ ⋃ (_ : a < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i a → x ∈ i

Proof state:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
h₁ : ∀ l < k, 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
⊢ 0 ≤ ∑' (l : ℕ), ↑s (⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)

Tactic:
refine tsum_nonneg ?_

Result:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
h₁ : ∀ l < k, 0 ≤ ↑s (MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
⊢ ∀ (i_1 : ℕ), 0 ≤ ↑s (⋃ (_ : i_1 < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i i_1)

Proof state:
case neg.hd
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
⊢ Pairwise (Function.onFun Disjoint fun l => ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)

Tactic:
intro a b hab

Result:
case neg.hd
α : Type u_1
inst✝ : MeasurableSpace α
s : SignedMeasure α
i : Set α
hi₁ : MeasurableSet i
hi₂ : ↑s i < 0
h : ¬s ≤[i] 0
hn : ∃ n, s ≤[i \ ⋃ l, ⋃ (_ : l < n), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
k : ℕ := Nat.find hn
hk₂ : s ≤[i \ ⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l] 0
hmeas : MeasurableSet (⋃ l, ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l)
a b : ℕ
hab : a ≠ b
⊢ Function.onFun Disjoint (fun l => ⋃ (_ : l < k), MeasureTheory.SignedMeasure.restrictNonposSeq s i l) a b