Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The space L2(μ)\mathscr{L}^2(\mu)L2(μ), its norm, Cauchy sequences and convergence in the mean

Definition
Rudin_ch11_L2

by LG · Sep 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysismeasure-theory

Rudin's space of square-integrable functions, as functions rather than as equivalence classes. A measurable fff belongs to L2(μ)\mathscr{L}^2(\mu)L2(μ) when ∫∣f∣2 dμ<∞\int |f|^2\,d\mu < \infty∫∣f∣2dμ<∞ (Definition 11.34), and its norm is ∥f∥2=(∫∣f∣2 dμ)1/2\|f\|_2 = \left(\int |f|^2\,d\mu\right)^{1/2}∥f∥2​=(∫∣f∣2dμ)1/2. A sequence {fn}\{f_n\}{fn​} converges in the mean to fff if ∥fn−f∥2→0\|f_n - f\|_2 \to 0∥fn​−f∥2​→0, and is a Cauchy sequence in L2(μ)\mathscr{L}^2(\mu)L2(μ) if for every ε>0\varepsilon > 0ε>0 there is an NNN with ∥fn−fm∥2<ε\|f_n - f_m\|_2 < \varepsilon∥fn​−fm​∥2​<ε for all m,n≥Nm, n \ge Nm,n≥N (Definition 11.41). The underlying measure theory — measurable spaces, measures, measurability, integrability and the integral itself — is Mathlib's and is reused; what is introduced here is Rudin's L2\mathscr{L}^2L2 of genuine functions, with the explicit ε\varepsilonε-NNN conditions, as opposed to Mathlib's quotient space LpL^pLp.

Definition code
import Mathlib

/-!
# Rudin, Chapter 11 — the space `ℒ²(μ)`

Definitions transcribed from Walter Rudin, *Principles of Mathematical Analysis*, 3rd edition,
Chapter 11 (Definitions 11.34, 11.39, 11.41, 11.44 and equation (86) of Chapter 8).

Rudin builds measure theory from scratch — rings of sets, outer measures, the Carathéodory
extension, measurable functions and the integral — and all of that is available in Mathlib and
is reused: `MeasureTheory.OuterMeasure`, `MeasurableSet`, `Measurable`, `Integrable`, and the
Bochner integral `∫ x, f x ∂μ`.

What is set up here is Rudin's space `ℒ²(μ)` in his own terms — a measurable function whose
square is integrable — together with the norm `‖f‖₂ = (∫ |f|² dμ)^{1/2}`, Cauchy sequences and
convergence *in the mean*, phrased with explicit `ε`'s rather than through Mathlib's `Lp`
quotient space.  Working with functions rather than with equivalence classes is what makes the
statement of the Riesz–Fischer theorem match the book.
-/

namespace Rudin

open MeasureTheory

variable {X : Type*} [MeasurableSpace X]

/-- Rudin, Definition 11.34: `f ∈ ℒ²(μ)`, a measurable real function whose square is
integrable. -/
def MemL2 (μ : Measure X) (f : X → ℝ) : Prop :=
  Measurable f ∧ Integrable (fun x => (f x) ^ 2) μ

/-- Rudin, Definition 11.34: the norm `‖f‖₂ = (∫ |f|² dμ)^{1/2}`. -/
noncomputable def L2Norm (μ : Measure X) (f : X → ℝ) : ℝ :=
  Real.sqrt (∫ x, (f x) ^ 2 ∂μ)

/-- Rudin, Definition 11.41: `{fₙ}` **converges to `f` in the mean** (that is, in `ℒ²(μ)`) if
`‖fₙ - f‖₂ → 0`. -/
def TendstoL2 (μ : Measure X) (f : ℕ → X → ℝ) (g : X → ℝ) : Prop :=
  Filter.Tendsto (fun n => L2Norm μ fun x => f n x - g x) Filter.atTop (nhds 0)

/-- Rudin, Definition 11.41: `{fₙ}` is a **Cauchy sequence in `ℒ²(μ)`** if for every `ε > 0`
there is an `N` with `‖fₙ - fₘ‖₂ < ε` for all `m, n ≥ N`. -/
def CauchyL2 (μ : Measure X) (f : ℕ → X → ℝ) : Prop :=
  ∀ ε : ℝ, 0 < ε → ∃ N : ℕ, ∀ m ≥ N, ∀ n ≥ N, L2Norm μ (fun x => f n x - f m x) < ε

end Rudin
Source
Walter Rudin, Principles of Mathematical Analysis, 3rd edition, McGraw-Hill, 1976, Chapter 11, pp. 326-329, Definitions 11.34 and 11.41
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

Four definitions, relative to a type XXX carrying a σ\sigmaσ-algebra and a measure μ\muμ on it. All functions are real-valued.

Membership in L2(μ)\mathcal{L}^2(\mu)L2(μ). f∈L2(μ)f \in \mathcal{L}^2(\mu)f∈L2(μ) means: fff is measurable and the function x↦f(x)2x \mapsto f(x)^2x↦f(x)2 is integrable with respect to μ\muμ (finite Bochner integral of a function that is a.e. strongly measurable).

The L2\mathcal{L}^2L2 norm.

∥f∥2  =  ∫Xf(x)2 dμ(x),\lVert f\rVert_2 \;=\; \sqrt{\int_X f(x)^2 \, d\mu(x)},∥f∥2​=∫X​f(x)2dμ(x)​,

with the real square root (returning 000 on negative arguments) and the Bochner integral, which returns 000 when the integrand is not integrable. So ∥f∥2\lVert f\rVert_2∥f∥2​ is defined for every fff, integrable or not, and takes value 000 in the degenerate cases.

Convergence in the mean. A sequence f0,f1,…f_0,f_1,\dotsf0​,f1​,… converges to ggg in L2(μ)\mathcal{L}^2(\mu)L2(μ) means ∥fn−g∥2→0\lVert f_n - g\rVert_2 \to 0∥fn​−g∥2​→0 as n→∞n \to \inftyn→∞, the norm being the one just defined applied to the pointwise difference.

Cauchy in L2(μ)\mathcal{L}^2(\mu)L2(μ). The sequence is Cauchy means: for every real ε>0\varepsilon > 0ε>0 there is NNN such that for all m≥Nm \ge Nm≥N and all n≥Nn \ge Nn≥N, ∥fn−fm∥2<ε\lVert f_n - f_m\rVert_2 < \varepsilon∥fn​−fm​∥2​<ε (strict inequality).

These are definitions only; nothing is asserted about them. Note that they speak about genuine functions, not equivalence classes modulo null sets, so ∥f∥2=0\lVert f \rVert_2 = 0∥f∥2​=0 does not mean f=0f = 0f=0.

Human review
  • Endorsed by Shuze Chen · Sep 13, 2026

  • Endorsed by LG · Sep 13, 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