Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.42 — C_c^∞(ℝ̄ⁿ₊) is dense in W^{k,p}(ℝⁿ₊)

Proved
HunterPDE.Compactness.halfSpace_density

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

densityp2o-batch-books5p2o-gran-per-chapterp2o-plan-bookp2o-v1pdesobolev-spaces

The space Cc∞(R‾+n)C_c^\infty(\overline{\mathbb{R}}^n_+)Cc∞​(R+n​) of smooth functions is dense in Wk,p(R+n)W^{k,p}(\mathbb{R}^n_+)Wk,p(R+n​): for every f∈Wk,p(R+n)f \in W^{k,p}(\mathbb{R}^n_+)f∈Wk,p(R+n​) and ε>0\varepsilon > 0ε>0 there is ϕ∈Cc∞(R‾+n)\phi \in C_c^\infty(\overline{\mathbb{R}}^n_+)ϕ∈Cc∞​(R+n​) with

∥f−ϕ∥Wk,p(R+n)<ε.\|f - \phi\|_{W^{k,p}(\mathbb{R}^n_+)} < \varepsilon.∥f−ϕ∥Wk,p(R+n​)​<ε.

The approximants are smooth up to the boundary but need not vanish there. This is what makes the trace map (Theorem 3.44) definable by continuity.

Formalization Note. The dimension is n=m+1n = m + 1n=m+1, k∈Nk \in \mathbb{N}k∈N, and 1≤p<∞1 \le p < \infty1≤p<∞. The page gives no range of ppp; this is the range of the whole-space analogue, Theorem 3.24, and density fails for p=∞p = \inftyp=∞. R‾+n\overline{\mathbb{R}}^n_+R+n​ is the closed half-space, not the open one.

Preamble
import Mathlib
import Definitions.Def_HunterPDE_Compactness_Sobolev
import Definitions.Def_HunterPDE_Compactness_HalfSpace

open MeasureTheory
open scoped ENNReal
Formal statement
namespace HunterPDE.Compactness

/-- Theorem 3.42 of Hunter, *Notes on PDEs* (revised 6/18/2014), p. 72: the space `C_c^∞(ℝ̄ⁿ₊)`
of smooth functions (smooth up to the boundary, vanishing on `ℝ̄ⁿ₊` outside a compact set, not
necessarily zero on `∂ℝⁿ₊`) is dense in `W^{k,p}(ℝⁿ₊)`: every `f ∈ W^{k,p}(ℝⁿ₊)` is approximated
in the `W^{k,p}(ℝⁿ₊)` norm by such functions. Dimension `n = m + 1`, `k ∈ ℕ`, and `1 ≤ p < ∞`
(the range of the whole-space analogue, Theorem 3.24; density fails for `p = ∞`). -/
theorem halfSpace_density (m k : ℕ) (p : ℝ≥0∞) (hp : 1 ≤ p) (hp' : p ≠ ∞)
    (f : EuclideanSpace ℝ (Fin (m + 1)) → ℝ) (hf : MemW k p (upperHalfSpace m) f)
    (ε : ℝ≥0∞) (hε : 0 < ε) :
    ∃ φ : EuclideanSpace ℝ (Fin (m + 1)) → ℝ, IsSmoothCompactClosedHalfSpace φ ∧
      sobolevNorm k p (upperHalfSpace m) (f - φ) < ε := by sorry

end HunterPDE.Compactness
Source
Hunter, Notes on Partial Differential Equations (revised 6/18/2014), p. 72, Theorem 3.42
Read-back

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

Notation. Let m,k∈Nm, k \in \mathbb{N}m,k∈N, and let p∈[1,∞)p \in [1,\infty)p∈[1,∞): the hypotheses say 1≤p1 \le p1≤p and p≠∞p \ne \inftyp=∞.

  • H={x∈Rm+1:xm+1>0}H = \{x \in \mathbb{R}^{m+1} : x_{m+1} > 0\}H={x∈Rm+1:xm+1​>0} is the open upper half-space.
  • H‾={x:xm+1≥0}\overline{H} = \{x : x_{m+1} \ge 0\}H={x:xm+1​≥0} is its closure.
  • A\mathcal{A}A is the set of multi-indices α∈Nm+1\alpha \in \mathbb{N}^{m+1}α∈Nm+1 with ∣α∣≤k|\alpha| \le k∣α∣≤k.

Sobolev membership. "f∈Wk,p(H)f \in W^{k,p}(H)f∈Wk,p(H)" means: for each α∈A\alpha \in \mathcal{A}α∈A there is a g∈Lp(H)g \in L^p(H)g∈Lp(H) satisfying an imported predicate "weak α\alphaα-derivative of fff on HHH". That predicate's definition is not included.

Sobolev norm. ∥u∥k,p,H\|u\|_{k,p,H}∥u∥k,p,H​ is built from imported chosen functions ∂Hαu\partial^\alpha_H u∂Hα​u, whose definition is not included:

∥u∥k,p,H=(∑α∈A∫H∣∂Hαu∣p dx)1/p∈[0,∞].\|u\|_{k,p,H} = \Bigl(\sum_{\alpha \in \mathcal{A}} \int_H |\partial^\alpha_H u|^p\,dx\Bigr)^{1/p} \in [0,\infty].∥u∥k,p,H​=(α∈A∑​∫H​∣∂Hα​u∣pdx)1/p∈[0,∞].

Claim. Let f:Rm+1→Rf : \mathbb{R}^{m+1} \to \mathbb{R}f:Rm+1→R with f∈Wk,p(H)f \in W^{k,p}(H)f∈Wk,p(H), and let ε∈(0,∞]\varepsilon \in (0,\infty]ε∈(0,∞]. Then there is a function φ:Rm+1→R\varphi : \mathbb{R}^{m+1} \to \mathbb{R}φ:Rm+1→R with both of these properties:

  1. φ\varphiφ is C∞C^\inftyC∞ within the closed set H‾\overline{H}H (differentiability relative to H‾\overline{H}H at its boundary points), and there is a compact KKK with φ=0\varphi = 0φ=0 on H‾∖K\overline{H} \setminus KH∖K. Nothing is required of φ\varphiφ outside H‾\overline{H}H, and φ\varphiφ need not vanish on {xm+1=0}\{x_{m+1} = 0\}{xm+1​=0}.
  2. The pointwise difference f−φf - \varphif−φ satisfies ∥f−φ∥k,p,H<ε\|f - \varphi\|_{k,p,H} < \varepsilon∥f−φ∥k,p,H​<ε.

The statement does not assert φ∈Wk,p(H)\varphi \in W^{k,p}(H)φ∈Wk,p(H) or f−φ∈Wk,p(H)f - \varphi \in W^{k,p}(H)f−φ∈Wk,p(H).

Degenerate cases.

  • k=0k = 0k=0. A={0}\mathcal{A} = \{0\}A={0}, and the norm is the Lp(H)L^p(H)Lp(H) norm of the imported ∂H0(f−φ)\partial^0_H(f-\varphi)∂H0​(f−φ).
  • m=0m = 0m=0. H=(0,∞)⊂RH = (0,\infty) \subset \mathbb{R}H=(0,∞)⊂R.
  • ε=∞\varepsilon = \inftyε=∞. The claim only asks for some such φ\varphiφ with ∥f−φ∥k,p,H\|f-\varphi\|_{k,p,H}∥f−φ∥k,p,H​ finite.
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