-- Mathlib/MeasureTheory/Integral/BoundedContinuousFunction.lean
lemma tendsto_integral_of_forall_limsup_integral_le_integral {ι : Type*} {L : Filter ι}
    {μ : Measure X} [IsProbabilityMeasure μ] {μs : ι → Measure X} [∀ i, IsProbabilityMeasure (μs i)]
    (h : ∀ f : X →ᵇ ℝ, 0 ≤ f → L.limsup (fun i ↦ ∫ x, f x ∂ (μs i)) ≤ ∫ x, f x ∂μ)
    (f : X →ᵇ ℝ) :
    Tendsto (fun i ↦ ∫ x, f x ∂ (μs i)) L (𝓝 (∫ x, f x ∂μ))

Proof state:
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
key :
  limsup (fun i => ∫ (x : X), f x ∂μs i + ((μs i) Set.univ).toReal • ‖f‖) L ≤
    ∫ (x : X), f x ∂μ + (μ Set.univ).toReal • ‖f‖
⊢ limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ

Tactic:
simp only [measure_univ, ENNReal.one_toReal, smul_eq_mul, one_mul] at key

Result:
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
key : limsup (fun i => ∫ (x : X), f x ∂μs i + ‖f‖) L ≤ ∫ (x : X), f x ∂μ + ‖f‖
⊢ limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ

Proof state:
case inr
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
⊢ Tendsto (fun i => ∫ (x : X), f x ∂μs i) L (𝓝 (∫ (x : X), f x ∂μ))

Tactic:
apply tendsto_of_le_liminf_of_limsup_le _ _ bdd_above bdd_below

Result:
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
⊢ ∫ (x : X), f x ∂μ ≤ liminf (fun i => ∫ (x : X), f x ∂μs i) L

X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
⊢ limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ

Proof state:
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
key : limsup (fun i => ∫ (x : X), (const X ‖f‖ - f) x ∂μs i) L ≤ ∫ (x : X), (const X ‖f‖ - f) x ∂μ
⊢ ∫ (x : X), f x ∂μ ≤ liminf (fun i => ∫ (x : X), f x ∂μs i) L

Tactic:
simp_rw [f.integral_const_sub ‖f‖] at key

Result:
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
key :
  limsup (fun i => ((μs i) Set.univ).toReal • ‖f‖ - ∫ (x : X), f x ∂μs i) L ≤
    (μ Set.univ).toReal • ‖f‖ - ∫ (x : X), f x ∂μ
⊢ ∫ (x : X), f x ∂μ ≤ liminf (fun i => ∫ (x : X), f x ∂μs i) L

Proof state:
case inr
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
⊢ Tendsto (fun i => ∫ (x : X), f x ∂μs i) L (𝓝 (∫ (x : X), f x ∂μ))

Tactic:
have bdd_below := BddBelow.isBoundedUnder L.univ_mem (by simpa using obs.bddBelow)

Result:
case inr
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
L : Filter ι
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) L ≤ ∫ (x : X), f x ∂μ
f : X →ᵇ ℝ
hL : L.NeBot
obs : Bornology.IsBounded (Set.range fun i => ∫ (x : X), f x ∂μs i)
bdd_above : IsBoundedUnder (fun x1 x2 => x1 ≤ x2) L fun i => ∫ (x : X), f x ∂μs i
bdd_below : IsBoundedUnder (fun x1 x2 => x1 ≥ x2) L fun i => ∫ (x : X), f x ∂μs i
⊢ Tendsto (fun i => ∫ (x : X), f x ∂μs i) L (𝓝 (∫ (x : X), f x ∂μ))

Proof state:
case inl
X : Type u_1
inst✝⁴ : TopologicalSpace X
inst✝³ : MeasurableSpace X
inst✝² : OpensMeasurableSpace X
ι : Type u_2
μ : Measure X
inst✝¹ : IsProbabilityMeasure μ
μs : ι → Measure X
inst✝ : ∀ (i : ι), IsProbabilityMeasure (μs i)
f : X →ᵇ ℝ
h : ∀ (f : X →ᵇ ℝ), 0 ≤ f → limsup (fun i => ∫ (x : X), f x ∂μs i) ⊥ ≤ ∫ (x : X), f x ∂μ
⊢ Tendsto (fun i => ∫ (x : X), f x ∂μs i) ⊥ (𝓝 (∫ (x : X), f x ∂μ))

Tactic:
simp only [tendsto_bot]

Result:
no goals