Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Example 8.1.8 — occupation times of half-lines

Proved
DurrettProbability.donsker_occupation

by naimengye · Sep 19, 2026 · Mathlib 0df444a (Lean v4.33.1)

analysisprobabilitystochastic-systems

Under the hypotheses of Durrett's Theorem 8.1.2, with BBB a Brownian motion all of whose paths are continuous, and for any real level aaa,

1n ∣{ 0≤m≤n: Sm>an }∣ ⟹ ∣{ t∈[0,1]: Bt>a }∣,\frac1n\,\bigl|\{\,0\le m\le n:\ S_m>a\sqrt n\,\}\bigr| \ \Longrightarrow\ \bigl|\{\,t\in[0,1]:\ B_t>a\,\}\bigr| ,n1​​{0≤m≤n: Sm​>an​}​ ⟹ ​{t∈[0,1]: Bt​>a}​,

where Sm=X0+⋯+Xm−1S_m=X_0+\dots+X_{m-1}Sm​=X0​+⋯+Xm−1​, the left-hand cardinality counts integer times, and the right-hand ∣⋅∣|\cdot|∣⋅∣ is Lebesgue measure.

At a=0a=0a=0 the limit law is the arcsine law, which is how Durrett's Theorem 4.9.6 for simple random walk becomes a statement about every mean-zero, finite-variance walk. This is the invariance principle of Erdős and Kac.

Formalization Note The count is written as a sum of indicator functions of (an,∞)(a\sqrt n,\infty)(an​,∞) evaluated at the partial sums, which equals the cardinality above and keeps a decidability side condition out of the statement. The index mmm runs over 0≤m≤n0\le m\le n0≤m≤n, so S0=0S_0=0S0​=0 is included; it contributes exactly when an<0a\sqrt n<0an​<0.

The limit is the Lebesgue measure of {t∈[0,1]:Bt>a}\{t\in[0,1]:B_t>a\}{t∈[0,1]:Bt​>a}, converted from an extended non-negative real to a real number. The conversion is harmless: the set sits inside [0,1][0,1][0,1], so its measure is at most 111 and in particular finite. Times are matched to the process by taking the non-negative part of ttt, which on [0,1][0,1][0,1] is ttt itself.

The strict inequality Bt>aB_t>aBt​>a is the book's; the level set {Bt=a}\{B_t=a\}{Bt​=a} has measure zero almost surely, which is exactly why the functional is almost surely continuous, so the strict and non-strict versions have the same limit — but only the strict one is asserted here.

Preamble
import Mathlib
import Definitions.Def_DurrettProbability_Brownian
import Definitions.Def_DurrettProbability_Donsker

open Filter MeasureTheory ProbabilityTheory
open scoped NNReal Topology
Formal statement
namespace DurrettProbability

theorem donsker_occupation
    {Ω : Type*} [MeasurableSpace Ω] {P : Measure Ω} [IsProbabilityMeasure P]
    {X : ℕ → Ω → ℝ} (hmeas : ∀ k, Measurable (X k)) (hindep : iIndepFun X P)
    (hident : ∀ k, IdentDistrib (X k) (X 0) P P) (hint : Integrable (fun ω => X 0 ω ^ 2) P)
    (hmean : ∫ ω, X 0 ω ∂P = 0) (hvar : ∫ ω, X 0 ω ^ 2 ∂P = 1)
    {Ω' : Type*} [MeasurableSpace Ω'] {P' : Measure Ω'} [IsProbabilityMeasure P']
    {B : ℝ≥0 → Ω' → ℝ} (hB : IsBrownianReal B P') (hBc : ∀ ω, Continuous fun t => B t ω)
    (a : ℝ) :
    TendstoInDistribution
      (fun n : ℕ => fun ω => (n : ℝ)⁻¹ * ∑ m ∈ Finset.range (n + 1),
        Set.indicator (Set.Ioi (a * Real.sqrt n)) (fun _ => (1 : ℝ))
          (∑ k ∈ Finset.range m, X k ω))
      atTop
      (fun ω => (volume {t : ℝ | t ∈ Set.Icc (0 : ℝ) 1 ∧ a < B t.toNNReal ω}).toReal)
      (fun _ => P) P' := by sorry

end DurrettProbability
Source
Durrett, Probability: Theory and Examples, Version 5 (11 January 2019), p. 393 (PDF p. 401), Example 8.1.8: 'Occupation times of half-lines. Let psi(omega) = |{t in [0,1] : omega(t) > a}|. ... Fubini''s theorem implies E_0|{t in [0,1] : B_t = a}| = integral_0^1 P_0(B_t = a) dt = 0 so psi is continuous P_0-a.s. Using Theorem 8.1.5, we now get that |{u <= n : S(u) > a sqrt(n)}|/n => |{t in [0,1] : B_t > a}|. As we will now show, with a little work, one can convert this into the more natural result |{m <= n : S_m > a sqrt(n)}|/n => |{t in [0,1] : B_t > a}|.' sha256 aeac36cbf5e44c53d69fa60a2d29a393e2d0e8c955ee103bd845d925fd910886
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 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