Zulip Chat Archive

Stream: Is there code for X?

Topic: Smooth compactly supported functions are dense in L^p


Moritz Doll (Sep 25 2025 at 14:08):

It seems to me that almost everything is there to prove the statement in the title, but it seems that there is quite a bit of glue missing. Even a smooth version of Urysohn's lemma seems to be missing and the easiest proof I see would go through Geometry.Manifold to use a partition of unity, but that is surely overkill. Does someone have a proof lying around?

Michael Rothgang (Sep 25 2025 at 14:42):

There are continuous partitions of unity also - would it be easier to prove "smooth compactly supported functions are dense in continuous ... ones" and "continuous compactly supported functions are dense in L^p"?

Moritz Doll (Sep 25 2025 at 15:36):

Yeah, this is what I first thought, but it seems rather clunky because you end up estimating some norms, which is highly annoying in mathlib, it is already not great on paper. It seems way more elegant to prove smooth Urysohn and repeat the arguments for the continuous version

Antoine Chambert-Loir (Sep 25 2025 at 19:22):

(deleted)

Moritz Doll (Oct 16 2025 at 16:57):

Michael Rothgang said:

There are continuous partitions of unity also - would it be easier to prove "smooth compactly supported functions are dense in continuous ... ones" and "continuous compactly supported functions are dense in L^p"?

I actually ended up going that path, because it turned out to be not as bad as I first thought it was. The crucial estimate happened to be in some random file about uniform integrability.

Michael Rothgang (Oct 16 2025 at 22:24):

Please PR; I also need that statement in the medium term (for Sobolev spaces).

Moritz Doll (Oct 16 2025 at 23:59):

I definitively will, but probably not in the next couple of weeks. In the meantime, the statements are in mathlib4#29819 in the file Mathlib/Analysis/Distribution/DenseLp.lean (fun fact I just defined abstract Sobolev spaces (as a memSobolev) using the Fourier transform on Rn\mathbb{R}^n, but I assume you care more about the manifold case).

Filippo A. E. Nuccio (Oct 17 2025 at 09:41):

The memSobolevis in the same PR?

Michael Rothgang (Oct 17 2025 at 12:20):

I also wondered the same thing :-) It's hidden a bit, but it's there: https://github.com/leanprover-community/mathlib4/blob/ab8752f99b4fda64ed8e40fd42bd656479af6901/Mathlib/Analysis/Distribution/FourierMultiplier.lean#L123

Michael Rothgang (Oct 17 2025 at 12:23):

If f is a complex-valued function defined on a real inner product space and f has temped growth, the PR defines a predicate memSobolev for such functions. In the long run, this could become a lemma "this function is MemLp (in the sense of distributions, not just tempered ones) iff this and that holds".

Michael Rothgang (Oct 17 2025 at 12:23):

(Side remark: I think the definition should be called MemSobolev, by analogy with MemLp.)

Moritz Doll (Oct 17 2025 at 12:57):

I guess it is a better name than all of the foo2, foo3 in DenseLp :laughing: (and what happened to foo1?).. the main problematic point at the moment is that the weight (the function g) is usually (1 + |x|^2)^(s/2), but showing that this is of temperate growth is rather tricky unless s = 2.

Moritz Doll (Oct 17 2025 at 12:57):

The corresponding informal definition is that fHs(Rn)f \in H^s(\mathbb{R}^n) if and only if ξsf^L2(Rn)\langle \xi \rangle^s \hat{f} \in L^2(\mathbb{R}^n) and using Fourier inversion and Plancherel one can translate that to ΛsuL2\Lambda^s u \in L^2, where Λs=F1ξsF\Lambda^s = \mathcal{F}^{-1} \langle \xi \rangle^s \mathcal{F}.

Yongxi Lin (Aaron) (Oct 24 2025 at 06:43):

Moritz Doll said:

I definitively will, but probably not in the next couple of weeks. In the meantime, the statements are in mathlib4#29819 in the file Mathlib/Analysis/Distribution/DenseLp.lean (fun fact I just defined abstract Sobolev spaces (as a memSobolev) using the Fourier transform on Rn\mathbb{R}^n, but I assume you care more about the manifold case).

I checked out this file https://github.com/leanprover-community/mathlib4/blob/cfde5cf76359f0984b0a8d6542dbf273a6abf75e/Mathlib/Analysis/Distribution/DenseLp.lean and it seems like that you are assuming μ\mu is a Haar measure. I don't think you need some kind of translation invariance for the measure to prove density. In general, Cc(X)C_c(X) is dense in Lp(μ)L^p(\mu) for 1p<1\le p<\infty if μ\mu is MeasureTheory.Measure.Regular and XX is locally compact Hausdorff. This is at least true for scalar valued functions, and I guess similar results should hold for vector valued functions.

Moritz Doll (Oct 24 2025 at 08:10):

Thanks for pointing that out. I haven't at all thought about how much the argument generalizes (this is one of the reasons I haven't PR'd it yet). Also @Michael Rothgang please tell me if you do need that result soon, I still have two weeks of other important work, but then I should have time to start PRing this and a lot of other results to mathlib.

Yongxi Lin (Aaron) (Oct 24 2025 at 16:08):

Moritz Doll said:

Thanks for pointing that out. I haven't at all thought about how much the argument generalizes (this is one of the reasons I haven't PR'd it yet). Also Michael Rothgang please tell me if you do need that result soon, I still have two weeks of other important work, but then I should have time to start PRing this and a lot of other results to mathlib.

Let me know if you need some help. I am happy to make several PR about this because I also need these results for my personal projects.

Moritz Doll (Oct 30 2025 at 02:17):

#31079 still wip, but we are getting close to a reviewable PR. @Yongxi Lin (Aaron) the reason to use the Haar measure assumption is that the important parts for the bump function use that. You need a uniform bound for how the convolution with a bump changes differs from the function itself in terms of the sup-norm and the necessary ingredients for that are only proved for Haar measures (I haven't thought about whether you can generalize). I don't know whether anyone really cares about smooth approximation for anything but the Lebesgue measure.

Yongxi Lin (Aaron) (Oct 30 2025 at 03:50):

We do care about smooth approximation in a more general setting! For example if you consider a simple one dimensional ODE of the form (u(x)/x)=1(u(x)/x)'=1, then naturally you should try to find solutions in W1,p(1xdx)W^{1,p}(\frac{1}{x}dx). This kind of singular ODEs/PDEs is why people care about weighted Sobolev space W1,p(wdx)W^{1,p}(wdx), where w0w\ge 0 is a function satisfying the ApA_p weight condition.

Yongxi Lin (Aaron) (Oct 30 2025 at 03:59):

We also consider function space like C([0,T];L2(Rn))C([0,T];L^2(\mathbb{R}^n)) and L1([0,T];L2(Rn))L^1([0,T];L^2(\mathbb{R}^n)) when we consider heat equations or schrodinger equations, so if possible, I think we should also try our best to generalize the density result to certain classes of vector-valued LpL^p spaces.

Moritz Doll (Oct 30 2025 at 04:09):

Yeah, everything is vector-valued, but you do need normed spaces. I think the case of density for weighted Lebesgue measures could be adapted rather easily.

Yongxi Lin (Aaron) (Oct 30 2025 at 04:15):

Oh I see you have already proved the density result for vector-valued functions. That's great!

Yongxi Lin (Aaron) (Oct 30 2025 at 04:16):

and yes I believe for weighted Lebesgue measures you essentially use the same idea of convolution with a smooth bump function.


Last updated: Dec 20 2025 at 21:32 UTC