Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2.5 — mean value inequalities for sub- and superharmonic functions

Proved
HunterPDE.Harmonic.mean_value_inequality

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

mean-value-propertyp2o-batch-books5p2o-gran-per-chapterp2o-plan-bookp2o-v1pdesubharmonic-functions

Let n≥1n \ge 1n≥1, let Ω⊆Rn\Omega \subseteq \mathbb{R}^nΩ⊆Rn be open, Br(x)⋐ΩB_r(x) \Subset \OmegaBr​(x)⋐Ω and u∈C2(Ω)u \in C^2(\Omega)u∈C2(Ω). If uuu is subharmonic in Ω\OmegaΩ (Δu≥0\Delta u \ge 0Δu≥0), then

u(x)≤⨍Br(x)u dx,u(x)≤⨍∂Br(x)u dS.(2.5)u(x) \le ⨍_{B_r(x)} u \, dx, \qquad u(x) \le ⨍_{\partial B_r(x)} u \, dS. \qquad (2.5)u(x)≤⨍Br​(x)​udx,u(x)≤⨍∂Br​(x)​udS.(2.5)

If uuu is superharmonic in Ω\OmegaΩ (Δu≤0\Delta u \le 0Δu≤0), then

u(x)≥⨍Br(x)u dx,u(x)≥⨍∂Br(x)u dS.(2.6)u(x) \ge ⨍_{B_r(x)} u \, dx, \qquad u(x) \ge ⨍_{\partial B_r(x)} u \, dS. \qquad (2.6)u(x)≥⨍Br​(x)​udx,u(x)≥⨍∂Br​(x)​udS.(2.6)

The inequality (2.5) is what the proof of the strong maximum principle (Theorem 2.13) uses.

Formalization Note. Sub- and superharmonicity (Definition 2.4, including u∈C2(Ω)u \in C^2(\Omega)u∈C2(Ω)) are the definition item Subharmonic; the averages are those of MeanValue. Br(x)⋐ΩB_r(x) \Subset \OmegaBr​(x)⋐Ω is 0 < r and Metric.closedBall x r ⊆ Ω. The two cases are stated as a conjunction of two implications. n≥1n \ge 1n≥1 keeps the sphere nonempty.

Preamble
import Mathlib
import Definitions.Def_HunterPDE_Harmonic_MeanValue
import Definitions.Def_HunterPDE_Harmonic_Subharmonic

open MeasureTheory
Formal statement
namespace HunterPDE.Harmonic

/-- Theorem 2.5 of Hunter, *Notes on PDEs* (revised 6/18/2014), p. 22: let `Ω ⊆ ℝⁿ` be open,
`B_r(x) ⋐ Ω` (the closed ball lies in `Ω`, `r > 0`) and `u ∈ C²(Ω)`. If `u` is subharmonic in `Ω`
(`Δu ≥ 0`), then `u(x)` is at most its average over the ball `B_r(x)` and at most its average over
the sphere `∂B_r(x)` (2.5); if `u` is superharmonic in `Ω` (`Δu ≤ 0`), both inequalities are
reversed (2.6). The `C²` hypothesis is part of `IsSubharmonicOn` / `IsSuperharmonicOn`
(Definition 2.4). `n ≥ 1`, so that the sphere is nonempty. -/
theorem mean_value_inequality {n : ℕ} (hn : 0 < n) {Ω : Set (EuclideanSpace ℝ (Fin n))}
    {u : EuclideanSpace ℝ (Fin n) → ℝ} (hΩ : IsOpen Ω)
    {x : EuclideanSpace ℝ (Fin n)} {r : ℝ} (hr : 0 < r) (hball : Metric.closedBall x r ⊆ Ω) :
    (IsSubharmonicOn Ω u →
        u x ≤ (⨍ y in Metric.ball x r, u y) ∧ u x ≤ sphereAverage u x r) ∧
      (IsSuperharmonicOn Ω u →
        (⨍ y in Metric.ball x r, u y) ≤ u x ∧ sphereAverage u x r ≤ u x) := by sorry

end HunterPDE.Harmonic
Source
Hunter, Notes on Partial Differential Equations (revised 6/18/2014), p. 22, Theorem 2.5
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Hypotheses.

  • n≥1n \ge 1n≥1.
  • Ω⊆Rn\Omega \subseteq \mathbb{R}^nΩ⊆Rn is open.
  • u:Rn→Ru : \mathbb{R}^n \to \mathbb{R}u:Rn→R.
  • x∈Rnx \in \mathbb{R}^nx∈Rn and r>0r > 0r>0 satisfy B‾r(x)⊆Ω\overline{B}_r(x) \subseteq \OmegaBr​(x)⊆Ω.

Write

AB=1λ(Br(x))∫Br(x)u dλA_B = \frac{1}{\lambda(B_r(x))}\int_{B_r(x)} u\,d\lambdaAB​=λ(Br​(x))1​∫Br​(x)​udλ

for the average over the open ball (λ\lambdaλ Lebesgue measure). Write

AS=1σ(Sn−1)∫Sn−1u(x+ry) dσ(y)A_S = \frac{1}{\sigma(S^{n-1})}\int_{S^{n-1}} u(x+ry)\,d\sigma(y)AS​=σ(Sn−1)1​∫Sn−1​u(x+ry)dσ(y)

for the sphere average, with σ(A)=n λ({ta:0<t<1, a∈A})\sigma(A) = n\,\lambda(\{ta : 0<t<1,\ a\in A\})σ(A)=nλ({ta:0<t<1, a∈A}) on the unit sphere Sn−1S^{n-1}Sn−1. Each average is 000 if its integrand is not integrable.

Conclusion. Two implications hold simultaneously:

  1. If uuu is C2C^2C2 on Ω\OmegaΩ and Δu(y)≥0\Delta u(y) \ge 0Δu(y)≥0 for all y∈Ωy \in \Omegay∈Ω (subharmonic), then
u(x)≤ABandu(x)≤AS.u(x) \le A_B \quad\text{and}\quad u(x) \le A_S.u(x)≤AB​andu(x)≤AS​.
  1. If uuu is C2C^2C2 on Ω\OmegaΩ and Δu(y)≤0\Delta u(y) \le 0Δu(y)≤0 for all y∈Ωy \in \Omegay∈Ω (superharmonic), then
AB≤u(x)andAS≤u(x).A_B \le u(x) \quad\text{and}\quad A_S \le u(x).AB​≤u(x)andAS​≤u(x).

Here Δu(y)=∑iD2u(y)(ei,ei)\Delta u(y) = \sum_i D^2u(y)(e_i,e_i)Δu(y)=∑i​D2u(y)(ei​,ei​).

Degenerate cases.

  • n=0n = 0n=0. Excluded by hypothesis.
  • n=1n = 1n=1. AS=12(u(x+r)+u(x−r))A_S = \tfrac12(u(x+r)+u(x-r))AS​=21​(u(x+r)+u(x−r)).
  • Openness. Since Ω\OmegaΩ is open, "C2C^2C2 on Ω\OmegaΩ" is ordinary C2C^2C2 near each point of Ω\OmegaΩ.
  • Integrability. uuu is then continuous on the compact set B‾r(x)⊆Ω\overline{B}_r(x) \subseteq \OmegaBr​(x)⊆Ω, so the zero convention for non-integrable integrands does not arise when either implication's premise holds.
  • Premise fails. If uuu is neither subharmonic nor superharmonic, the corresponding implication is vacuous.
  • Both premises hold. If uuu is both (i.e. C2C^2C2 with Δu=0\Delta u = 0Δu=0 on Ω\OmegaΩ), both implications apply and force u(x)=AB=ASu(x) = A_B = A_Su(x)=AB​=AS​.
Human review
  • Endorsed by Shuze Chen · Oct 2, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 2, 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