Theorem: MeasureTheory.FiniteMeasure.tendsto_iff_forall_integral_tendsto
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: refine' ⟨_, tendsto_of_forall_integral_tendsto⟩
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
⊢ Tendsto μs F (𝓝 μ) ↔ ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))

tactic: rw [tendsto_iff_forall_lintegral_tendsto]
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
⊢ Tendsto μs F (𝓝 μ) → ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))

tactic: intro h f
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
⊢ (∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))) →
    ∀ (f : Ω →ᵇ ℝ), Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))

tactic: simp_rw [BoundedContinuousFunction.integral_eq_integral_nnrealPart_sub]
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
⊢ Tendsto (fun i => ∫ (x : Ω), ↑f x ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑f x ∂↑μ))

tactic: set f_pos := f.nnrealPart with _def_f_pos
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑(nnrealPart f) ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑(nnrealPart f) ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑μ))

tactic: set f_neg := (-f).nnrealPart with _def_f_neg
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
f_pos : Ω →ᵇ ℝ≥0 := nnrealPart f
_def_f_pos : f_pos = nnrealPart f
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑(nnrealPart (-f)) ω) ∂↑μ))

tactic: have tends_pos :=
  (ENNReal.tendsto_toReal
        (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) f_pos).ne).comp
    (h f_pos)
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
f_pos : Ω →ᵇ ℝ≥0 := nnrealPart f
_def_f_pos : f_pos = nnrealPart f
f_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)
_def_f_neg : f_neg = nnrealPart (-f)
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))

tactic: have tends_neg :=
  (ENNReal.tendsto_toReal
        (lintegral_lt_top_of_boundedContinuous_to_nnreal (μ : Measure Ω) f_neg).ne).comp
    (h f_neg)
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
f_pos : Ω →ᵇ ℝ≥0 := nnrealPart f
_def_f_pos : f_pos = nnrealPart f
f_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)
_def_f_neg : f_neg = nnrealPart (-f)
tends_pos :
  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_pos x) ∂↑(μs i)) F
    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_pos ω) ∂↑μ)))
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))

tactic: have aux :
  ∀ g : Ω →ᵇ ℝ≥0,
    (ENNReal.toReal ∘ fun i : γ => ∫⁻ x : Ω, ↑(g x) ∂(μs i : Measure Ω)) = fun i : γ =>
      (∫⁻ x : Ω, ↑(g x) ∂(μs i : Measure Ω)).toReal :=
  fun _ => rfl
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
f_pos : Ω →ᵇ ℝ≥0 := nnrealPart f
_def_f_pos : f_pos = nnrealPart f
f_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)
_def_f_neg : f_neg = nnrealPart (-f)
tends_pos :
  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_pos x) ∂↑(μs i)) F
    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_pos ω) ∂↑μ)))
tends_neg :
  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_neg x) ∂↑(μs i)) F
    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_neg ω) ∂↑μ)))
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))

tactic: simp_rw [aux, BoundedContinuousFunction.NNReal.toReal_lintegral_eq_integral]
  at tends_pos tends_neg
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
f_pos : Ω →ᵇ ℝ≥0 := nnrealPart f
_def_f_pos : f_pos = nnrealPart f
f_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)
_def_f_neg : f_neg = nnrealPart (-f)
tends_pos :
  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_pos x) ∂↑(μs i)) F
    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_pos ω) ∂↑μ)))
tends_neg :
  Tendsto (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑f_neg x) ∂↑(μs i)) F
    (𝓝 (ENNReal.toReal (∫⁻ (ω : Ω), ↑(↑f_neg ω) ∂↑μ)))
aux :
  ∀ (g : Ω →ᵇ ℝ≥0),
    (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i)) = fun i => ENNReal.toReal (∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i))
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))

tactic: exact Tendsto.sub tends_pos tends_neg
state_before: Ω : Type u_2
inst✝² : MeasurableSpace Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μ : FiniteMeasure Ω
h : ∀ (f : Ω →ᵇ ℝ≥0), Tendsto (fun i => ∫⁻ (x : Ω), ↑(↑f x) ∂↑(μs i)) F (𝓝 (∫⁻ (x : Ω), ↑(↑f x) ∂↑μ))
f : Ω →ᵇ ℝ
f_pos : Ω →ᵇ ℝ≥0 := nnrealPart f
_def_f_pos : f_pos = nnrealPart f
f_neg : Ω →ᵇ ℝ≥0 := nnrealPart (-f)
_def_f_neg : f_neg = nnrealPart (-f)
aux :
  ∀ (g : Ω →ᵇ ℝ≥0),
    (ENNReal.toReal ∘ fun i => ∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i)) = fun i => ENNReal.toReal (∫⁻ (x : Ω), ↑(↑g x) ∂↑(μs i))
tends_pos : Tendsto (fun i => ∫ (x : Ω), ↑(↑(nnrealPart f) x) ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑(↑(nnrealPart f) x) ∂↑μ))
tends_neg :
  Tendsto (fun i => ∫ (x : Ω), ↑(↑(nnrealPart (-f)) x) ∂↑(μs i)) F (𝓝 (∫ (x : Ω), ↑(↑(nnrealPart (-f)) x) ∂↑μ))
⊢ Tendsto (fun i => (∫ (ω : Ω), ↑(↑f_pos ω) ∂↑(μs i)) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑(μs i)) F
    (𝓝 ((∫ (ω : Ω), ↑(↑f_pos ω) ∂↑μ) - ∫ (ω : Ω), ↑(↑f_neg ω) ∂↑μ))