Theorem: MeasureTheory.tendsto_set_integral_of_monotone
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: have hfi' : (∫⁻ x in ⋃ n, s n, ‖f x‖₊ ∂μ) < ∞ := hfi.2
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
hfi : IntegrableOn f (⋃ (n : ι), s n)
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋃ (n : ι), s n, f a ∂μ))

tactic: set S := ⋃ i, s i
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
hfi : IntegrableOn f (⋃ (n : ι), s n)
hfi' : (∫⁻ (x : α) in ⋃ (n : ι), s n, ↑‖f x‖₊ ∂μ) < ⊤
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in ⋃ (n : ι), s n, f a ∂μ))

tactic: have hSm : MeasurableSet S := MeasurableSet.iUnion hsm
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hfi' : (∫⁻ (x : α) in S, ↑‖f x‖₊ ∂μ) < ⊤
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))

tactic: have hsub : ∀ {i}, s i ⊆ S := @(subset_iUnion s)
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hfi' : (∫⁻ (x : α) in S, ↑‖f x‖₊ ∂μ) < ⊤
hSm : MeasurableSet S
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))

tactic: rw [← withDensity_apply _ hSm] at hfi'
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hfi' : (∫⁻ (x : α) in S, ↑‖f x‖₊ ∂μ) < ⊤
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))

tactic: set ν := μ.withDensity fun x => ‖f x‖₊ with hν
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hfi' : ↑↑(Measure.withDensity μ fun x => ↑‖f x‖₊) S < ⊤
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))

tactic: refine' Metric.nhds_basis_closedBall.tendsto_right_iff.2 fun ε ε0 => _
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
⊢ Tendsto (fun i => ∫ (a : α) in s i, f a ∂μ) atTop (𝓝 (∫ (a : α) in S, f a ∂μ))

tactic: lift ε to ℝ≥0 using ε0.le
state_before: α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ
ε0 : 0 < ε
⊢ ∀ᶠ (x : ι) in atTop, (∫ (a : α) in s x, f a ∂μ) ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ε

tactic: have : ∀ᶠ i in atTop, ν (s i) ∈ Icc (ν S - ε) (ν S + ε) :=
  tendsto_measure_iUnion h_mono (ENNReal.Icc_mem_nhds hfi'.ne (ENNReal.coe_pos.2 ε0).ne')
state_before: case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
⊢ ∀ᶠ (x : ι) in atTop, (∫ (a : α) in s x, f a ∂μ) ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ↑ε

tactic: refine' this.mono fun i hi => _
state_before: case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
this : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
⊢ ∀ᶠ (x : ι) in atTop, (∫ (a : α) in s x, f a ∂μ) ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ↑ε

tactic: rw [mem_closedBall_iff_norm', ← integral_diff (hsm i) hfi hsub, ← coe_nnnorm, NNReal.coe_le_coe, ←
  ENNReal.coe_le_coe]
state_before: case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
this : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
i : ι
hi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
⊢ (∫ (a : α) in s i, f a ∂μ) ∈ Metric.closedBall (∫ (a : α) in S, f a ∂μ) ↑ε

tactic: refine' (ennnorm_integral_le_lintegral_ennnorm _).trans _
state_before: case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
this : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
i : ι
hi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
⊢ ↑‖∫ (x : α) in S \ s i, f x ∂μ‖₊ ≤ ↑ε

tactic: rw [← withDensity_apply _ (hSm.diff (hsm _)), ← hν, measure_diff hsub (hsm _)]
state_before: case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
this : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
i : ι
hi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
⊢ (∫⁻ (a : α) in S \ s i, ↑‖f a‖₊ ∂μ) ≤ ↑ε

tactic: exacts [tsub_le_iff_tsub_le.mp hi.1,
  (hi.2.trans_lt <| ENNReal.add_lt_top.2 ⟨hfi', ENNReal.coe_lt_top⟩).ne]
state_before: case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
this : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
i : ι
hi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
⊢ ↑↑ν S - ↑↑ν (s i) ≤ ↑ε

case intro
α : Type u_2
β : Type ?u.52668
E : Type u_3
F : Type ?u.52674
inst✝⁵ : MeasurableSpace α
inst✝⁴ : NormedAddCommGroup E
f g : α → E
s✝ t : Set α
μ ν✝ : Measure α
l l' : Filter α
inst✝³ : CompleteSpace E
inst✝² : NormedSpace ℝ E
ι : Type u_1
inst✝¹ : Countable ι
inst✝ : SemilatticeSup ι
s : ι → Set α
hsm : ∀ (i : ι), MeasurableSet (s i)
h_mono : Monotone s
S : Set α := ⋃ (i : ι), s i
hfi : IntegrableOn f S
hSm : MeasurableSet S
hsub : ∀ {i : ι}, s i ⊆ S
ν : Measure α := Measure.withDensity μ fun x => ↑‖f x‖₊
hfi' : ↑↑ν S < ⊤
hν : ν = Measure.withDensity μ fun x => ↑‖f x‖₊
ε : ℝ≥0
ε0 : 0 < ↑ε
this : ∀ᶠ (i : ι) in atTop, ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
i : ι
hi : ↑↑ν (s i) ∈ Icc (↑↑ν S - ↑ε) (↑↑ν S + ↑ε)
⊢ ↑↑ν (s i) ≠ ⊤