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

tactic: cases nonempty_encodable β
state_before: α : Type u_2
β : Type u_1
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))

tactic: set g := fun i : ℕ => ⋃ (b : β) (H : b ∈ Encodable.decode₂ β i), f b with hg
state_before: case intro
α : Type u_2
β : Type u_1
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: have hg₁ : ∀ i, MeasurableSet (g i) :=
  fun _ => MeasurableSet.iUnion fun b => MeasurableSet.iUnion fun _ => hf₁ b
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b
⊢ 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_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg₁ : ∀ (i : ℕ), MeasurableSet (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_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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: rw [hg, Encodable.iUnion_decode₂] at this
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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: rw [Summable.hasSum_iff, this, ← tsum_iUnion_decode₂]
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : 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))

tactic: ext x
state_before: α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
⊢ (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))

tactic: rw [hg]
state_before: case h
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
⊢ ↑v (f x) = ↑v (g (Encodable.encode x))

tactic: simp only
state_before: case h
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
⊢ ↑v (f x) = ↑v ((fun i => ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β i), f b) (Encodable.encode x))

tactic: congr
state_before: case h
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
⊢ ↑v (f x) = ↑v (⋃ (b : β) (_ : b ∈ Encodable.decode₂ β (Encodable.encode x)), f b)

tactic: ext y
state_before: case h.e_a
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
⊢ f x = ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β (Encodable.encode x)), f b

tactic: simp only [exists_prop, Set.mem_iUnion, Option.mem_def]
state_before: case h.e_a.h
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
⊢ y ∈ f x ↔ y ∈ ⋃ (b : β) (_ : b ∈ Encodable.decode₂ β (Encodable.encode x)), f b

tactic: constructor
state_before: case h.e_a.h
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
⊢ y ∈ f x ↔ ∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i

tactic: intro hy
state_before: case h.e_a.h.mp
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
⊢ y ∈ f x → ∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i

tactic: refine' ⟨x, (Encodable.decode₂_is_partial_inv _ _).2 rfl, hy⟩
state_before: case h.e_a.h.mp
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
hy : y ∈ f x
⊢ ∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i

tactic: rintro ⟨b, hb₁, hb₂⟩
state_before: case h.e_a.h.mpr
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
⊢ (∃ i, Encodable.decode₂ β (Encodable.encode x) = Option.some i ∧ y ∈ f i) → y ∈ f x

tactic: rw [Encodable.decode₂_is_partial_inv _ _] at hb₁
state_before: case h.e_a.h.mpr.intro.intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
b : β
hb₁ : Encodable.decode₂ β (Encodable.encode x) = Option.some b
hb₂ : y ∈ f b
⊢ y ∈ f x

tactic: rwa [← Encodable.encode_injective hb₁]
state_before: case h.e_a.h.mpr.intro.intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
x : β
y : α
b : β
hb₁ : Encodable.encode b = Encodable.encode x
hb₂ : y ∈ f b
⊢ y ∈ f x

tactic: exact v.empty
state_before: case intro.m0
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ ↑v ∅ = 0

tactic: rw [hg₃]
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : 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: change Summable ((fun i => v (g i)) ∘ Encodable.encode)
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ Summable fun i => ↑v (g (Encodable.encode i))

tactic: rw [Function.Injective.summable_iff Encodable.encode_injective]
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ Summable ((fun i => ↑v (g i)) ∘ Encodable.encode)

tactic: exact (v.m_iUnion hg₁ hg₂).summable
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ Summable fun i => ↑v (g i)

tactic: intro x hx
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
⊢ ∀ (x : ℕ), ¬x ∈ Set.range Encodable.encode → ↑v (g x) = 0

tactic: convert v.empty
state_before: case intro
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
x : ℕ
hx : ¬x ∈ Set.range Encodable.encode
⊢ ↑v (g x) = 0

tactic: simp only [Set.iUnion_eq_empty, Option.mem_def, not_exists, Set.mem_range] at hx⊢
state_before: case h.e'_2.h.e'_7
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
x : ℕ
hx : ¬x ∈ Set.range Encodable.encode
⊢ g x = ∅

tactic: intro i hi
state_before: case h.e'_2.h.e'_7
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
x : ℕ
hx : ∀ (x_1 : β), ¬Encodable.encode x_1 = x
⊢ ∀ (i : β), Encodable.decode₂ β x = Option.some i → f i = ∅

tactic: exact False.elim ((hx i) ((Encodable.decode₂_is_partial_inv _ _).1 hi))
state_before: case h.e'_2.h.e'_7
α : Type u_2
β : Type u_1
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 : β) (_ : b ∈ Encodable.decode₂ β i), f b
hg : g = fun i => ⋃ (b : β) (_ : 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 : β) (_ : b ∈ Encodable.decode₂ β i), f b) i)
hg₃ : (fun i => ↑v (f i)) = fun i => ↑v (g (Encodable.encode i))
x : ℕ
hx : ∀ (x_1 : β), ¬Encodable.encode x_1 = x
i : β
hi : Encodable.decode₂ β x = Option.some i
⊢ f i = ∅