The Vitali–Carathéodory theorem
ProvedFamousTheorems.vitali_caratheodory_theoremThe Vitali–Carathéodory theorem. Let be a weakly regular, -finite Borel measure on a topological space and a real -integrable function. For every there is a lower semicontinuous function with values in such that everywhere, is integrable (in particular almost everywhere), and
An integrable function can be approximated from above by lower semicontinuous functions (and from below by upper semicontinuous ones) arbitrarily well in . This is used, for example, in Rudin's proof of the fundamental theorem of calculus for Lebesgue integrals.
Formalization note. Mathlib's MeasureTheory.exists_lt_lowerSemicontinuous_integral_lt. The function takes values in EReal. Its integrability is stated for the real part (g x).toReal, together with the condition that almost everywhere. μ.WeaklyRegular means measurable sets are approximated from outside by open sets and open sets from inside by closed sets.
import Mathlib
namespace FamousTheorems
open MeasureTheory
theorem vitali_caratheodory_theorem {α : Type*} [TopologicalSpace α] [MeasurableSpace α] [BorelSpace α] {μ : Measure α}
[μ.WeaklyRegular] [SigmaFinite μ] (f : α → ℝ) (hf : Integrable f μ) {ε : ℝ} (hε : 0 < ε) :
∃ g : α → EReal, (∀ x, (f x : EReal) < g x) ∧ LowerSemicontinuous g ∧
Integrable (fun x => (g x).toReal) μ ∧ (∀ᵐ x ∂μ, g x < ⊤) ∧
∫ x, (g x).toReal ∂μ < ∫ x, f x ∂μ + ε := by sorry
end FamousTheorems