Theorem: MeasureTheory.FiniteMeasure.tendsto_testAgainstNN_of_tendsto_normalize_testAgainstNN_of_tendsto_mass
File: Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean

tactic: by_cases h_mass : μ.mass = 0
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
⊢ Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN μ f))

tactic: simp_rw [fun i => (μs i).testAgainstNN_eq_mass_mul f, μ.testAgainstNN_eq_mass_mul f]
state_before: case neg
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
h_mass : ¬mass μ = 0
⊢ Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN μ f))

tactic: rw [ProbabilityMeasure.tendsto_nhds_iff_toFiniteMeasure_tendsto_nhds] at μs_lim
state_before: case neg
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
h_mass : ¬mass μ = 0
⊢ Tendsto (fun i => mass (μs i) * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (mass μ * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: rw [tendsto_iff_forall_testAgainstNN_tendsto] at μs_lim
state_before: case neg
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim :
  Tendsto (ProbabilityMeasure.toFiniteMeasure ∘ fun i => normalize (μs i)) F
    (𝓝 (ProbabilityMeasure.toFiniteMeasure (normalize μ)))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
h_mass : ¬mass μ = 0
⊢ Tendsto (fun i => mass (μs i) * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (mass μ * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: have lim_pair :
  Tendsto (fun i => (⟨(μs i).mass, (μs i).normalize.toFiniteMeasure.testAgainstNN f⟩ : ℝ≥0 × ℝ≥0))
    F (𝓝 ⟨μ.mass, μ.normalize.toFiniteMeasure.testAgainstNN f⟩) :=
  (Prod.tendsto_iff _ _).mpr ⟨mass_lim, μs_lim f⟩
state_before: case neg
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim :
  ∀ (f : Ω →ᵇ ℝ≥0),
    Tendsto (fun i => testAgainstNN ((ProbabilityMeasure.toFiniteMeasure ∘ fun i => normalize (μs i)) i) f) F
      (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
h_mass : ¬mass μ = 0
⊢ Tendsto (fun i => mass (μs i) * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (mass μ * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: exact tendsto_mul.comp lim_pair
state_before: case neg
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim :
  ∀ (f : Ω →ᵇ ℝ≥0),
    Tendsto (fun i => testAgainstNN ((ProbabilityMeasure.toFiniteMeasure ∘ fun i => normalize (μs i)) i) f) F
      (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
h_mass : ¬mass μ = 0
lim_pair :
  Tendsto (fun i => (mass (μs i), testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f)) F
    (𝓝 (mass μ, testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))
⊢ Tendsto (fun i => mass (μs i) * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (mass μ * testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: simp only [μ.mass_zero_iff.mp h_mass, zero_testAgainstNN_apply, zero_mass,
  eq_self_iff_true] at *
state_before: case pos
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize μ))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
f : Ω →ᵇ ℝ≥0
h_mass : mass μ = 0
⊢ Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 (testAgainstNN μ f))

tactic: exact tendsto_zero_testAgainstNN_of_tendsto_zero_mass mass_lim f
state_before: case pos
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
f : Ω →ᵇ ℝ≥0
μs_lim : Tendsto (fun i => normalize (μs i)) F (𝓝 (normalize 0))
mass_lim : Tendsto (fun i => mass (μs i)) F (𝓝 0)
h_mass : True
⊢ Tendsto (fun i => testAgainstNN (μs i) f) F (𝓝 0)