Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Egorov's theorem

Proved
EgorovsTheorem.egorov_theorem

by LG · Nov 18, 2026 · Mathlib 0df444a (Lean v4.33.1)

measure-theoryreal-analysis

Egorov's theorem, as stated in the MathWorld entry. Let (X,B,μ)(X,\mathcal B,\mu)(X,B,μ) be a measure space and let E∈BE\in\mathcal BE∈B be a measurable set with μ(E)<∞\mu(E)<\inftyμ(E)<∞. Let (fk)k∈N(f_k)_{k\in\mathbb N}(fk​)k∈N​ be a sequence of extended-real-valued functions on EEE, each measurable on EEE and finite almost everywhere on EEE, and suppose that (fk)(f_k)(fk​) converges almost everywhere on EEE to a finite limit ggg. Then for every ε>0\varepsilon>0ε>0 there exists a measurable set A⊆EA\subseteq EA⊆E with

μ(E∖A)<ε\mu(E\setminus A)<\varepsilonμ(E∖A)<ε

such that (fk)(f_k)(fk​) converges uniformly to ggg on AAA: for every δ>0\delta>0δ>0 there is N∈NN\in\mathbb NN∈N such that for all k≥Nk\ge Nk≥N and all x∈Ax\in Ax∈A,

g(x)−δ<fk(x)<g(x)+δ.g(x)-\delta<f_k(x)<g(x)+\delta.g(x)−δ<fk​(x)<g(x)+δ.

In particular ggg is finite at every point of AAA, and fkf_kfk​ is finite on AAA for all k≥Nk\ge Nk≥N.

The theorem converts almost-everywhere convergence on a finite-measure set into uniform convergence after removing a set of arbitrarily small measure; it is a basic tool of real analysis, feeding the Vitali convergence theorem and Lusin's theorem.

Formalization Note. Functions take values in Lean's EReal ([−∞,+∞][-\infty,+\infty][−∞,+∞]); "finite" means ≠±∞\neq\pm\infty=±∞. The functions are defined on XXX but only constrained on EEE; measurability is required on the subtype EEE with its trace σ-algebra. The limit ggg is a parameter constrained almost everywhere; its measurability is not assumed. Uniform convergence is expressed in the ε\varepsilonε-NNN order form above, equivalent to ∣fk(x)−g(x)∣<δ|f_k(x)-g(x)|<\delta∣fk​(x)−g(x)∣<δ when g(x)g(x)g(x) is finite, and forcing finiteness of ggg and of the tail on AAA. Measurability of AAA is made explicit: the source's μ(E∖A)\mu(E\setminus A)μ(E∖A) presupposes it.

Preamble
import Mathlib

open MeasureTheory Filter Topology Set
Formal statement
namespace EgorovsTheorem

theorem egorov_theorem
    {X : Type*} [MeasurableSpace X] (μ : Measure X)
    (E : Set X) (hE : MeasurableSet E) (hμE : μ E < ⊤)
    (f : ℕ → X → EReal)
    (hf : ∀ k, Measurable (fun x : ↥E => f k ↑x))
    (hf_fin : ∀ k, ∀ᵐ x ∂(μ.restrict E), f k x ≠ ⊥ ∧ f k x ≠ ⊤)
    (g : X → EReal)
    (hconv : ∀ᵐ x ∂(μ.restrict E), g x ≠ ⊥ ∧ g x ≠ ⊤ ∧
      Tendsto (fun k => f k x) atTop (𝓝 (g x))) :
    ∀ ε : ℝ, 0 < ε → ∃ A : Set X, A ⊆ E ∧ MeasurableSet A ∧
      μ (E \ A) < ENNReal.ofReal ε ∧
      ∀ δ : ℝ, 0 < δ → ∃ N : ℕ, ∀ k ≥ N, ∀ x ∈ A,
        g x - (δ : EReal) < f k x ∧ f k x < g x + (δ : EReal) := by sorry

end EgorovsTheorem
Source
https://mathworld.wolfram.com/EgorovsTheorem.html — MathWorld, "Egorov's Theorem" (entry contributed by Alexis Humphreys), main theorem paragraph (first paragraph); the entry cites Wheeden & Zygmund, Measure and Integral: An Introduction to Real Analysis (Dekker, 1977).
Read-back

What the Lean code literally says, in plain math · Qwen (captain model, blind code-only pass; no independent sub-agent available in this environment)

Fix a type XXX equipped with a σ-algebra (the MeasurableSpace instance) and a measure μ\muμ on it. Fix a set E⊆XE\subseteq XE⊆X together with proofs that EEE is measurable and that μ(E)<⊤\mu(E)<\topμ(E)<⊤, i.e. the value μ(E)∈[0,∞]\mu(E)\in[0,\infty]μ(E)∈[0,∞] is strictly below infinity. Fix a sequence f:N→(X→R‾)f:\mathbb N\to(X\to\overline{\mathbb R})f:N→(X→R) and a function g:X→R‾g:X\to\overline{\mathbb R}g:X→R, where R‾=[−∞,+∞]\overline{\mathbb R}=[-\infty,+\infty]R=[−∞,+∞] is Lean's EReal carrying its order topology.

The hypotheses are:

  1. For every k∈Nk\in\mathbb Nk∈N, the map x↦fk(x)x\mapsto f_k(x)x↦fk​(x) is measurable as a function on the subtype EEE (with the trace σ-algebra inherited from XXX) into R‾\overline{\mathbb R}R with its Borel σ-algebra. Nothing is required of fkf_kfk​ outside EEE.
  2. For every kkk, for almost every xxx with respect to the restricted measure μ∣E\mu|_Eμ∣E​ (the filter ∀ᵐ x ∂(μ.restrict E)), fk(x)≠−∞f_k(x)\neq-\inftyfk​(x)=−∞ and fk(x)≠+∞f_k(x)\neq+\inftyfk​(x)=+∞.
  3. For almost every xxx with respect to μ∣E\mu|_Eμ∣E​: g(x)≠−∞g(x)\neq-\inftyg(x)=−∞, g(x)≠+∞g(x)\neq+\inftyg(x)=+∞, and the sequence (fk(x))k(f_k(x))_k(fk​(x))k​ converges to g(x)g(x)g(x) in the order topology of R‾\overline{\mathbb R}R as k→∞k\to\inftyk→∞.

The conclusion asserts that for every real ε\varepsilonε with 0<ε0<\varepsilon0<ε there exists a set A⊆XA\subseteq XA⊆X such that:

  • A⊆EA\subseteq EA⊆E;
  • AAA is measurable in the σ-algebra of XXX;
  • μ(E∖A)<ι(ε)\mu(E\setminus A)<\iota(\varepsilon)μ(E∖A)<ι(ε), where ι(ε)\iota(\varepsilon)ι(ε) embeds the real ε\varepsilonε into [0,∞][0,\infty][0,∞] (ENNReal.ofReal); the inequality is strict;
  • for every real δ\deltaδ with 0<δ0<\delta0<δ there exists N∈NN\in\mathbb NN∈N such that for every k≥Nk\ge Nk≥N and every x∈Ax\in Ax∈A, both g(x)−δ<fk(x)g(x)-\delta<f_k(x)g(x)−δ<fk​(x) and fk(x)<g(x)+δf_k(x)<g(x)+\deltafk​(x)<g(x)+δ hold in R‾\overline{\mathbb R}R, with δ\deltaδ coerced to a finite extended real and +,−+,-+,− the extended-real operations.

Degenerate and edge cases included by the quantifiers: XXX may be empty; EEE may be empty or have measure zero. If μ∣E=0\mu|_E=0μ∣E​=0, the almost-everywhere hypotheses are vacuous, and A=∅A=\emptysetA=∅ satisfies the conclusion (μ(E∖∅)=0<ι(ε)\mu(E\setminus\emptyset)=0<\iota(\varepsilon)μ(E∖∅)=0<ι(ε), and the uniform-convergence condition over the empty set is vacuous). The measure μ\muμ is arbitrary: no σ-finiteness, completeness, or topology on XXX is assumed. No measurability is assumed of ggg, and ggg is unconstrained outside the almost-everywhere set of hypothesis 3. In the conclusion, if g(x)=+∞g(x)=+\inftyg(x)=+∞ then g(x)−δ=g(x)+δ=+∞g(x)-\delta=g(x)+\delta=+\inftyg(x)−δ=g(x)+δ=+∞ and the two strict inequalities cannot both hold; similarly for g(x)=−∞g(x)=-\inftyg(x)=−∞. Hence any admissible AAA contains only points where ggg is finite, and for k≥Nk\ge Nk≥N only points where fkf_kfk​ is finite; terms with k<Nk<Nk<N are unconstrained on AAA. At finite g(x)g(x)g(x), the displayed inequalities are equivalent to ∣fk(x)−g(x)∣<δ|f_k(x)-g(x)|<\delta∣fk​(x)−g(x)∣<δ when fk(x)f_k(x)fk​(x) is finite, and fail when fk(x)=±∞f_k(x)=\pm\inftyfk​(x)=±∞. Both measure bounds are strict (<<<, not ≤\le≤).

Human review
  • Endorsed by Shuze Chen · Nov 18, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Nov 18, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me