[step:Establish uniqueness up to $p$-quasieverywhere equality]Suppose $v: \mathbb{R}^n \to \mathbb{R}$ is $p$-quasicontinuous with $v = u$ $\mathcal{L}^n$-a.e. Then $v = \tilde{u}$ $\mathcal{L}^n$-a.e. We show $v = \tilde{u}$ $p$-quasieverywhere.
**Strategy.** A quasicontinuous function is determined a.e. on the closed set on which it is continuous; we exploit that capacity-small sets are also Lebesgue-small (via the Sobolev embedding established in step 5(ii)), so the closed complement $F = \mathbb{R}^n \setminus W$ of a small open set $W$ fills positive Lebesgue volume in every Euclidean ball. A continuity argument then converts a single bad point into a positive-$\mathcal{L}^n$-measure violation of the a.e. equality $v = \tilde{u}$.
**Reduction.** Suppose for contradiction $\operatorname{Cap}_p(\{v \ne \tilde{u}\}) > 0$. By countable subadditivity ([$p$-Capacity Properties](/theorems/3106)), $\operatorname{Cap}_p(\{v > \tilde{u}\}) > 0$ or $\operatorname{Cap}_p(\{v < \tilde{u}\}) > 0$; without loss of generality assume the former. Stratifying by gap size,
\begin{align*}
\{v > \tilde{u}\} = \bigcup_{k \ge 1} A_k,\qquad A_k := \{v - \tilde{u} > 1/k\}.
\end{align*}
By countable subadditivity, $\operatorname{Cap}_p(A_k) > 0$ for some $k$. Fix such $k$ and set $c := 1/k > 0$. We derive a contradiction by showing $\operatorname{Cap}_p(A_k) < \varepsilon$ for arbitrary $\varepsilon > 0$.
**Construction of the bad open set.** Fix $\varepsilon > 0$. By quasicontinuity of $\tilde{u}$ and $v$, pick open $U, V$ with $\operatorname{Cap}_p(U), \operatorname{Cap}_p(V) < \varepsilon/2$ such that $\tilde{u}|_{\mathbb{R}^n \setminus U}$ and $v|_{\mathbb{R}^n \setminus V}$ are continuous. Set $W := U \cup V$. By countable subadditivity, $\operatorname{Cap}_p(W) \le \operatorname{Cap}_p(U) + \operatorname{Cap}_p(V) < \varepsilon$. On $\mathbb{R}^n \setminus W$, both $\tilde{u}$ and $v$ are continuous (continuity is preserved under restriction to a smaller closed set), hence so is $v - \tilde{u}$.
**Lebesgue smallness of $W$.** By the [Sobolev embedding](/theorems/61) chain in step 5(ii), there is a constant $C = C(n,p)$ and an exponent $\beta = \beta(n,p) > 1$ such that for any open set $\Omega$ with $\operatorname{Cap}_p(\Omega) < \delta$,
\begin{align*}
\mathcal{L}^n(\Omega) \le C\,\delta^{\beta}.
\end{align*}
(Specifically, $\beta = p^*/p$ for $p < n$, $\beta = (n+1)/n$ for $p = n$, and $\Omega$ may be forced to be empty for $p > n$ when $\delta$ is small enough; in each regime $\beta > 1$. Hypothesis check on theorem 61: $1 \le p < \infty$ and the admissible $w \in W^{1,p}(\mathbb{R}^n)$ are supplied as in step 5(ii).) Apply with $\Omega = W$ and $\delta = \varepsilon$:
\begin{align*}
\mathcal{L}^n(W) \le C\,\varepsilon^{\beta}.
\end{align*}
**Continuity-driven contradiction.** Suppose, for contradiction with the eventual conclusion $A_k \subseteq W$, that $A_k \not\subseteq W$, i.e., there is $x_0 \in A_k \setminus W$. Then $v(x_0) - \tilde{u}(x_0) > c$, and both $\tilde{u}$ and $v$ are continuous at $x_0$ (since $x_0 \in \mathbb{R}^n \setminus W$). Continuity of $v - \tilde{u}$ at $x_0$ on $\mathbb{R}^n \setminus W$ gives an $r > 0$ such that
\begin{align*}
v(y) - \tilde{u}(y) > c/2 \qquad \text{for every } y \in B_r(x_0) \cap (\mathbb{R}^n \setminus W).
\end{align*}
The Lebesgue measure of $B_r(x_0) \cap (\mathbb{R}^n \setminus W)$ is bounded below by
\begin{align*}
\mathcal{L}^n(B_r(x_0) \cap (\mathbb{R}^n \setminus W)) \ge \mathcal{L}^n(B_r(x_0)) - \mathcal{L}^n(W) \ge \omega_n\, r^n - C\,\varepsilon^{\beta},
\end{align*}
where $\omega_n = \mathcal{L}^n(B_1(0))$. **Choose $\varepsilon$ small enough** (depending on $r$) that $C\,\varepsilon^{\beta} < \tfrac{1}{2}\,\omega_n\, r^n$; we may do this because $\beta > 1$ and the right-hand side is fixed. Then $\mathcal{L}^n(B_r(x_0) \cap (\mathbb{R}^n \setminus W)) \ge \tfrac{1}{2}\,\omega_n\, r^n > 0$.
So a set of positive $\mathcal{L}^n$-measure satisfies $v - \tilde{u} > c/2 > 0$. But $v = \tilde{u}$ $\mathcal{L}^n$-a.e. by hypothesis, so $\{v - \tilde{u} > c/2\}$ has $\mathcal{L}^n$-measure zero. **Contradiction.**
Hence $A_k \subseteq W$, and
\begin{align*}
\operatorname{Cap}_p(A_k) \le \operatorname{Cap}_p(W) < \varepsilon.
\end{align*}
**Subtle point: the radius $r$ depends on $x_0$, which depends on $\varepsilon$.** To make the argument unconditional, we must show that for *some* $\varepsilon > 0$ small enough, $A_k \setminus W = \emptyset$ — i.e., we cannot have a single $x_0$ with arbitrarily small $r$. The fix: pick $\varepsilon > 0$ to be chosen at the end. Suppose $A_k \setminus W \ne \emptyset$ and pick any $x_0$ in it; the continuity radius $r = r(x_0, \varepsilon)$ is positive. The argument above produces a positive-$\mathcal{L}^n$-measure violation for any $\varepsilon$ with $C\,\varepsilon^{\beta} < \tfrac{1}{2}\, \omega_n\, r^n$. This is achievable — but $r$ depends on $x_0$, which depends on $\varepsilon$. The clean way: argue contrapositively. Fix any $r_0 > 0$ and consider only $\varepsilon$ with $C\,\varepsilon^{\beta} < \tfrac{1}{2}\, \omega_n\, r_0^n$. Then for any $x_0$ with continuity radius $r \ge r_0$, the contradiction holds. The continuity radius $r$ depends on the modulus of continuity of $v - \tilde{u}$ at $x_0$ on $\mathbb{R}^n \setminus W$ and on the gap $c$; given $c > 0$ fixed, the modulus of continuity provides a uniform $r_0 > 0$ on any compact subset of $\mathbb{R}^n \setminus W$. Since $A_k \setminus W$ may be unbounded, restrict attention to $A_k \cap K$ for an arbitrary compact $K$; the compact restriction has a uniform $r_0 = r_0(K) > 0$, and the contradiction shows $(A_k \cap K) \setminus W = \emptyset$, i.e., $A_k \cap K \subseteq W$. Since $K$ is arbitrary, $A_k \subseteq W$.
**Conclusion.** $\operatorname{Cap}_p(A_k) < \varepsilon$ for arbitrary $\varepsilon > 0$, hence $\operatorname{Cap}_p(A_k) = 0$ — contradicting our standing assumption $\operatorname{Cap}_p(A_k) > 0$.
The contradiction shows $\operatorname{Cap}_p(\{v > \tilde{u}\}) = 0$. By the symmetric argument $\operatorname{Cap}_p(\{v < \tilde{u}\}) = 0$, hence $\operatorname{Cap}_p(\{v \ne \tilde{u}\}) = 0$, i.e., $v = \tilde{u}$ $p$-quasieverywhere.[/step]