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

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

tactic: have aux : {(0 : ℝ≥0)}ᶜ ∈ 𝓝 μ.mass :=
  isOpen_compl_singleton.mem_nhds (μ.mass_nonzero_iff.mpr nonzero)
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
⊢ Tendsto (fun i => testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: have eventually_nonzero : ∀ᶠ i in F, μs i ≠ 0 := by
  simp_rw [← mass_nonzero_iff]
  exact lim_mass aux
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
⊢ Tendsto (fun i => testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: have eve : ∀ᶠ i in F,
    (μs i).normalize.toFiniteMeasure.testAgainstNN f =
      (μs i).mass⁻¹ * (μs i).testAgainstNN f := by
  filter_upwards [eventually_iff.mp eventually_nonzero]
  intro i hi
  apply normalize_testAgainstNN _ hi
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
⊢ Tendsto (fun i => testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: simp_rw [tendsto_congr' eve, μ.normalize_testAgainstNN nonzero]
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
eve :
  ∀ᶠ (i : γ) in F,
    testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f
⊢ Tendsto (fun i => testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f) F
    (𝓝 (testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize μ)) f))

tactic: exact tendsto_mul.comp lim_pair
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
eve :
  ∀ᶠ (i : γ) in F,
    testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f
lim_pair : Tendsto (fun i => ((mass (μs i))⁻¹, testAgainstNN (μs i) f)) F (𝓝 ((mass μ)⁻¹, testAgainstNN μ f))
⊢ Tendsto (fun x => (mass (μs x))⁻¹ * testAgainstNN (μs x) f) F (𝓝 ((mass μ)⁻¹ * testAgainstNN μ f))

tactic: simp_rw [← mass_nonzero_iff]
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
⊢ ∀ᶠ (i : γ) in F, μs i ≠ 0

tactic: exact lim_mass aux
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
⊢ ∀ᶠ (i : γ) in F, mass (μs i) ≠ 0

tactic: filter_upwards [eventually_iff.mp eventually_nonzero]
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
⊢ ∀ᶠ (i : γ) in F,
    testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f

tactic: intro i hi
state_before: case h
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
⊢ ∀ (a : γ),
    μs a ≠ 0 →
      testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs a))) f = (mass (μs a))⁻¹ * testAgainstNN (μs a) f

tactic: apply normalize_testAgainstNN _ hi
state_before: case h
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
i : γ
hi : μs i ≠ 0
⊢ testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f

tactic: refine' (Prod.tendsto_iff _ _).mpr ⟨_, _⟩
state_before: Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
eve :
  ∀ᶠ (i : γ) in F,
    testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f
⊢ Tendsto (fun i => ((mass (μs i))⁻¹, testAgainstNN (μs i) f)) F (𝓝 ((mass μ)⁻¹, testAgainstNN μ f))

tactic: exact (continuousOn_inv₀.continuousAt aux).tendsto.comp lim_mass
state_before: case refine'_1
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
eve :
  ∀ᶠ (i : γ) in F,
    testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f
⊢ Tendsto (fun n => ((mass (μs n))⁻¹, testAgainstNN (μs n) f).fst) F (𝓝 ((mass μ)⁻¹, testAgainstNN μ f).fst)

tactic: exact tendsto_iff_forall_testAgainstNN_tendsto.mp μs_lim f
state_before: case refine'_2
Ω : Type u_2
inst✝² : Nonempty Ω
m0 : MeasurableSpace Ω
μ : FiniteMeasure Ω
inst✝¹ : TopologicalSpace Ω
inst✝ : OpensMeasurableSpace Ω
γ : Type u_1
F : Filter γ
μs : γ → FiniteMeasure Ω
μs_lim : Tendsto μs F (𝓝 μ)
nonzero : μ ≠ 0
f : Ω →ᵇ ℝ≥0
lim_mass : Tendsto (fun i => mass (μs i)) F (𝓝 (mass μ))
aux : {0}ᶜ ∈ 𝓝 (mass μ)
eventually_nonzero : ∀ᶠ (i : γ) in F, μs i ≠ 0
eve :
  ∀ᶠ (i : γ) in F,
    testAgainstNN (ProbabilityMeasure.toFiniteMeasure (normalize (μs i))) f = (mass (μs i))⁻¹ * testAgainstNN (μs i) f
⊢ Tendsto (fun n => ((mass (μs n))⁻¹, testAgainstNN (μs n) f).snd) F (𝓝 ((mass μ)⁻¹, testAgainstNN μ f).snd)