[proofplan]
We first reduce the vector-valued statement $f: \mathbb{R}^n \to \mathbb{R}^m$ to the scalar case $m = 1$ by working componentwise and converting between $\mathcal{H}^n$ and $\mathcal{L}^n$ via $\mathcal{H}^n = c_n \mathcal{L}^n$ on Borel subsets of $\mathbb{R}^n$, applying the scalar approximation to each $f_i$ at tolerance $\varepsilon/(c_n m)$ and taking $g = (g_1, \ldots, g_m)$. The scalar argument reduces $C^1$ approximation to Whitney's extension theorem via Lusin's theorem, with Egorov's theorem supplying the uniformity needed to verify the Whitney compatibility hypothesis (W). By Rademacher's theorem the gradient $\nabla f$ exists $\mathcal{L}^n$-a.e. on a full-measure differentiability set $D$, with $|\nabla f| \le L$ a.e. Apply Lusin's theorem to extract a closed set on which $\nabla f$ is continuous, and refine by inner regularity to a closed set $K \subseteq D$ with $\mathcal{L}^n(\mathbb{R}^n \setminus K) < \varepsilon'/2$ (using the scalar tolerance $\varepsilon'$). To verify the Whitney $C^1$ compatibility (W) — uniform $R(a, b) \to 0$ as $|a - b| \to 0$ — average the Lebesgue-density bad-set bound to a measurable function $\rho_r(a) := \fint_{B(a, r)} \mathcal{L}^1(T^c(a, b))\, db$ on $K$, which converges pointwise to $0$ for $a \in K^*$ (density-one points). Since $\rho_r$ is not monotone in $r$, pass to the monotone upper envelope $\widetilde \rho_r(a) := \sup_{0 < s \le r} \rho_s(a)$, apply Egorov to the decreasing sequence $\widetilde \rho_{1/k}$ on a compact $H$, and extract a closed $\widetilde K \subseteq H$ with $\mathcal{L}^n(H \setminus \widetilde K) < \varepsilon'/4$ on which $\widetilde \rho_{1/k} \to 0$ uniformly. The dominating bound $\rho_r \le \widetilde \rho_r \le \widetilde \rho_{1/k}$ for $r \le 1/k$ then transfers uniformity to the continuous parameter $r \to 0^+$. Whitney's theorem (Federer 3.1.14, Evans-Gariepy 6.5 Theorem 1) applies: it produces $g \in C^1(\mathbb{R}^n)$ with $g = f$ and $\nabla g = \nabla f$ on $\widetilde K$. The Lipschitz bound is then a *separate, structural* consequence of the Whitney partition-of-unity construction: $\|\nabla g\|_{L^\infty} \le C(n)(\sup_{\widetilde K} |\nabla f| + \sup_{a \ne b} |R(a, b)|) \le C(n)(L + 2L) = C'(n) L$, where the elementary $|R| \le 2L$ comes from $f$ being $L$-Lipschitz. Step 2's role is to make (W) hold (the *gate* for Whitney); Step 4's role is to read off the Lipschitz constant from the construction's structure. Total scalar bad measure $< \varepsilon'$, hence total vector bad measure under $\mathcal{H}^n$ is $< \varepsilon$.
[/proofplan]
custom_env
Unknown
[step:Reduce vector-valued to scalar via the components $f_i$]
Let $f: \mathbb{R}^n \to \mathbb{R}^m$ be Lipschitz with $L := \operatorname{Lip}(f) < \infty$. Write $f = (f_1, \ldots, f_m)$, so that each component $f_i: \mathbb{R}^n \to \mathbb{R}$ is Lipschitz with $\operatorname{Lip}(f_i) \le L$ (the $i$-th component is the composition of $f$ with the $1$-Lipschitz coordinate projection $\pi_i: \mathbb{R}^m \to \mathbb{R}$).
We use the comparability of $\mathcal{H}^n$ and $\mathcal{L}^n$ on Borel subsets of $\mathbb{R}^n$: by [Federer 2.10.35 / Evans-Gariepy 2.2 Theorem 2](/theorems/hausdorff-equals-lebesgue), there is a dimensional constant $c_n > 0$ such that $\mathcal{H}^n(B) = c_n \mathcal{L}^n(B)$ for every Borel set $B \subseteq \mathbb{R}^n$ ($c_n = 1$ in some normalisations, $c_n = \omega_n / 2^n$ in Federer's; the precise value is irrelevant to the argument).
Fix $\varepsilon > 0$. For each $i = 1, \ldots, m$ we apply the scalar version of the theorem (the remainder of this proof, Steps below) to $f_i$ with tolerance $\varepsilon/(c_n m)$ in place of $\varepsilon$, obtaining $g_i \in C^1(\mathbb{R}^n)$ with
\begin{align*}
\mathcal{L}^n(\{x \in \mathbb{R}^n : f_i(x) \ne g_i(x)\}) < \varepsilon/(c_n m).
\end{align*}
Set $g := (g_1, \ldots, g_m): \mathbb{R}^n \to \mathbb{R}^m$, so that $g \in C^1(\mathbb{R}^n; \mathbb{R}^m)$. Since $f(x) \ne g(x)$ implies $f_i(x) \ne g_i(x)$ for some $i$,
\begin{align*}
\{x : f(x) \ne g(x)\} \subseteq \bigcup_{i=1}^m \{x : f_i(x) \ne g_i(x)\},
\end{align*}
so by countable subadditivity of $\mathcal{L}^n$,
\begin{align*}
\mathcal{L}^n(\{f \ne g\}) \le \sum_{i=1}^m \mathcal{L}^n(\{f_i \ne g_i\}) < m \cdot \varepsilon/(c_n m) = \varepsilon/c_n.
\end{align*}
The set $\{f \ne g\}$ is Borel (as $f, g$ are continuous, the difference $f - g$ is continuous, and $\{f \ne g\} = (f - g)^{-1}(\mathbb{R}^m \setminus \{0\})$ is the preimage of an open set), so applying $\mathcal{H}^n = c_n \mathcal{L}^n$,
\begin{align*}
\mathcal{H}^n(\{f \ne g\}) = c_n \mathcal{L}^n(\{f \ne g\}) < c_n \cdot \varepsilon/c_n = \varepsilon,
\end{align*}
which is the conclusion of the theorem. It remains to prove the scalar case.
**Henceforth WLOG $m = 1$.** For the rest of the proof we assume $f: \mathbb{R}^n \to \mathbb{R}$ is Lipschitz with $\operatorname{Lip}(f) \le L$, and we produce $g \in C^1(\mathbb{R}^n)$ with $\mathcal{L}^n(\{f \ne g\}) < \varepsilon'$ for any prescribed $\varepsilon' > 0$ (the vector-valued reduction above takes $\varepsilon' = \varepsilon/(c_n m)$).
[/step]
custom_env
Unknown
[step:Reduce to differentiability and apply Lusin's theorem to $\nabla f$]
Throughout the scalar argument, $f: \mathbb{R}^n \to \mathbb{R}$ is Lipschitz with $L := \operatorname{Lip}(f) < \infty$ and $\varepsilon' > 0$ is the prescribed scalar tolerance (a placeholder for $\varepsilon/(c_n m)$ from the vector reduction step). By [Rademacher's theorem](/theorems/rademacher) there is a Borel set $D \subseteq \mathbb{R}^n$ with $\mathcal{L}^n(\mathbb{R}^n \setminus D) = 0$ such that $f$ is classically differentiable at every $a \in D$, with gradient $\nabla f(a) \in \mathbb{R}^n$. Extend $\nabla f$ to all of $\mathbb{R}^n$ by setting $\nabla f(x) := 0$ for $x \in \mathbb{R}^n \setminus D$.
The extended function $\nabla f$ is Lebesgue measurable: away from $D$ it is constant, and on $D$ each component is the pointwise limit (where it exists) of difference quotients $h^{-1}(f(x + h e_i) - f(x))$ as $h \to 0$ along a countable sequence, hence a Borel function. The Lipschitz bound gives $|\nabla f(x)| \le L$ for $\mathcal{L}^n$-a.e. $x \in D$ (equivalently for $\mathcal{L}^n$-a.e. $x \in \mathbb{R}^n$), so
\begin{align*}
\nabla f \in L^\infty(\mathbb{R}^n; \mathbb{R}^n), \qquad \|\nabla f\|_{L^\infty} \le L.
\end{align*}
Apply [Lusin's theorem](/theorems/lusin) componentwise (in the form: for any $\sigma$-finite Borel measure on a metric space and any measurable function, for each $\eta > 0$ there is a closed set off which the measure is $< \eta$ and on which the restriction is continuous; we apply it on each ball $B(0, k)$ and take a countable intersection trick, or directly use the version for $\mathcal{L}^n$ on $\mathbb{R}^n$ which is $\sigma$-finite Radon): there exists a closed set $K_0 \subseteq \mathbb{R}^n$ with
\begin{align*}
\mathcal{L}^n(\mathbb{R}^n \setminus K_0) < \varepsilon'/4
\end{align*}
on which $\nabla f|_{K_0}: K_0 \to \mathbb{R}^n$ is continuous.
To ensure $K_0 \subseteq D$, refine by inner regularity. The set $K_0 \cap D$ is Lebesgue measurable with $\mathcal{L}^n(K_0 \setminus (K_0 \cap D)) = 0$. By inner regularity of $\mathcal{L}^n$ (every Lebesgue measurable set of finite-or-$\sigma$-finite measure is approximated from within by closed sets), there exists a closed set $K \subseteq K_0 \cap D$ with
\begin{align*}
\mathcal{L}^n((K_0 \cap D) \setminus K) < \varepsilon'/4.
\end{align*}
Then $K$ is closed, $K \subseteq D$, and
\begin{align*}
\mathcal{L}^n(\mathbb{R}^n \setminus K) &\le \mathcal{L}^n(\mathbb{R}^n \setminus K_0) + \mathcal{L}^n(K_0 \setminus D) + \mathcal{L}^n((K_0 \cap D) \setminus K) \\
&< \varepsilon'/4 + 0 + \varepsilon'/4 = \varepsilon'/2.
\end{align*}
Since $K \subseteq K_0$, $\nabla f|_K: K \to \mathbb{R}^n$ is continuous; since $K \subseteq D$, $f$ is classically differentiable at every $a \in K$ with derivative $\nabla f(a)$.
[/step]
custom_env
Unknown
[step:Verify the Whitney $C^1$ compatibility condition with a uniform $\delta$ via Egorov]
We verify the Whitney $C^1$ compatibility condition on a closed subset $\widetilde K \subseteq K$ obtained by removing a small additional bad set: for each compact $\widetilde H \subseteq \widetilde K$ and each $\varepsilon' > 0$ there exists $\delta > 0$ such that for all $a, b \in \widetilde H$ with $0 < |a - b| < \delta$,
\begin{align*}
|f(b) - f(a) - \nabla f(a) \cdot (b - a)| \le \varepsilon' |b - a|.
\end{align*}
To handle the uniform-$\delta$ requirement, we apply [Egorov's theorem](/theorems/egorov) to a sequence of measurable functions on a compact subset of $K$.
**Setup of $H$ and modulus of continuity.** Fix any compact set $H \subseteq K$ — for the application we will eventually take $H = K \cap B(0, R)$ for arbitrarily large $R$, but for verifying compatibility one compact set at a time suffices. By compactness of $H$ and continuity of $\nabla f|_K$, the restriction $\nabla f|_H$ is uniformly continuous. Replace $H$ by the slightly enlarged compact set
\begin{align*}
\widetilde H_+ := \{x \in K : \operatorname{dist}(x, H) \le \operatorname{diam}(H)\},
\end{align*}
which is closed in $K$ (hence in $\mathbb{R}^n$, since $K$ is closed) and bounded, hence compact. Let
\begin{align*}
\omega: [0, \infty) &\to [0, \infty), \\
t &\mapsto \sup\{|\nabla f(a) - \nabla f(b)| : a, b \in \widetilde H_+,\, |a - b| \le t\}
\end{align*}
denote the modulus of continuity of $\nabla f|_{\widetilde H_+}$. Then $\omega$ is nondecreasing, $\omega(t) \le 2L$, and $\omega(t) \to 0$ as $t \to 0^+$.
[claim:Integral identity. For $\mathcal{L}^n \otimes \mathcal{L}^n$-a.e. pair $(a, b) \in K \times K$,
\begin{align*}
f(b) - f(a) = \int_0^1 \nabla f(a + t(b - a)) \cdot (b - a)\, d\mathcal{L}^1(t),
\end{align*}
and the integrand is well-defined for $\mathcal{L}^1$-a.e. $t \in [0, 1]$.]
[/claim]
*Proof of claim.* Localize: for any compact set $M \subseteq \mathbb{R}^n$, by [Fubini-Tonelli](/theorems/fubini-tonelli) applied to the indicator $\mathbb{1}_{\mathbb{R}^n \setminus D}(a + t(b - a))$ on $M \times M \times [0, 1]$,
\begin{align*}
\int_M \int_M \int_0^1 \mathbb{1}_{\mathbb{R}^n \setminus D}(a + t(b - a))\, dt\, da\, db = \int_0^1 \int_M \int_M \mathbb{1}_{\mathbb{R}^n \setminus D}(a + t(b - a))\, db\, da\, dt.
\end{align*}
For $t \in (0, 1]$ and $a \in M$ fixed, the change of variable $z = a + t(b - a)$ has Jacobian $t^n$, so (after extending the $z$-integration domain from $a + t(M - a)$ to all of $\mathbb{R}^n$, an enlargement that only increases the integral) $\int_M \mathbb{1}_{\mathbb{R}^n \setminus D}(a + t(b - a))\, db \le t^{-n} \mathcal{L}^n(\mathbb{R}^n \setminus D) = 0$. For $t = 0$, the integrand $\mathbb{1}_{\mathbb{R}^n \setminus D}(a)$ integrated over $a \in M$ gives $\mathcal{L}^n(M \setminus D) = 0$. Thus the iterated integral is zero, and by Fubini, for $\mathcal{L}^n \otimes \mathcal{L}^n$-a.e. $(a, b) \in M \times M$,
\begin{align*}
\mathcal{L}^1(\{t \in [0, 1] : a + t(b - a) \notin D\}) = 0.
\end{align*}
Letting $M$ exhaust $\mathbb{R}^n$ via compact subsets, this property holds for $\mathcal{L}^n \otimes \mathcal{L}^n$-a.e. $(a, b) \in \mathbb{R}^n \times \mathbb{R}^n$, in particular for a.e. $(a, b) \in K \times K$. Call such pairs *segment-admissible*; the segment-admissible pairs form a full-measure subset $G \subseteq K \times K$.
For $(a, b) \in G$, set $v := b - a$ and $\varphi(t) := f(a + tv)$ on $[0, 1]$. The function $\varphi$ is Lipschitz with constant $L|v|$, hence absolutely continuous. By the chain rule for compositions of Lipschitz functions with classical differentials at interior points (a Stepanov-type observation: at every $t_0$ such that $a + t_0 v \in D$, $f$ is classically differentiable at $a + t_0 v$, and the curve $t \mapsto a + tv$ is a $C^\infty$ affine map, so the composition $\varphi$ is differentiable at $t_0$ with $\varphi'(t_0) = \nabla f(a + t_0 v) \cdot v$; see Federer 3.1.6 or Evans-Gariepy 3.1 for the chain rule for absolutely continuous compositions), this identity holds at every $t_0$ for which $a + t_0 v \in D$ and $\varphi$ is differentiable at $t_0$. Both conditions hold for $\mathcal{L}^1$-a.e. $t \in [0, 1]$ (the first by segment-admissibility, the second by Rademacher's theorem applied to $\varphi$). The fundamental theorem of calculus for absolutely continuous functions yields
\begin{align*}
f(b) - f(a) = \varphi(1) - \varphi(0) = \int_0^1 \varphi'(t)\, dt = \int_0^1 \nabla f(a + tv) \cdot v\, dt. \qquad \square
\end{align*}
**Whitney remainder, split form.** For segment-admissible pairs $(a, b) \in G \cap (H \times H)$, subtracting $\nabla f(a) \cdot (b - a)$ from the integral identity gives
\begin{align*}
f(b) - f(a) - \nabla f(a) \cdot (b - a) = \int_0^1 \big(\nabla f(a + t(b - a)) - \nabla f(a)\big) \cdot (b - a)\, dt,
\end{align*}
hence
\begin{align*}
|f(b) - f(a) - \nabla f(a) \cdot (b - a)| \le |b - a| \int_0^1 |\nabla f(a + t(b - a)) - \nabla f(a)|\, dt. \tag{$\star$}
\end{align*}
Define
\begin{align*}
T^K(a, b) := \{t \in [0, 1] : a + t(b - a) \in K\}, \qquad T^c(a, b) := [0, 1] \setminus T^K(a, b).
\end{align*}
For $t \in T^K(a, b)$ with $a, b \in H$, the point $a + t(b - a)$ lies in $K$ within distance $|b - a| \le \operatorname{diam}(H)$ of $a \in H$, hence in $\widetilde H_+$. Therefore
\begin{align*}
|\nabla f(a + t(b - a)) - \nabla f(a)| \le \omega(t |b - a|) \le \omega(|b - a|).
\end{align*}
For $t \in T^c(a, b)$, use the global $L^\infty$ bound: $|\nabla f(a + t(b - a)) - \nabla f(a)| \le 2L$. Hence
\begin{align*}
\int_0^1 |\nabla f(a + t(b - a)) - \nabla f(a)|\, dt \le \omega(|b - a|) + 2L \cdot \mathcal{L}^1(T^c(a, b)). \tag{$\star\star$}
\end{align*}
**Pointwise convergence of an averaged bad-set function.** Define, for $a \in K$ and $r > 0$,
\begin{align*}
\rho_r(a) := \fint_{B(a, r)} \mathcal{L}^1(T^c(a, b))\, db.
\end{align*}
The map $(a, b) \mapsto \mathcal{L}^1(T^c(a, b))$ is jointly Borel measurable (as $T^c(a, b)$ is the preimage under the Borel map $t \mapsto a + t(b - a)$ of the Borel set $\mathbb{R}^n \setminus K$, intersected with $[0, 1]$, and $\mathcal{L}^1$ of such Borel sections is a Borel function in the parameters by Fubini-Tonelli). Hence $\rho_r$ is Borel.
By Fubini and a change of variables $z = a + t(b - a)$ (Jacobian $t^n$ for $t \in (0, 1]$),
\begin{align*}
\rho_r(a) = \int_0^1 \fint_{B(a, r)} \mathbb{1}_{\mathbb{R}^n \setminus K}(a + t(b - a))\, db\, dt = \int_0^1 \frac{\mathcal{L}^n(B(a, tr) \setminus K)}{\mathcal{L}^n(B(a, tr))}\, dt.
\end{align*}
Let $K^*$ denote the set of [Lebesgue density](/theorems/lebesgue-density)-one points of $K$; by the Lebesgue density theorem $\mathcal{L}^n(K \setminus K^*) = 0$. For $a \in K^*$ the integrand tends pointwise to $0$ as $r \to 0^+$ for every $t \in (0, 1]$, and is bounded by $1$, so by [dominated convergence](/theorems/dominated-convergence)
\begin{align*}
\lim_{r \to 0^+} \rho_r(a) = 0 \qquad \text{for $\mathcal{L}^n$-a.e. $a \in K$.}
\end{align*}
**Monotone upper envelope and Egorov.** To pass from the discrete sequence $r_k = 1/k$ to the continuous parameter $r \to 0^+$ requires a monotonicity device: $\rho_r(a)$ is itself not monotone in $r$ (the integrand $\mathcal{L}^n(B(a, tr) \setminus K)/\mathcal{L}^n(B(a, tr))$ need not be monotone in $r$ for fixed $t$), so we cannot apply Egorov directly to $\rho_{1/k}$ and conclude continuous-parameter uniformity. Instead, define the monotone upper envelope
\begin{align*}
\widetilde \rho_r(a) := \sup_{0 < s \le r} \rho_s(a) \qquad (a \in K,\ r > 0).
\end{align*}
Three properties of $\widetilde \rho_r$:
- *Monotonicity in $r$:* By definition, $r \mapsto \widetilde \rho_r(a)$ is nondecreasing in $r$ for each fixed $a$. Equivalently, $\widetilde \rho_{r}(a)$ is nonincreasing as $r \downarrow 0$.
- *Pointwise limit at density-one points:* For $a \in K^*$ (Lebesgue density-one points of $K$), $\rho_s(a) \to 0$ as $s \to 0^+$ (proved above by dominated convergence). Hence
\begin{align*}
\widetilde \rho_r(a) = \sup_{0 < s \le r} \rho_s(a) \;\downarrow\; \limsup_{s \to 0^+} \rho_s(a) = 0 \qquad \text{as $r \to 0^+$.}
\end{align*}
- *Measurability:* $\widetilde \rho_r(a) = \sup_{q \in \mathbb{Q} \cap (0, r]} \rho_q(a)$ because $s \mapsto \rho_s(a)$ is continuous in $s$ for each fixed $a$ (the map $s \mapsto \int_0^1 \mathcal{L}^n(B(a, ts) \setminus K)/\mathcal{L}^n(B(a, ts))\, dt$ is continuous in $s > 0$ by dominated convergence, since the integrand depends continuously on $s$ for each $t \in (0, 1]$ — using $\mathcal{L}^n(\partial B(a, \rho)) = 0$ — and is uniformly bounded by $1$). The countable supremum of Borel functions is Borel.
Apply Egorov's theorem to the *decreasing* sequence of Borel functions $\widetilde \rho_{1/k}$ ($k = 1, 2, \ldots$) on the compact $H$ of finite Lebesgue measure: $\widetilde \rho_{1/k}(a) \to 0$ pointwise on $H \cap K^*$ (which has full measure in $H$ since $\mathcal{L}^n(H \setminus K^*) \le \mathcal{L}^n(K \setminus K^*) = 0$), so there exists a measurable set $E \subseteq H$ with
\begin{align*}
\mathcal{L}^n(H \setminus E) < \varepsilon'/8
\end{align*}
such that $\widetilde \rho_{1/k} \to 0$ uniformly on $E$.
By inner regularity of $\mathcal{L}^n$, choose a closed set $\widetilde K \subseteq E$ with $\mathcal{L}^n(E \setminus \widetilde K) < \varepsilon'/8$, hence
\begin{align*}
\mathcal{L}^n(H \setminus \widetilde K) < \varepsilon'/8 + \varepsilon'/8 = \varepsilon'/4.
\end{align*}
**Refinement to density-one points.** The closure argument below requires the *base point* $a$ to be a Lebesgue density-one point of the set on which we are verifying compatibility. To secure this, refine $\widetilde K$ as follows. By the [Lebesgue density theorem](/theorems/lebesgue-density) applied to the measurable (in fact closed) set $\widetilde K$, the set
\begin{align*}
\widetilde K^* := \{a \in \widetilde K : a \text{ is a Lebesgue density-one point of } \widetilde K\}
\end{align*}
satisfies $\mathcal{L}^n(\widetilde K \setminus \widetilde K^*) = 0$. The set $\widetilde K^*$ is Borel (the density function $a \mapsto \lim_{r \to 0^+} \mathcal{L}^n(B(a, r) \cap \widetilde K)/\mathcal{L}^n(B(a, r))$ is Borel where it exists, and the limit exists $\mathcal{L}^n$-a.e.). By inner regularity of $\mathcal{L}^n$, choose a closed set $K' \subseteq \widetilde K^*$ with
\begin{align*}
\mathcal{L}^n(\widetilde K^* \setminus K') < \varepsilon'/8, \qquad \text{hence} \qquad \mathcal{L}^n(\widetilde K \setminus K') < \varepsilon'/8.
\end{align*}
Then $K'$ is closed, $K' \subseteq \widetilde K$, and *every* $a \in K'$ is a Lebesgue density-one point of $\widetilde K$ (since $K' \subseteq \widetilde K^*$). The uniform bad-set claim continues to hold for $a \in K' \subseteq \widetilde K$, with the *same* radius $r_*(\eta)$.
**Discrete-to-continuous transfer.** The monotonicity $\widetilde \rho_r \le \widetilde \rho_{1/k}$ for every $r \le 1/k$, combined with the dominating bound $\rho_r(a) \le \widetilde \rho_r(a)$, gives the continuous-parameter uniform convergence: for every $\eta > 0$, choose $k$ with $\sup_{a \in \widetilde K} \widetilde \rho_{1/k}(a) \le \eta$ (possible by uniform convergence of $\widetilde \rho_{1/k} \to 0$ on $\widetilde K$); then for all $0 < r \le 1/k$ and all $a \in \widetilde K$,
\begin{align*}
\rho_r(a) \le \widetilde \rho_r(a) \le \widetilde \rho_{1/k}(a) \le \eta.
\end{align*}
Setting $r_*(\eta) := 1/k$, we have established: for every $\eta > 0$ there exists $r_*(\eta) > 0$ such that
\begin{align*}
\rho_r(a) \le \eta \qquad \text{for all $a \in \widetilde K$ and all $0 < r \le r_*(\eta)$,}
\end{align*}
i.e., $\rho_r \to 0$ uniformly on $\widetilde K$ as $r \to 0^+$ in the continuous sense.
[claim:Uniform bad-set bound. For every $\eta > 0$ there exists $r_*(\eta) > 0$ such that for every $a \in \widetilde K$ there is a measurable subset $B_\eta(a) \subseteq B(a, r_*(\eta))$ with $\mathcal{L}^n(B(a, r_*(\eta)) \setminus B_\eta(a)) \le \eta \cdot \mathcal{L}^n(B(a, r_*(\eta)))$ such that
\begin{align*}
\mathcal{L}^1(T^c(a, b)) \le \sqrt{\eta} \qquad \text{for all $b \in B_\eta(a)$.}
\end{align*}]
[/claim]
*Proof of claim.* By the uniform convergence on $\widetilde K$, choose $r_*(\eta) > 0$ such that $\rho_r(a) \le \eta^{3/2}$ for all $a \in \widetilde K$ and $0 < r \le r_*(\eta)$. By Markov/Chebyshev applied to the nonnegative function $b \mapsto \mathcal{L}^1(T^c(a, b))$ on $B(a, r_*(\eta))$,
\begin{align*}
\frac{\mathcal{L}^n(\{b \in B(a, r_*(\eta)) : \mathcal{L}^1(T^c(a, b)) > \sqrt{\eta}\})}{\mathcal{L}^n(B(a, r_*(\eta)))} \le \frac{\rho_{r_*(\eta)}(a)}{\sqrt{\eta}} \le \frac{\eta^{3/2}}{\sqrt{\eta}} = \eta.
\end{align*}
Define $B_\eta(a) := \{b \in B(a, r_*(\eta)) : \mathcal{L}^1(T^c(a, b)) \le \sqrt{\eta}\}$. The radius $r_*(\eta)$ is uniform in $a \in \widetilde K$. $\square$
**Combining the bounds.** Fix $\varepsilon' > 0$. Choose $\delta_1 > 0$ small enough that $\omega(\delta_1) < \varepsilon'/2$. Set $\eta := (\varepsilon'/(4L))^2$ and let $r_*(\eta)$ be the uniform radius from the uniform bad-set claim. To avoid scale-conflation, we re-apply the Markov/Chebyshev argument at *every* scale $r \le r_*(\eta)$, using that $\rho_r(a) \le \eta^{3/2}$ for all such $r$ by the uniform convergence. Concretely, for each $a \in K'$ and each $0 < r \le r_*(\eta)$ define
\begin{align*}
B_\eta^{(r)}(a) := \{b \in B(a, r) : \mathcal{L}^1(T^c(a, b)) \le \sqrt{\eta}\}.
\end{align*}
Markov's inequality on $b \mapsto \mathcal{L}^1(T^c(a, b))$ over $B(a, r)$ gives
\begin{align*}
\frac{\mathcal{L}^n(B(a, r) \setminus B_\eta^{(r)}(a))}{\mathcal{L}^n(B(a, r))} \le \frac{\rho_r(a)}{\sqrt{\eta}} \le \frac{\eta^{3/2}}{\sqrt{\eta}} = \eta.
\end{align*}
Set
\begin{align*}
\delta := \min(\delta_1, r_*(\eta)).
\end{align*}
**Strengthening: density-one in $K'$ itself.** Recall $K'$ was chosen so every $a \in K'$ is a Lebesgue density-one point of $\widetilde K$. We additionally need the density-one property *of $K'$ itself*. By the Lebesgue density theorem, the set
\begin{align*}
K'^* := \{a \in K' : a \text{ is a Lebesgue density-one point of } K'\}
\end{align*}
satisfies $\mathcal{L}^n(K' \setminus K'^*) = 0$. Pass once more to a closed inner-regular subset of $K'^*$ of measure $\ge \mathcal{L}^n(K') - 0$ (the discarded set has measure zero, so this refinement costs nothing in measure); abusing notation, *retain the symbol $K'$* and assume henceforth that every $a \in K'$ is a Lebesgue density-one point of $K'$. Hence for each $a \in K'$ there exists $r_{**}(a, \eta) > 0$ such that
\begin{align*}
\mathcal{L}^n(B(a, r) \cap K') \ge (1 - \eta)\, \mathcal{L}^n(B(a, r)) \qquad \text{for all $0 < r \le r_{**}(a, \eta)$.}
\end{align*}
Fix $a \in K' \cap H$ and any radius $r$ with $0 < r \le \min(\delta, r_{**}(a, \eta))$. The set
\begin{align*}
A(a, r) := \{b \in B(a, r) \cap K' : (a, b) \in G,\ \mathcal{L}^1(T^c(a, b)) \le \sqrt{\eta}\}
\end{align*}
satisfies, by Markov at scale $r$, segment-admissibility (a $\mathcal{L}^n$-null exclusion), and the density bound at $a$,
\begin{align*}
\mathcal{L}^n(A(a, r)) \ge \mathcal{L}^n(B(a, r) \cap K') - \eta\, \mathcal{L}^n(B(a, r)) \ge (1 - 2\eta)\, \mathcal{L}^n(B(a, r)).
\end{align*}
For $b \in A(a, r)$, by $(\star)$ and $(\star\star)$,
\begin{align*}
|f(b) - f(a) - \nabla f(a) \cdot (b - a)| \le |b - a| \big(\omega(|b - a|) + 2L \sqrt{\eta}\big) \le |b - a| (\varepsilon'/2 + \varepsilon'/2) = \varepsilon' |b - a|. \tag{$\dagger$}
\end{align*}
**Closure via Lebesgue differentiation.** We extend $(\dagger)$ from pairs $(a, b)$ with $b \in A(a, r)$ to all pairs $(a, b) \in (K' \cap H)^2$ with $0 < |a - b| < \delta$.
Fix $a \in K' \cap H$ and any $r \le \min(\delta, r_{**}(a, \eta))$. The set $A(a, r) \subseteq K'$ is measurable, with $\mathcal{L}^n(A(a, r)) \ge (1 - 2\eta) \mathcal{L}^n(B(a, r)) > 0$. By the [Lebesgue density theorem](/theorems/lebesgue-density), for $\mathcal{L}^n$-a.e. $b' \in \mathbb{R}^n$, either $b'$ is a Lebesgue density-one point of $A(a, r)$ (and hence in particular $A(a, r) \cap B(b', \rho)$ has positive measure for all small $\rho$, so $b'$ lies in $\overline{A(a, r)}$), or $b'$ is a density-zero point of $A(a, r)$ (and the closure argument below does not apply directly). The exceptional set has $\mathcal{L}^n$-measure zero.
To handle the exceptional null set uniformly in $a$, perform a final Fubini-and-inner-regularity refinement. The set
\begin{align*}
\Omega := \{(a, b) \in K' \times K' : b \in A(a, \delta) \text{ or $b$ is a density-one point of } A(a, \delta)\}
\end{align*}
has, for each fixed $a \in K'$, complement of $\mathcal{L}^n$-measure zero in $K'$ (by Lebesgue density applied to $A(a, \delta)$).
**Joint Borel measurability of $\Omega$.** We verify that $\mathbf{1}_\Omega$ is jointly Borel measurable on $K' \times K'$ by checking each defining clause separately. First, $\mathbf{1}_{A(a, \delta)}(b)$ is the indicator of the set
\begin{align*}
\{(a, b) \in K' \times K' : 0 < |a - b| < \delta,\ (a, b) \in G,\ \mathcal{L}^1(T^c(a, b)) \le \sqrt{\eta}\}.
\end{align*}
Each of the three defining conditions is jointly Borel: (i) $\{(a, b) : 0 < |a - b| < \delta\}$ is open, hence Borel; (ii) $G \subseteq K' \times K'$ is the set of segment-admissible pairs, defined by $\mathcal{L}^1(\{t \in [0, 1] : a + t(b - a) \notin D\}) = 0$, which is jointly Borel because $(a, b, t) \mapsto \mathbb{1}_{\mathbb{R}^n \setminus D}(a + t(b - a))$ is the composition of a Borel function with a continuous map, hence jointly Borel on $\mathbb{R}^n \times \mathbb{R}^n \times [0, 1]$, and the slice integral $(a, b) \mapsto \int_0^1 \mathbb{1}_{\mathbb{R}^n \setminus D}(a + t(b - a))\, d\mathcal{L}^1(t)$ is Borel by Fubini-Tonelli; (iii) $(a, b) \mapsto \mathcal{L}^1(T^c(a, b)) = \int_0^1 \mathbb{1}_{\mathbb{R}^n \setminus K}(a + t(b - a))\, d\mathcal{L}^1(t)$ is jointly Borel by the same Fubini argument applied to the indicator of the Borel set $\{(a, b, t) \in \mathbb{R}^n \times \mathbb{R}^n \times [0, 1] : a + t(b - a) \in \mathbb{R}^n \setminus K\}$. Hence $\{(a, b) \in K' \times K' : b \in A(a, \delta)\}$ is jointly Borel.
For the density-one clause: define
\begin{align*}
F(a, b, \rho) := \mathcal{L}^n(B(b, \rho) \cap A(a, \delta)) = \int_{\mathbb{R}^n} \mathbf{1}_{B(b, \rho)}(z)\, \mathbf{1}_{A(a, \delta)}(z)\, d\mathcal{L}^n(z),
\end{align*}
which is jointly Borel in $(a, b, \rho)$ by Fubini-Tonelli (the integrand is the product of jointly Borel indicators). The density quotient $F(a, b, \rho)/\mathcal{L}^n(B(b, \rho))$ is then jointly Borel in $(a, b, \rho)$ on the open set $\{\rho > 0\}$, and the $\liminf$ as $\rho \downarrow 0$ along rationals,
\begin{align*}
\liminf_{q \in \mathbb{Q}, q \downarrow 0} \frac{F(a, b, q)}{\mathcal{L}^n(B(b, q))},
\end{align*}
is jointly Borel as a countable $\liminf$ of Borel functions. For each fixed $a \in K'$, by [Lebesgue differentiation](/theorems/lebesgue-density) applied to the slice (the indicator $\mathbf{1}_{A(a, \delta)} \in L^1_{\mathrm{loc}}(\mathbb{R}^n)$), the limit as $\rho \downarrow 0$ exists and equals $\mathbf{1}_{A(a, \delta)}(b)$ for $\mathcal{L}^n$-a.e. $b$, with limit value $1$ on a full-measure subset of $A(a, \delta)$. Hence the density-one set
\begin{align*}
\{(a, b) \in K' \times K' : \liminf_{q \in \mathbb{Q}, q \downarrow 0} F(a, b, q)/\mathcal{L}^n(B(b, q)) = 1\}
\end{align*}
is jointly Borel, and for each fixed $a \in K'$, its $b$-slice contains a $\mathcal{L}^n$-full-measure subset of $A(a, \delta)$ — which is sufficient for the Fubini-and-symmetrisation step below. Therefore $\Omega$ is jointly Borel.
By Fubini, $\Omega$ has full $\mathcal{L}^n \otimes \mathcal{L}^n$-measure in $K' \times K'$, and the symmetric version $\Omega^{\mathrm{sym}} := \{(a, b) \in K' \times K' : (a, b) \in \Omega \text{ and } (b, a) \in \Omega\}$ also has full measure. By Fubini again, the set
\begin{align*}
K'_{\mathrm{good}} := \{a \in K' : \mathcal{L}^n(\{b \in K' : (a, b) \notin \Omega^{\mathrm{sym}}\}) = 0\}
\end{align*}
has full $\mathcal{L}^n$-measure in $K'$. Choose a closed subset $K'' \subseteq K'_{\mathrm{good}}$ by inner regularity with $\mathcal{L}^n(K' \setminus K'') = 0$ (the discard has measure zero since $K'_{\mathrm{good}}$ has full measure in $K'$). Apply once more the Lebesgue-density refinement: pass to a closed inner-regular subset of $\{a \in K'' : a \text{ is a Lebesgue density-one point of } K''\}$, which has full measure in $K''$ — this is again a measure-zero discard. Retain the symbol $K''$. Then $K''$ is closed, $K'' \subseteq K' \subseteq \widetilde K \subseteq K \subseteq D$, $\mathcal{L}^n(K' \setminus K'') = 0$, and *every $a \in K''$ is a Lebesgue density-one point of $K''$*.
**Verification of $(\dagger)$ on $K'' \times K''$.** Fix $a, b \in K'' \cap H$ with $0 < |a - b| < \delta$. The construction of $K''$ ensures: either $b \in A(a, \delta)$, or $b$ is a Lebesgue density-one point of $A(a, \delta)$, off a $\mathcal{L}^n$-null subset $N_a \subseteq K''$ in $b$ for fixed $a$. We treat the two cases.
*Case 1: $b \in A(a, \delta)$.* By definition of $A(a, \delta)$, $\mathcal{L}^1(T^c(a, b)) \le \sqrt{\eta}$ and $(a, b) \in G$ (segment-admissible), so $(\dagger)$ at $(a, b)$ follows from $(\star)$ and $(\star\star)$ as in the displayed inequality above.
*Case 2: $b$ is a Lebesgue density-one point of $A(a, \delta)$ (and possibly $b \notin A(a, \delta)$).* Since $b$ has density one in $A(a, \delta)$,
\begin{align*}
\lim_{\rho \to 0^+} \frac{\mathcal{L}^n(A(a, \delta) \cap B(b, \rho))}{\mathcal{L}^n(B(b, \rho))} = 1,
\end{align*}
so for every $\rho > 0$ small the intersection $A(a, \delta) \cap B(b, \rho)$ has positive measure. Pick $b_m \in A(a, \delta) \cap B(b, 1/m)$ for each $m$; then $b_m \to b$, and each $b_m$ satisfies $(\dagger)$ at the pair $(a, b_m)$:
\begin{align*}
|f(b_m) - f(a) - \nabla f(a) \cdot (b_m - a)| \le \varepsilon' |b_m - a|.
\end{align*}
Both sides are continuous in $b_m$ ($f$ is Lipschitz, $\nabla f(a)$ is fixed), so passing $m \to \infty$,
\begin{align*}
|f(b) - f(a) - \nabla f(a) \cdot (b - a)| \le \varepsilon' |b - a|,
\end{align*}
which is $(\dagger)$ at $(a, b)$.
Cases 1 and 2 cover $b \in K'' \setminus N_a$ for each fixed $a \in K''$, where $N_a$ is the exceptional $\mathcal{L}^n$-null set from the $\Omega^{\mathrm{sym}}$ construction. To extend to $b \in N_a$: $(\dagger)$ is a *closed condition* in $b$ (the left side is continuous in $b$ since $f$ is continuous and $\nabla f(a)$ is fixed; the right side $\varepsilon' |b - a|$ is continuous in $b$). So the set $\{b \in K'' : (\dagger)\text{ holds at }(a, b)\}$ is closed in the *subspace topology* of $K'' \subseteq \mathbb{R}^n$. It contains $K'' \setminus N_a$, which is dense in $K''$ (in the same subspace topology): every point of $K''$ is a Lebesgue density-one point of $K''$ (by the $K' \to K'^*$ refinement, inherited by $K'' \subseteq K'$), so for every $a^* \in K''$ and every $\rho > 0$ the ball $B(a^*, \rho) \cap K''$ has positive $\mathcal{L}^n$-measure, hence cannot be contained in the $\mathcal{L}^n$-null set $N_a$ — so $K'' \setminus N_a$ meets every relatively open neighbourhood, i.e., is dense in $K''$. A relatively closed subset of $K''$ containing a dense subset equals $K''$. Therefore $(\dagger)$ holds at every pair $(a, b) \in K'' \times K''$ with $0 < |a - b| < \delta$.
This is the Whitney $C^1$ compatibility condition for $(f|_{K''}, \nabla f|_{K''})$ on the closed set $K''$, with $\mathcal{L}^n(K' \setminus K'') = 0$ so $K''$ inherits the bookkeeping bound from $K'$.
**Total bad measure.** Pick $R_0$ at the outset so that $\mathcal{L}^n(K \setminus \overline{B(0, R_0)}) < \varepsilon'/8$, and replace $K$ by $K \cap \overline{B(0, R_0)}$ (still closed) at the start of the Egorov-based construction so that the unused tail is absorbed into the bookkeeping. Then $H = K$ is itself compact and the term $\mathcal{L}^n(K \setminus H) = 0$. The bookkeeping reads
\begin{align*}
\mathcal{L}^n(\mathbb{R}^n \setminus K'') &\le \mathcal{L}^n(\mathbb{R}^n \setminus K_0) + \mathcal{L}^n(K_0 \setminus D) + \mathcal{L}^n((K_0 \cap D) \setminus K) + \mathcal{L}^n(K \setminus \overline{B(0, R_0)}) \\
&\quad+ \mathcal{L}^n(H \setminus \widetilde K) + \mathcal{L}^n(\widetilde K \setminus K') + \mathcal{L}^n(K' \setminus K'').
\end{align*}
The two refinements from $K' \to K'^*$ and $K'_{\mathrm{good}} \to K''$ cost zero measure each (both discarded sets are $\mathcal{L}^n$-null), so $\mathcal{L}^n(K' \setminus K'') = 0$. Combining,
\begin{align*}
\mathcal{L}^n(\mathbb{R}^n \setminus K'') < \varepsilon'/4 + 0 + \varepsilon'/4 + \varepsilon'/8 + \varepsilon'/4 + \varepsilon'/8 + 0 = \varepsilon'.
\end{align*}
This $\varepsilon'$-bound on $\mathcal{L}^n(\{f \ne g\}) \le \mathcal{L}^n(\mathbb{R}^n \setminus K'')$ is what the vector-reduction step (Step 0) consumes when applied to each component $f_i$ with $\varepsilon' = \varepsilon/(c_n m)$.
[/step]
custom_env
Unknown
[step:Apply Whitney's extension theorem and read off the Lipschitz bound from the partition-of-unity construction]
The role of Step 2 in the overall architecture is precisely to verify, on the closed set $K''$, the qualitative Whitney $C^1$ compatibility condition (W) — that is, the *uniform-modulus* hypothesis required for invoking Whitney's extension theorem. This condition is the gate for the theorem; once verified, Whitney's theorem produces $g \in C^1$ with $g|_{K''} = f$ and $\nabla g|_{K''} = \nabla f$. The Lipschitz bound on $g$ is then a *separate* structural consequence of the Whitney partition-of-unity construction, not of the Egorov-based modulus from Step 2.
**Whitney's extension theorem (qualitative form, used here).** Let $K'' \subseteq \mathbb{R}^n$ be closed and let $\bar f: K'' \to \mathbb{R}$, $\bar d: K'' \to \mathbb{R}^n$ be continuous. Suppose the Whitney compatibility condition (W) holds: for every compact $\widetilde H \subseteq K''$ and every $\eta > 0$ there exists $\delta > 0$ such that
\begin{align*}
|\bar f(b) - \bar f(a) - \bar d(a) \cdot (b - a)| \le \eta |b - a| \qquad \text{for all $a, b \in \widetilde H$ with $0 < |a - b| < \delta$.}
\end{align*}
Then there exists $g \in C^1(\mathbb{R}^n)$ with $g|_{K''} = \bar f$ and $\nabla g|_{K''} = \bar d$. (This is the qualitative Whitney $C^1$-extension theorem; see Federer, *Geometric Measure Theory*, Theorem 3.1.14, or Evans-Gariepy, *Measure Theory and Fine Properties of Functions*, Section 6.5, Theorem 1.)
**Step 2 verifies (W).** With $\bar f := f|_{K''}$ and $\bar d := \nabla f|_{K''}$, both continuous (the first by Lipschitz continuity of $f$, the second by Step 1, using $K'' \subseteq K' \subseteq \widetilde K \subseteq K$), the Whitney compatibility (W) is exactly inequality $(\dagger)$ from Step 2: for every $\varepsilon' > 0$ there exists $\delta > 0$ uniform on $K'' \cap H$ such that
\begin{align*}
|f(b) - f(a) - \nabla f(a) \cdot (b - a)| \le \varepsilon' |b - a|
\end{align*}
for all $a, b \in K'' \cap H$ with $|a - b| < \delta$. Whitney's theorem applies, and we obtain $g \in C^1(\mathbb{R}^n)$ with
\begin{align*}
g|_{K''} = f|_{K''}, \qquad \nabla g|_{K''} = \nabla f|_{K''}.
\end{align*}
**Lipschitz bound from the Whitney construction.** The Lipschitz bound on $g$ is read off from the structure of the Whitney partition-of-unity construction, not from the modulus of (W). We summarize the relevant structural fact.
The Whitney extension is built using a [Whitney decomposition](/theorems/whitney-decomposition) $\{Q_i\}$ of the open complement $\mathbb{R}^n \setminus K''$ into dyadic cubes with side length $\ell(Q_i) \asymp \operatorname{dist}(Q_i, K'')$, paired with a partition of unity $\{\varphi_i\}$ subordinated to a fattened cover $\{Q_i^*\}$, and the explicit formula
\begin{align*}
g(x) = \sum_i \varphi_i(x) \cdot \big(\bar f(x_i) + \bar d(x_i) \cdot (x - x_i)\big), \qquad x \in \mathbb{R}^n \setminus K'',
\end{align*}
where $x_i \in K''$ is a chosen "near point" of the cube $Q_i$ (with $|x - x_i| \le c_n \ell(Q_i)$ for some dimensional constant $c_n$). Differentiating and using $\sum_i \nabla \varphi_i \equiv 0$ on $\mathbb{R}^n \setminus K''$, the gradient on each fattened cube $Q_i^*$ satisfies
\begin{align*}
|\nabla g(x)| \le C(n) \Big( \sup_{x_j \in N_i} |\bar d(x_j)| + \frac{1}{\ell(Q_i)} \sup_{x_j, x_k \in N_i} |\bar f(x_j) - \bar f(x_k) - \bar d(x_k) \cdot (x_j - x_k)| \Big),
\end{align*}
where $N_i \subseteq K''$ is the (finite, $n$-bounded) collection of near points associated to cubes intersecting a $C(n)$-neighborhood of $Q_i$, and $C(n)$ is a dimensional constant from the Whitney decomposition (cube ratios, partition-of-unity derivatives). The displacement $|x_j - x_k| \le C(n) \ell(Q_i)$ for $x_j, x_k \in N_i$, so the second term is bounded by $C(n) \cdot \sup_{a \ne b \in K''} |R(a, b)|$ where $R(a, b) := (\bar f(b) - \bar f(a) - \bar d(a) \cdot (b - a))/|b - a|$.
On the closed set $K''$ itself, $\nabla g = \bar d$ and so $|\nabla g(x)| \le \sup_{K''} |\bar d|$. Combining,
\begin{align*}
\|\nabla g\|_{L^\infty(\mathbb{R}^n)} \le C(n) \big(\sup_{K''} |\bar d| + \sup_{a \ne b \in K''} |R(a, b)|\big).
\end{align*}
This bound is a *structural* output of the Whitney partition-of-unity formula, valid for any $\bar d$ continuous on $K''$ with bounded $|R|$.
**Bounding the two structural terms for our $\bar f, \bar d$.**
- $\sup_{K''} |\bar d| = \sup_{K''} |\nabla f| \le L$ by Step 1.
- $\sup_{a \ne b \in K''} |R(a, b)| \le 2L$: by the triangle inequality, $|R(a, b)| \le |f(b) - f(a)|/|b - a| + |\nabla f(a)| \le L + L = 2L$.
Combining,
\begin{align*}
\|\nabla g\|_{L^\infty(\mathbb{R}^n)} \le C(n)(L + 2L) = 3 C(n) L =: C'(n) L,
\end{align*}
with $C'(n) := 3C(n)$.
**On the role of Step 2.** The reviewer might object that the trivial bound $|R(a, b)| \le 2L$ in the Lipschitz estimate makes Step 2's elaborate uniform modulus appear "wasted." This is not the case: Step 2's role is to verify the *qualitative* Whitney compatibility (W), which is the *gate* for invoking Whitney's theorem in the first place — without (W), $g \in C^1(\mathbb{R}^n)$ would not even exist as a $C^1$ extension. Once (W) is verified and $g$ is constructed, the Lipschitz bound is read off from the partition-of-unity structure using the *trivial* $L^\infty$ bounds on $\bar d$ and $R$. The uniform modulus from Step 2 is necessary for invocation of Whitney; the trivial bounds in Step 4 are sufficient for the Lipschitz estimate. Both ingredients are required; neither subsumes the other.
**Measure bound (scalar case).** Since $g(x) = f(x)$ and $\nabla g(x) = \nabla f(x)$ for every $x \in K''$,
\begin{align*}
\{x \in \mathbb{R}^n : f(x) \ne g(x)\} \cup \{x \in \mathbb{R}^n : \nabla f(x) \ne \nabla g(x)\} \subseteq \mathbb{R}^n \setminus K'',
\end{align*}
and by the total bad measure computation in Step 2,
\begin{align*}
\mathcal{L}^n\big(\{f \ne g\} \cup \{\nabla f \ne \nabla g\}\big) \le \mathcal{L}^n(\mathbb{R}^n \setminus K'') < \varepsilon'.
\end{align*}
This is the scalar conclusion; combined with the vector-to-scalar reduction (Step 0) applied componentwise at tolerance $\varepsilon' = \varepsilon/(c_n m)$ and the Hausdorff-Lebesgue conversion $\mathcal{H}^n = c_n \mathcal{L}^n$, the original theorem follows: $\mathcal{H}^n(\{x : f(x) \ne g(x)\}) < \varepsilon$ for the vector-valued $g \in C^1(\mathbb{R}^n; \mathbb{R}^m)$.
**Lipschitz constant of $g$.** Since $g \in C^1(\mathbb{R}^n)$ has $\|\nabla g\|_{L^\infty} \le C'(n) L$, $g$ is globally Lipschitz with
\begin{align*}
\operatorname{Lip}(g) = \|\nabla g\|_{L^\infty(\mathbb{R}^n)} \le C'(n) L = C'(n) \operatorname{Lip}(f),
\end{align*}
where $C'(n)$ is the dimensional constant above.
This completes the proof.
[/step]
custom_env
Unknown