-- Lean 4 proof step from Mathlib.MeasureTheory.Measure.Prokhorov (goal)
Goal:
E : Type u_1
inst : MeasurableSpace E
inst_1 : TopologicalSpace E
inst_2 : T2Space E
inst_3 : BorelSpace E
u : ℕ → ℝ≥0
K : ℕ → Set E
C : ℝ≥0
hu : Tendsto u atTop (𝓝 0)
hK : ∀ (n : ℕ), IsCompact (K n)
h : NormalSpace E ∨ Monotone K
I :
  ∀ (μ : FiniteMeasure E) (n : ℕ),
    ∑ i ∈ Finset.range (n + 1), μ.restrict (disjointed K i) = μ.restrict ((partialSups K : (a : ℕ) → Set E) n)
A : ∀ (n : ℕ), IsCompact.{u_1} (X := E) ((partialSups K : (a : ℕ) → Set E) n)
f : Ultrafilter (FiniteMeasure E)
hf : {μ : FiniteMeasure E | μ.mass ≤ C ∧ ∀ (n : ℕ), (μ : (a : Set E) → ℝ≥0) (K n)ᶜ ≤ u n} ∈ f
ν : (n : ℕ) → FiniteMeasure E
ν_reg : ∀ (n : ℕ), (↑(ν n) : Measure E).InnerRegular
νK : ∀ (n : ℕ), Eq (α := ℝ≥0) ((ν n : (a : Set E) → ℝ≥0) ((partialSups K : (a : ℕ) → Set E) n)ᶜ : ℝ≥0) (0 : ℝ≥0)
hν :
  ∀ (n : ℕ), Tendsto (fun (ρ : FiniteMeasure E) ↦ ρ.restrict (disjointed K n)) (↑f : Filter (FiniteMeasure E)) (𝓝 (ν n))
B : ((Measure.sum fun (n : ℕ) ↦ (↑(ν n) : Measure E) : Measure E) : (a : Set E) → ℝ≥0∞) univ ≤ (↑C : ℝ≥0∞)
μ : FiniteMeasure E :=
  Subtype.mk (p := fun (μ : Measure E) ↦ IsFiniteMeasure μ) (Measure.sum fun (n : ℕ) ↦ (↑(ν n) : Measure E)) ⋯
g : E →ᵇ ℝ
ε : ℝ
εpos : ε > 0
I1 :
  ∀ᶠ (n : ℕ) in atTop,
    dist (α := ℝ)
        (@integral _ _ _ _ inst (∑ i ∈ Finset.range (n + 1), (↑(ν i) : Measure E)) fun (x : E) ↦ (g : (a : E) → ℝ) x)
        (∫ (x : E), (g : (a : E) → ℝ) x ∂(↑μ : Measure E)) <
      ε / 3
I2 : ∀ᶠ (n : ℕ) in atTop, ‖g‖ * (↑(u n) : ℝ) < ε / 3
n : ℕ
hn :
  dist (α := ℝ)
      (@integral _ _ _ _ inst (∑ i ∈ Finset.range (n + 1), (↑(ν i) : Measure E)) fun (x : E) ↦ (g : (a : E) → ℝ) x)
      (∫ (x : E), (g : (a : E) → ℝ) x ∂(↑μ : Measure E)) <
    ε / 3
h'n : ‖g‖ * (↑(u n) : ℝ) < ε / 3
this_1 :
  Tendsto (β := ℝ)
    (fun (ρ : FiniteMeasure E) ↦
      @integral _ _ _ _ inst (↑(∑ i ∈ Finset.range (n + 1), ρ.restrict (disjointed K i)) : Measure E) fun (x : E) ↦
        (g : (a : E) → ℝ) x)
    (↑f : Filter (FiniteMeasure E))
    (𝓝 (@integral _ _ _ _ inst (↑(∑ i ∈ Finset.range (n + 1), ν i) : Measure E) fun (x : E) ↦ (g : (a : E) → ℝ) x))
ρ : FiniteMeasure E
hρ :
  dist (α := ℝ)
      (@integral _ _ _ _ inst (↑(∑ i ∈ Finset.range (n + 1), ρ.restrict (disjointed K i)) : Measure E) fun (x : E) ↦
        (g : (a : E) → ℝ) x)
      (@integral _ _ _ _ inst (↑(∑ i ∈ Finset.range (n + 1), ν i) : Measure E) fun (x : E) ↦ (g : (a : E) → ℝ) x) <
    ε / 3
h'ρ : ρ.mass ≤ C ∧ ∀ (n : ℕ), (ρ : (a : Set E) → ℝ≥0) (K n)ᶜ ≤ u n
this : ρ = ρ.restrict ((partialSups K : (a : ℕ) → Set E) n)ᶜ + ∑ i ∈ Finset.range (n + 1), ρ.restrict (disjointed K i)
⊢ dist (α := ℝ)
      (∫ (x : E),
        (g : (a : E) → ℝ)
          x ∂(↑(ρ.restrict ((partialSups K : (a : ℕ) → Set E) n)ᶜ +
              ∑ i ∈ Finset.range (n + 1), ρ.restrict (disjointed K i)) :
          Measure E))
      (@integral _ _ _ _ inst (∑ i ∈ Finset.range (n + 1), (↑(ρ.restrict (disjointed K i)) : Measure E)) fun (x : E) ↦
        (g : (a : E) → ℝ) x) <
    ε / 3
have h₁ : dist
    (HAdd.hAdd (α := ℝ)
      (∫ (x : E), (g : (a : E) → ℝ) x ∂(↑(ρ.restrict ((partialSups K : (a : ℕ) → Set E) n)ᶜ) : Measure E))
      (@integral _ _ _ _ inst (↑(∑ i ∈ Finset.range (n + 1), ρ.restrict (disjointed K i)) : Measure E) fun (x : E) ↦
        (g : (a : E) → ℝ) x))
    (@integral _ _ _ _ inst (∑ i ∈ Finset.range (n + 1), (↑(ρ.restrict (disjointed K i)) : Measure E)) fun (x : E) ↦
      (g : (a : E) → ℝ) x) <
  ε / 3
Tactic: rw [toMeasure_add, integral_add_measure (g.integrable _) (g.integrable _)]