> [!theorem]
>
> Let $U \subset \real^d$ be an [[Open Set|open set]], $W^{k, p}(U)$ be the [[Sobolev Space|Sobolev space]] on $U$, $u \in W^{k, p}(U)$ and $p \in [1, \infty)$. Let $\phi \in L^1 \cap C_c^\infty$ with $\int \phi = 1$ be a [[Space of Smooth Functions|smooth]] [[Mollifier|mollifier]] supported in $B(0, 1)$. Let
> $
> U_t = \bracs{x \in U: d(x, \partial U) > t}
> $
> be a thinning of the open set, and $u^t = \phi_t * u$ on $U_t$. Then
> 1. $u^t \in C^\infty(U_\varepsilon)$.
> 2. $D^\alpha u^t = \phi_t * D^\alpha u$ for all $\alpha$ with $\abs{\alpha} \le k$.
> 3. $u^t \to u$ in $W_{\text{loc}}^{k, p}(U)$ as $t \to 0$.
>
> In particular, if $\supp{u} \subset \subset U$, then $u^t$ admits an extension to $C_c^\infty(U)$ for sufficiently small $t$, and $u \in W^{k, p}_p(U)$.
>
> *Proof*. Let $\alpha$ be a multi-index with $\abs{\alpha} \le k$ and $x \in U_t$, then by expanding through the chain rule. Fix $x \in \real^d$, then
> $
> \begin{align*}
> D^\alpha u^t(x) &= \int_U (D^\alpha \phi_t)(x - y)u(y)dy \\
> &= (-1)^{\abs \alpha}\int_U \braks{D^{\alpha}_y\phi_t(x - y)} u(y)dy
> \end{align*}
> $
> By definition of the weak derivative,
> $
> \int_U \braks{D^{\alpha}_y\phi_t(x - y)} u(y)dy = (-1)^{\abs{\alpha}}\int_U \phi_t(x - y) D^{\alpha}_yu(y)dy
> $
> Plugging this back yields
> $
> D^\alpha u^t(x) = \int_U \phi_t(x - y) D^{\alpha}_yu(y)dy = \phi_t * D^\alpha u
> $
> Since the strong derivative coincides with the weak derivative when it exists, $D^\alpha u^t = \phi_t * D^\alpha u$.
>
> As $D^\alpha u^t = \phi_t * D^\alpha u \to D^\alpha u$ in $L^p(V)$ as $t \to 0$ for any $V \subset \subset U$, $u^t \to u$ in $W_{\text{loc}}(k, p)(U)$.
> [!theorem]
>
> Let $U$ be a bounded open set, and $u \in W^{k, p}(U)$ for some $1 \le p < \infty$, then there exists $\seq{u_n} \subset C^\infty(U) \cap W^{k, p}(U)$ such that $u_n \to u$ in $W^{k, p}(U)$.
>
> *Proof*. Fix $\varepsilon > 0$. Let $\seq{U_i}$ and $\seq{V_i}$ be a compactly contained, locally finite [[Open Cover|open cover]] of $U$ such that $V_i \subset \subset U_i$ for each $i \in \nat$ (which exists by [[Sigma-Compact LCH Space|sigma-compact LCH]] magic). This additional layer of compactly containedness provides room for using a mollifier.
>
> Let $\seq{\varphi_i}$ be a smooth [[Partition of Unity|partition of unity]] subordinate to $\seq{V_i}$. Since $\varphi_i$ is smooth, $\varphi_iu \in W^{k, p}(U)$ and is supported in $V_i$.
>
> Let $\phi \in L^1$ with $\int \phi = 1$ and $\supp{\phi} \subset B(0, 1)$ be a smooth mollifier. For any $t_i > 0$, define $u_i = \phi_{t_i} * (\varphi_i u)$. Let $t_i > 0$ such that
> $
> \supp{u_i} \subset U_i \quad \norm{u_i - \varphi_i u}_{W^{k, p}(U)} < \varepsilon/2^i
> $
> by compact support, we can convert the restriction of the norm to $U_i$ to $W^{k, p}(U)$. [[Gluing Lemma|Gluing]] $u_i$ with the zero function on $\supp{u_i}^c$ shows that $u_i \in C^\infty(U)$.
>
> Let $v = \sum_{i \in \nat}u_i$, then $v \in C^\infty(U)$ because $\seq{u_i}$ is subordinate to $\seq{U_i}$, and around each point the sum is over finitely many terms. Let $V \subset \subset U$ be a compactly contained open sets, then by local finiteness, the sum is over finitely many terms on $V$. Hence
> $
> \norm{v - u}_{W^{k, p}(V)} \le \sum_{i \in \nat}\norm{u_i - \varphi_iu}_{W^{k, p}(U)} \le \varepsilon
> $
> Taking a supremum over all $V \subset \subset U$ yields the result.
> [!theorem]
>
> Let $U$ be a bounded open set such that $\partial U$ [[Differentiable Boundary|is of class]] $C^1$. Let $u \in W^{k, p}(U)$ with $1 \le p < \infty$, and $\partial x \in \partial U$ be a [[Boundary|boundary]] point, then there exists a neighbourhood $V_0 \in \cn^o(\partial x)$ and a sequence $\seq{u_n} \subset UC^\infty(V_0 \cap U)$ such that $u_n \to u$ in $W^{k, p}(V_0 \cap U)$.
>
> *Proof*. Since $\partial U \in C^1$, under a suitable orientation, there exists $r > 0$ and $\gamma: \real^{d - 1} \to \real$ such that
> $
> U \cap B(\partial x, r) = \bracs{x \in B(\partial x, r): x_n > \gamma(x_1, \cdots, x_{n - 1})}
> $
> Let $V = U \cap B(x, r/2)$, and for any $x \in V$ and $\lambda, t > 0$, define a shifted point $x_t = x + \lambda t e_n$. There exists $\lambda > 0, t' > 0$ such that for any $t \in (0, t')$, $B(x_t, t) \subset U \cap B(\partial x, r)$ (see [[Differentiable Boundary]]).
>
>
> ![[mollify_boundary.png]]
>
> Let $\phi \in C_c^\infty \cap L^1$ with $\int \phi = 1$ and $\supp \phi \subset B(0, 1)$ be a standard mollifier. For any $x \in V$ close to the boundary, we can approximate the value of the mollification with a point slightly further into the boundary (so the support of the mollifier stays within $U$). Define $u_t(x) = u(x_t)$ such that $u_t = \tau_{-\lambda te_n}u$ is defined on $U - \lambda t e_n$. Let
> $
> \begin{align*}
> v_t(x) = \phi_t * u_t(x) &= \int_{B(x, t)}\phi_t(x - y)u_t(y)dy \\
> &= \int_{B(x_t, t)}\phi_t(x_t - y)u(y)dy
> \end{align*}
> $
> then since $B(x_t, t) \subset U \cap B(\partial x, r)$ for all $x \in V$, $B(x_t, t) \subset U \cap B(\partial x, r)$ for all $x \in \ol{V}$ as well. Thus $\nu_t$ is defined on $\ol{V}$. Moreover, if we extend $u_t$ to $\real^d$ by
> $
> \ol{\mu_t}(x) = \begin{cases}
> u_t(x) &x \in U - \lambda te_n \\
> 0 &x \not\in U - \lambda te_n
> \end{cases}
> \quad
> \ol{u_t(x)} = \phi_t * \ol{u_t}(x)
> $
> then $\ol{u_t} \in C^\infty(\real^d)$, so $v_t \in C^\infty(\ol{V})$. As a convolution between a $L^p$ and $L^q$ function, $v_t$ is also bounded and uniformly continuous.
>
> Let $\alpha$ be a multi-index with $\abs{\alpha} \le k$,
> $
> \norm{D^\alpha v_t - D^\alpha u}_{L^p(V)} \le \norm{D^\alpha v_t - D^\alpha u_t}_{L^p(V)} + \norm{D^\alpha u_t - D^\alpha u}_{L^p(V)}
> $
> For the first term, by filling in $0$ outside of the domain of $u_t$ and undoing the translation,
> $
> \begin{align*}
> \norm{D^\alpha v_t - D^\alpha u_t}_{L^p(V)} &\le \norm{D^\alpha v_t - D^\alpha u_t}_{p} \le \norm{D^\alpha(\phi_t * u_t) - D^\alpha u_t}_p \\
> &\le \norm{D^\alpha(\phi_t * u) - D^\alpha u}_p \to 0
> \end{align*}
> $
> as $t \to 0$. For the second term, since translation is continuous in $L^p$, $\norm{D^\alpha u_t - D^\alpha u}_{L^p(V)} \to 0$ as well. Therefore $v_t \to u$ in $W^{k, p}(V)$.
> [!theorem]
>
> Let $U$ be a bounded open set such that $\partial U$ is of class $C^1$. Let $u \in W^{k, p}(U)$ with $1 \le p < \infty$, then there exists a sequence $\seq{u_n} \in C^\infty(\ol{U})$ such that $u_n \to u$ in $W^{k, p}(U)$.
>
> *Proof*. Let $\eps > 0$. By compactness of $\partial U$, there exists $\seqf{x_i}$, $V_i \in \cn^o(x_i)$, and $u_i \in C^\infty(\ol{V_i})$ such that $V_i \subset U$, $\bigcup_{i = 1}^nV_i \supset \partial U$, and $\norm{u_i - u}_{W^{k, p}(V_i)} < \eps/2^i$.
>
> Let $V = \bigcup_{i = 1}^nV_i$, then $V_0 = U \setminus V \subset \subset U$, and there exists $u_0 \in C^\infty(\ol{V_0})$ such that $\norm{u_0 - u}_{W^{k, p}(\ol{V_0})} < \eps/2^{n + 1}$. Let $\bracs{\phi_i}_0^n$ be a smooth partition of unity on $\ol{U}$ subordinate to $\bracs{V_0}_1^n$. Let $v = \sum_{i = 0}^n \phi_iv_i$, then $v \in C^\infty(\ol{U})$. For each $\phi_i$ there exists $C_{\phi_i, k, d} \ge 0$ such that $\norm{\phi_i w}_{W^{k, p}} \le C_{\phi_i, k, d}$ for all $w \in W^{k, p}$. Let $C = \max_{0 \le i \le n}C_{\phi_i, k, d}$, then since $u = \sum_{i = 0}^n\phi_i u$,
> $
> \begin{align*}
> \norm{v - u}_{W^{k, p}(U)} &\le \sum_{i = 0}^n\norm{\phi_i v_i - \phi_iu}_{W^{k, p}(V_i)} \\
> &\le \sum_{i = 0}^n C_{\phi_i, k, d}\norm{v_i - u}_{W^{k, p}(V_i)} \\
> &\le C(n + 1)\eps
> \end{align*}
> $
> [!theorem]
>
> Let $1 \le p < \infty$, $k \in \nat$, and $f \in W^{k, p}(\real^d)$, then there exists $\seq{f_n} \subset C_c^\infty(\real^d)$ such that $f_n \to f$ in $W^{k, p}(\real^d)$.
>
> *Proof*. Assume without loss of generality that $f \in C^\infty(\real^d)$. Let $\phi \in C_c^\infty(\real^d)$ such that $\phi|_{B(0, 1)} = 1$ and $\supp{\phi} \subset B(0, 2)$. For each $n \in \nat$, let $\phi_n(x) = \phi(x/n)$ and $f_n = f \cdot \phi_n$, then $\norm{D^\alpha \phi_n}_u \le \norm{D^\alpha\phi}_u$ for all $n \in \nat$ and $\alpha \in \nat_0^d$ by the chain rule. Therefore
> $
> \begin{align*}
> \norm{f - f_n}_{W^{k, p}(\real^d)} &\le \norm{f - f_n}_{W^{k, p}(\overline{B(0, n))}^c} \\
> &\le \paren{1 + \sum_{\abs{\alpha} \le k}\norm{D^\alpha \phi}_u}\norm{f}_{W^{k, p}(\overline{B(0, n))}^c} \to 0
> \end{align*}
> $
> as $n \to \infty$.