Theorem: MeasureTheory.VectorMeasure.hasSum_of_disjoint_iUnion
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
tactic: cases nonempty_encodable β
state_before: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
tactic: set g := fun i : ℕ => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b with hg
state_before: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
tactic: have hg₁ : ∀ i, MeasurableSet (g i) :=
    fun _ => MeasurableSet.iUnion fun b => MeasurableSet.iUnion fun _ => hf₁ b
state_before: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
tactic: have hg₂ : Pairwise (Disjoint on g) := Encodable.iUnion_decode₂_disjoint_on hf₂
state_before: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
this : ↑v (⋃ i, g i) = ∑' (i : ℕ), ↑v (g i)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
tactic: have := v.of_disjoint_iUnion_nat hg₁ hg₂
state_before: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
this : ↑v (⋃ i, g i) = ∑' (i : ℕ), ↑v (g i)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
this : ↑v (⋃ b, f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ b ∈ Encodable.decode₂ β i, f b) i)
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
tactic: rw [hg, Encodable.iUnion_decode₂] at this
state_before: case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
this : ↑v (⋃ b, f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ b ∈ Encodable.decode₂ β i, f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ HasSum (fun i => ↑v (f i)) (↑v (⋃ i, f i))
state_after: case intro.m0
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
this : ↑v (⋃ b, f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ b ∈ Encodable.decode₂ β i, f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ ↑v ∅ = 0

case intro
α : Type u_1
β : Type u_2
m : MeasurableSpace α
M : Type u_3
inst✝³ : AddCommMonoid M
inst✝² : TopologicalSpace M
inst✝¹ : T2Space M
v : VectorMeasure α M
f✝ : ℕ → Set α
inst✝ : Countable β
f : β → Set α
hf₁ : ∀ (i : β), MeasurableSet (f i)
hf₂ : Pairwise (Disjoint on f)
val✝ : Encodable β
g : ℕ → Set α := fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg : g = fun i => ⋃ b ∈ Encodable.decode₂ β i, f b
hg₁ : ∀ (i : ℕ), MeasurableSet (g i)
hg₂ : Pairwise (Disjoint on g)
this : ↑v (⋃ b, f b) = ∑' (i : ℕ), ↑v ((fun i => ⋃ b ∈ Encodable.decode₂ β i, f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ Summable fun i => ↑v (f i)
tactic: rw [Summable.hasSum_iff, this, ← tsum_iUnion_decode₂]