If $f$ and $g$ are (complex-valued) functions in the Sobolev space $H^s(\mathbb{R}^d)$ then any linear combination $f+\alpha g$ with $\alpha\in\mathbb{C}$ is also in $H^s(\mathbb{R}^d)$ since it is a vector space and, if $s>d/2$, it can be shown that the product $fg$ is in $H^s(\mathbb{R}^d)$ with $$ \|fg\|_{H^s(\mathbb{R}^d)}\lesssim \|f\|_{H^s(\mathbb{R}^d)}\|g\|_{H^s(\mathbb{R}^d)} $$ I was wondering, however, what can be said about the absolute value of a function in $H^s(\mathbb{R}^d)$. Is it true that if $f\in H^s(\mathbb{R}^d)$ then also $|f|\in H^s(\mathbb{R}^d)$? Here $|\cdot|$ denotes the absolute value in $\mathbb{C}$ since $f$ is possibly complex-valued.
I've found two similar questions already (see 1 or 2) but none solved in full generality. If someone could help me by giving a hint or providing a reference I'd very much appreciate it, thank you :)
This works for $s\in (0,1)$. Let $f \in H^s(\mathbb R^d)$. Then $$ [|f|]_{H^s}^2 = \int\int \frac{ \big| |f(x)|-|f(y)| \big|^2}{|x-y|^{n+2s}} dxdy \le \int\int \frac{ \big| f(x)-f(y) \big|^2}{|x-y|^{n+2s}} = [f]_{H^s}^2 , $$ and $|f|\in H^s$.