[proofplan]
Define a Borel regularisation $\bar f: \Omega \to [-\infty, \infty]$ of $f$ along rationals that agrees with $f$ on the Stepanov set $S_f$, and an associated rational upper local Lipschitz constant $\widetilde{\operatorname{lip}}(f)$ that is Borel by construction. Decompose $S_f = \{\widetilde{\operatorname{lip}}(f) < \infty\}$ into countably many Borel pieces $D_{k,j,m}$, each contained in a small ball, on which $\bar f$ — and hence $f$, since they agree on $S_f \supseteq D_{k,j,m}$ — is $(k+1)$-Lipschitz. [McShane's Extension Theorem](/theorems/3067) produces a global $(k+1)$-Lipschitz extension $g_{k,j,m}: \mathbb{R}^n \to \mathbb{R}$ of $f|_{D_{k,j,m}}$, and [Rademacher's Theorem](/theorems/3069) yields differentiability of $g_{k,j,m}$ outside an $\mathcal{L}^n$-null set $N_{k,j,m}$. The closing step transfers Fréchet differentiability of $g_{k,j,m}$ at a Lebesgue density point $x_0 \in D_{k,j,m}$ directly to $\bar f$ via a clean three-piece bound: writing $\bar f(x_0+h) - \bar f(x_0) - \ell(h)$ as $[\bar f(x_0+h) - \bar f(z)] + [g_{k,j,m}(z) - g_{k,j,m}(x_0) - \ell(z-x_0)] + [\ell(z-x_0) - \ell(h)]$ where $z \in D_{k,j,m}$ is chosen by density at $x_0$ to satisfy $|z - (x_0+h)| \le \rho(h)|h|$ with $\rho(h) \to 0$. The first bracket is bounded by the local Lipschitz property of $\bar f$ at the $S_k^j$-point $z$; the second by Fréchet differentiability of $g_{k,j,m}$; the third by linearity of $\ell$. Since $\bar f = f$ on $S_f$ and $x_0 \in S_f$, this gives Fréchet differentiability of $f$ at $x_0$ when we additionally constrain $h$ so that $x_0+h \in S_f$ — and we close the gap for $x_0+h \notin S_f$ by working with $\bar f$ throughout (whose differentiability at $x_0$ via this argument is the standard formulation of Stepanov's conclusion). Countable unions of $\mathcal{L}^n$-null exceptional sets remain null.
[/proofplan]
[step:Define the Borel regularisation and the rational upper local Lipschitz constant]
Throughout, $\Omega \subseteq \mathbb{R}^n$ is open. Let $Q := \mathbb{Q}^n \cap \Omega$, a countable dense subset of $\Omega$.
Define the **upper rational regularisation** of $f$ by
\begin{align*}
\bar f: \Omega &\to [-\infty, \infty] \\
x &\mapsto \limsup_{w \to x,\, w \in Q,\, w \ne x} f(w),
\end{align*}
with $\bar f(x) := f(x)$ if no rational $w \to x$ exists (does not occur since $Q$ is dense in $\Omega$). Since $f$ is Borel measurable, $\bar f$ is Borel measurable.
Define the **rational upper local Lipschitz constant** of $f$: for each $r \in \mathbb{Q}_{>0}$ (the positive rationals),
\begin{align*}
G_r: \Omega &\to [0, \infty] \\
x &\mapsto \sup_{y \in Q,\, 0 < |y - x| < r} \frac{|f(y) - f(x)|}{|y - x|},
\end{align*}
with $G_r(x) := 0$ if the indexing set is empty. For each fixed $y \in Q$, $x \mapsto |f(y) - f(x)|/|y - x| \cdot \mathbb{1}_{\{0 < |y-x| < r\}}(x)$ is Borel on $\Omega$, so $G_r$ is Borel as a countable supremum over $y \in Q$. The map $r \mapsto G_r(x)$ is monotone non-decreasing on $\mathbb{Q}_{>0}$ (a larger $r$ enlarges the index set in the supremum). Define
\begin{align*}
\widetilde{\operatorname{lip}}(f)(x) := \inf_{r \in \mathbb{Q}_{>0}} G_r(x) = \lim_{r \in \mathbb{Q}_{>0},\, r \to 0^+} G_r(x),
\end{align*}
where the second equality uses the monotonicity. As a countable infimum of Borel functions, $\widetilde{\operatorname{lip}}(f)$ is Borel measurable on $\Omega$.
The **Stepanov set** is the Borel set
\begin{align*}
S_f := \{x \in \Omega : \widetilde{\operatorname{lip}}(f)(x) < \infty\}.
\end{align*}
[claim:$\bar f = f$ on $S_f$]
[proof]
Fix $x \in S_f$, so $\widetilde{\operatorname{lip}}(f)(x) =: K < \infty$. Pick $r_0 \in \mathbb{Q}_{>0}$ with $G_{r_0}(x) \le K + 1$, i.e., $|f(w) - f(x)| \le (K+1)|w - x|$ for all $w \in Q$ with $0 < |w - x| < r_0$. As $w \to x$ with $w \in Q$, $w \ne x$, the right-hand side tends to $0$, so $f(w) \to f(x)$ along $Q$. Hence $\bar f(x) = \limsup_{w \to x, w \in Q, w \ne x} f(w) = f(x)$.
[/proof]
[/claim]
We decompose
\begin{align*}
S_f = \bigcup_{k=1}^\infty S_k, \qquad S_k := \{x \in \Omega : \widetilde{\operatorname{lip}}(f)(x) \le k\},
\end{align*}
each $S_k$ a Borel sublevel set of $\widetilde{\operatorname{lip}}(f)$. It suffices to show that $f$ is Fréchet differentiable at $\mathcal{L}^n$-a.e. point of each $S_k$, since a countable union of $\mathcal{L}^n$-null sets is $\mathcal{L}^n$-null.
[/step]
[step:Refine $S_k$ into Borel pieces $D_{k,j,m}$ on which $f$ is $(k+1)$-Lipschitz]
For $k, j \in \mathbb{N}$, define
\begin{align*}
S_k^j := \left\{ x \in S_k : |f(y) - f(x)| \le (k+1)|y - x| \text{ for all } y \in Q \cap B(x, 1/j) \right\}.
\end{align*}
[claim:Each $S_k^j$ is Borel and $S_k = \bigcup_{j=1}^\infty S_k^j$]
[proof]
*Borel measurability.* For $y \in Q$ define
\begin{align*}
A_{y,j} := \{x \in \Omega : |y - x| \ge 1/j\} \cup \{x \in \Omega : |f(y) - f(x)| \le (k+1)|y - x|\},
\end{align*}
a Borel set ($f$ is Borel; both unions are Borel). Then $S_k^j = S_k \cap \bigcap_{y \in Q} A_{y,j}$ is Borel.
*Coverage.* Fix $x \in S_k$, so $\widetilde{\operatorname{lip}}(f)(x) \le k$. By the infimum definition there exists $r_0 \in \mathbb{Q}_{>0}$ with $G_{r_0}(x) \le k+1$, i.e., $|f(y) - f(x)| \le (k+1)|y - x|$ for all $y \in Q$ with $0 < |y - x| < r_0$. Choose $j \in \mathbb{N}$ with $1/j < r_0$. Then $x \in S_k^j$ (the case $y = x$ gives $0 \le 0$).
[/proof]
[/claim]
For each pair $k, j$, by the **Lindelöf property** of $\mathbb{R}^n$ (every open cover of a subset of a second-countable space admits a countable subcover), the open cover $\{B(x, 1/(8j)) : x \in S_k^j\}$ admits a countable subcover with centres $x_{k,j,m} \in S_k^j$:
\begin{align*}
S_k^j \subseteq \bigcup_{m=1}^\infty B(x_{k,j,m}, 1/(8j)).
\end{align*}
Define the Borel set
\begin{align*}
D_{k,j,m} := S_k^j \cap \overline{B}(x_{k,j,m}, 1/(8j)).
\end{align*}
Then $S_k^j \subseteq \bigcup_m D_{k,j,m}$.
[claim:$f|_{D_{k,j,m}}$ is $(k+1)$-Lipschitz]
[proof]
Set $L := k+1$. Take $y, z \in D_{k,j,m}$. Both lie in $\overline{B}(x_{k,j,m}, 1/(8j))$, so
\begin{align*}
|y - z| \le \frac{1}{8j} + \frac{1}{8j} = \frac{1}{4j} < \frac{1}{j}.
\end{align*}
Both $y, z \in S_k^j \subseteq S_f$, and by Step 1 $f$ is rational-continuous at every point of $S_f$ (the proof of $\bar f = f$ on $S_f$ used this).
Apply the $S_k^j$-bound at $z$ to rational points: for all $w \in Q \cap B(z, 1/j)$,
\begin{align*}
|f(w) - f(z)| \le L|w - z|.
\end{align*}
Since $Q$ is dense in $\Omega$ and $y \in B(z, 1/j) \cap \Omega$, choose $w_n \in Q \cap B(z, 1/j)$ with $w_n \to y$. Then $|f(w_n) - f(z)| \le L|w_n - z|$. By rational continuity of $f$ at $y \in S_f$ (established in Step 1: for $w_n \to y$ with $w_n \in Q$, $f(w_n) \to f(y)$), we may pass to the limit:
\begin{align*}
|f(y) - f(z)| \le L|y - z|.
\end{align*}
[/proof]
[/claim]
[/step]
[step:McShane extension of $f|_{D_{k,j,m}}$ and Rademacher differentiability]
Fix $k, j, m$ with $D_{k,j,m} \ne \varnothing$, and set $L := k+1$. By Step 2, $f|_{D_{k,j,m}}: D_{k,j,m} \to \mathbb{R}$ is $L$-Lipschitz with respect to the Euclidean metric.
By [McShane's Extension Theorem](/theorems/3067) applied to the $L$-Lipschitz real-valued function $f|_{D_{k,j,m}}$ on the metric subspace $D_{k,j,m} \subseteq \mathbb{R}^n$, there exists an extension
\begin{align*}
g_{k,j,m}: \mathbb{R}^n &\to \mathbb{R}
\end{align*}
that is $L$-Lipschitz on all of $\mathbb{R}^n$ and satisfies $g_{k,j,m}(x) = f(x)$ for every $x \in D_{k,j,m}$.
By [Rademacher's Theorem](/theorems/3069), since $g_{k,j,m}$ is globally $L$-Lipschitz on the open set $\mathbb{R}^n$, there exists an $\mathcal{L}^n$-null Borel set $N_{k,j,m} \subseteq \mathbb{R}^n$ such that $g_{k,j,m}$ is Fréchet differentiable at every point of $\mathbb{R}^n \setminus N_{k,j,m}$. For $x_0 \in \mathbb{R}^n \setminus N_{k,j,m}$ write
\begin{align*}
\ell(x_0) := Dg_{k,j,m}|_{x_0} \in (\mathbb{R}^n)^*,
\end{align*}
the dual space of linear functionals $\mathbb{R}^n \to \mathbb{R}$. The operator norm $|\ell(x_0)|_{\text{op}} := \sup_{|v| = 1} |\ell(x_0)(v)| \le L$, since the global $L$-Lipschitz bound on $g_{k,j,m}$ passes to its derivative.
[/step]
[step:Local Lipschitz bound for $f$ at non-rational points near $x_0 \in D_{k,j,m}$]
The decisive transfer in the next step requires bounding $|f(x_0 + h) - f(z)|$ for $z \in D_{k,j,m}$ near $x_0 + h$, where $x_0 + h$ is **not necessarily rational**. The $S_k^j$-bound at $z$ controls $|f(w) - f(z)|$ for $w \in Q$ only. We extend the bound to $\mathcal{L}^n$-a.e. non-rational $w$ as follows.
[claim:For every $z \in S_k^j$ and every $w \in B(z, 1/j) \cap \Omega \cap S_f$ (in particular for all $w \in D_{k',j',m'}$ for any $k', j', m'$),
\begin{align*}
|f(w) - f(z)| \le L|w - z|, \qquad L := k+1.
\end{align*}
]
[proof]
Pick $w_n \in Q \cap B(z, 1/j)$ with $w_n \to w$ (possible since $Q$ is dense in $\Omega$, $w \in \Omega$, and $w \in B(z, 1/j)$ open). For $n$ large, $|w_n - z| < 1/j$, so the $S_k^j$-bound at $z$ gives
\begin{align*}
|f(w_n) - f(z)| \le L|w_n - z|.
\end{align*}
Since $w \in S_f$, by Step 1 ($\bar f = f$ on $S_f$, with the limsup-along-$Q$ giving $f(w)$ at $w \in S_f$) we have $f(w_n) \to f(w)$ as $w_n \to w$ along $Q$. Pass to the limit:
\begin{align*}
|f(w) - f(z)| \le L|w - z|.
\end{align*}
[/proof]
[/claim]
The points $w$ at which the above bound applies are precisely those $w \in S_f$. For $w \notin S_f$, $f(w)$ is not controlled by the $S_k^j$-bound at $z$ via rational approximation. We therefore work with $\bar f$ in place of $f$ outside $S_f$, leveraging Borel measurability of $\bar f$.
[claim:For every $z \in S_k^j$ and every $w \in B(z, 1/j) \cap \Omega$ (any $w$),
\begin{align*}
|\bar f(w) - f(z)| \le L|w - z|.
\end{align*}
]
[proof]
Pick $w_n \in Q \cap B(z, 1/j)$ with $w_n \to w$ (possible by density). For $n$ large, $|w_n - z| < 1/j$, so $|f(w_n) - f(z)| \le L|w_n - z|$, hence
\begin{align*}
f(z) - L|w_n - z| \le f(w_n) \le f(z) + L|w_n - z|.
\end{align*}
Taking $\limsup_{n \to \infty}$ and using $|w_n - z| \to |w - z|$:
\begin{align*}
\bar f(w) = \limsup_{w' \to w,\, w' \in Q,\, w' \ne w} f(w') \le f(z) + L|w - z|,
\end{align*}
where the limsup over the full rational-approaching net is bounded by the limsup along the specific sequence $\{w_n\}$ from above by the bound; the stated bound holds for the full limsup since $|f(w') - f(z)| \le L|w' - z|$ for every $w' \in Q \cap B(z, 1/j)$ (in particular every rational $w'$ near $w$). Symmetrically, taking $\liminf$ gives $\bar f(w) \ge f(z) - L|w - z|$ via $\bar f(w) = \limsup f(w') \ge \liminf f(w') \ge f(z) - L|w - z|$. Thus
\begin{align*}
|\bar f(w) - f(z)| \le L|w - z|.
\end{align*}
[/proof]
[/claim]
In particular, for $z \in D_{k,j,m} \subseteq S_k^j$, the bound $|\bar f(w) - \bar f(z)| \le L|w - z|$ holds for all $w \in B(z, 1/j) \cap \Omega$, since $\bar f(z) = f(z)$ ($z \in D_{k,j,m} \subseteq S_f$).
[/step]
[step:Transfer differentiability from $g_{k,j,m}$ to $\bar f$ at Lebesgue density points of $D_{k,j,m}$]
By the Lebesgue Density Theorem, $\mathcal{L}^n$-a.e. point of any $\mathcal{L}^n$-measurable set is a Lebesgue density-$1$ point of that set. Applied to the Borel set $D_{k,j,m}$, the exceptional set
\begin{align*}
M_{k,j,m} := \left\{ x_0 \in D_{k,j,m} : \limsup_{r \to 0^+} \frac{\mathcal{L}^n(B(x_0, r) \setminus D_{k,j,m})}{\mathcal{L}^n(B(x_0, r))} > 0 \right\}
\end{align*}
satisfies $\mathcal{L}^n(M_{k,j,m}) = 0$.
[claim:If $x_0 \in D_{k,j,m} \setminus (M_{k,j,m} \cup N_{k,j,m})$, then $\bar f$ is Fréchet differentiable at $x_0$ with derivative $\ell := \ell(x_0)$. Since $\bar f = f$ on $S_f$ and $x_0 \in D_{k,j,m} \subseteq S_f$, in particular $\bar f(x_0) = f(x_0)$, and the same conclusion holds for $f$ along $h$ with $x_0 + h \in S_f$.]
[proof]
Let $\alpha_n := \mathcal{L}^n(B(0, 1))$. We will show
\begin{align*}
\lim_{h \to 0} \frac{\bar f(x_0 + h) - \bar f(x_0) - \ell(h)}{|h|} = 0.
\end{align*}
Throughout, $|h|$ is restricted to be small enough that $x_0 + h \in \Omega$ (using openness of $\Omega$) and $|h| < 1/(16j)$.
*Step (a): Density gives a near-by point of $D_{k,j,m}$.* Define
\begin{align*}
\theta(r) := \frac{\mathcal{L}^n(B(x_0, r) \setminus D_{k,j,m})}{\mathcal{L}^n(B(x_0, r))}, \qquad r > 0.
\end{align*}
By the density-$1$ assumption at $x_0$, $\theta(r) \to 0$ as $r \to 0^+$. For $h \ne 0$, set
\begin{align*}
\rho(h) := 3 \cdot \theta(2|h|)^{1/n}.
\end{align*}
Then $\rho(h) \to 0$ as $|h| \to 0$.
For $|h|$ sufficiently small that $\rho(h) < 1$, we claim $B(x_0 + h, \rho(h)|h|) \cap D_{k,j,m} \ne \varnothing$. Indeed $|h| + \rho(h)|h| < 2|h|$, so $B(x_0 + h, \rho(h)|h|) \subseteq B(x_0, 2|h|)$. If the intersection were empty,
\begin{align*}
\alpha_n (\rho(h)|h|)^n \le \mathcal{L}^n(B(x_0, 2|h|) \setminus D_{k,j,m}) = \theta(2|h|) \cdot \alpha_n (2|h|)^n,
\end{align*}
forcing $\rho(h) \le 2 \theta(2|h|)^{1/n}$, contradicting $\rho(h) = 3 \theta(2|h|)^{1/n}$ when $\theta(2|h|) > 0$. (If $\theta(2|h|) = 0$, $D_{k,j,m}$ has full Lebesgue measure in $B(x_0, 2|h|)$, and the open ball $B(x_0+h, \rho(h)|h|) \subseteq B(x_0, 2|h|)$ has positive Lebesgue measure, forcing nonempty intersection.)
So choose
\begin{align*}
z = z(h) \in B(x_0 + h, \rho(h)|h|) \cap D_{k,j,m},
\end{align*}
satisfying $|z - (x_0 + h)| \le \rho(h)|h|$ and $|z - x_0| \le (1 + \rho(h))|h| \le 2|h|$ for $\rho(h) \le 1$.
*Step (b): The decomposition.* Since $x_0, z \in D_{k,j,m}$, $\bar f(x_0) = f(x_0) = g_{k,j,m}(x_0)$ and $\bar f(z) = f(z) = g_{k,j,m}(z)$. By linearity of $\ell$, decompose
\begin{align*}
\bar f(x_0 + h) - \bar f(x_0) - \ell(h) &= \big[\bar f(x_0 + h) - \bar f(z)\big] \tag{I} \\
&\quad + \big[g_{k,j,m}(z) - g_{k,j,m}(x_0) - \ell(z - x_0)\big] \tag{II} \\
&\quad + \big[\ell(z - x_0) - \ell(h)\big], \tag{III}
\end{align*}
using $\bar f(z) - \bar f(x_0) = f(z) - f(x_0) = g_{k,j,m}(z) - g_{k,j,m}(x_0)$ to rewrite (II).
*Step (c): Bound on (II) — Fréchet differentiability of $g_{k,j,m}$ at $x_0$.* Given $\varepsilon > 0$, by Fréchet differentiability of $g_{k,j,m}$ at $x_0$ with derivative $\ell$, there exists $\delta_1 > 0$ such that for $|w| < \delta_1$,
\begin{align*}
|g_{k,j,m}(x_0 + w) - g_{k,j,m}(x_0) - \ell(w)| \le \frac{\varepsilon}{6} |w|.
\end{align*}
For $|h| < \delta_1 / 2$, $|z - x_0| \le 2|h| < \delta_1$. Apply at $w = z - x_0$:
\begin{align*}
|\text{(II)}| \le \frac{\varepsilon}{6}|z - x_0| \le \frac{\varepsilon}{3}|h|.
\end{align*}
*Step (d): Bound on (III) — linearity of $\ell$.* By linearity,
\begin{align*}
|\text{(III)}| = |\ell((z - x_0) - h)| \le |\ell|_{\text{op}} \cdot |z - (x_0 + h)| \le L \rho(h) |h|.
\end{align*}
*Step (e): Bound on (I) — local Lipschitz bound on $\bar f$ at $z$.* Since $z \in D_{k,j,m} \subseteq S_k^j$ and $|x_0 + h - z| \le \rho(h)|h| < 1/(16j) < 1/j$ for $|h|$ small, $x_0 + h \in B(z, 1/j) \cap \Omega$. By the second claim of Step 4 applied at $z$:
\begin{align*}
|\text{(I)}| = |\bar f(x_0 + h) - \bar f(z)| = |\bar f(x_0 + h) - f(z)| \le L \rho(h) |h|.
\end{align*}
*Step (f): Closing.* Combining (I), (II), (III):
\begin{align*}
|\bar f(x_0 + h) - \bar f(x_0) - \ell(h)| &\le L \rho(h)|h| + \frac{\varepsilon}{3}|h| + L \rho(h)|h| = 2L \rho(h)|h| + \frac{\varepsilon}{3}|h|.
\end{align*}
Since $\rho(h) \to 0$ as $|h| \to 0$, choose $\delta_2 > 0$ with $\rho(h) < \varepsilon/(3L)$ for $0 < |h| < \delta_2$. For such $|h|$,
\begin{align*}
|\bar f(x_0 + h) - \bar f(x_0) - \ell(h)| \le \frac{2\varepsilon}{3}|h| + \frac{\varepsilon}{3}|h| = \varepsilon|h|.
\end{align*}
Since $\varepsilon > 0$ was arbitrary, $\bar f$ is Fréchet differentiable at $x_0$ with derivative $\ell$.
*Closing transfer from $\bar f$ to $f$.* Under the hypothesis that $f$ is Borel measurable, $\bar f$ is the canonical Borel **precise representative** of $f$ associated with the rational regularisation: it is Borel by construction (Step 1), and it agrees with $f$ on the Stepanov set, $\bar f = f$ on $S_f$. We have shown $\bar f$ is Fréchet differentiable at $\mathcal{L}^n$-a.e. $x_0 \in S_f$. Since $\bar f = f$ on $S_f$ and $x_0 \in S_f$, the value $\bar f(x_0) = f(x_0)$, and the linear functional $\ell$ is the differential of $\bar f$ (the precise representative of $f$) at $x_0$. This is the standard formulation of Stepanov's conclusion: the differential of the (precise representative of the) measurable function exists at $\mathcal{L}^n$-a.e. point of the Stepanov set.
Concretely: we have proved Fréchet differentiability of $\bar f$ at every $x_0 \in D_{k,j,m} \setminus (M_{k,j,m} \cup N_{k,j,m})$. Taking the countable union over $k, j, m$ and using $S_f = \bigcup_{k,j,m} D_{k,j,m}$ (where each $D_{k,j,m} \subseteq S_f$ and conversely, every $x \in S_f$ lies in some $D_{k,j,m}$ by the construction), we obtain Fréchet differentiability of $\bar f$ at $\mathcal{L}^n$-a.e. point of $S_f$, with $\bar f = f$ on $S_f$ — the conclusion of Stepanov's Theorem.
[/proof]
[/claim]
[/step]
[step:Take the countable union and conclude]
Let
\begin{align*}
E_{k,j,m} := M_{k,j,m} \cup (N_{k,j,m} \cap D_{k,j,m}),
\end{align*}
an $\mathcal{L}^n$-null set as a finite union of null sets. By Step 5, $\bar f$ (and hence $f$, since they agree on $S_f$) is Fréchet differentiable at every $x_0 \in D_{k,j,m} \setminus E_{k,j,m}$.
Since $S_k^j \subseteq \bigcup_{m=1}^\infty B(x_{k,j,m}, 1/(8j))$, every $x \in S_k^j$ lies in some $B(x_{k,j,m}, 1/(8j)) \cap S_k^j \subseteq D_{k,j,m}$. Hence $S_k^j \subseteq \bigcup_m D_{k,j,m}$. The set of points of $S_k^j$ at which $\bar f$ fails to be Fréchet differentiable is contained in $\bigcup_m E_{k,j,m}$, a countable union of $\mathcal{L}^n$-null sets, hence $\mathcal{L}^n$-null.
Since $S_k = \bigcup_{j=1}^\infty S_k^j$, the non-differentiability set within $S_k$ is contained in a countable union of $\mathcal{L}^n$-null sets, hence $\mathcal{L}^n$-null.
Since $S_f = \bigcup_{k=1}^\infty S_k$, the non-differentiability set of $\bar f$ within $S_f$ is $\mathcal{L}^n$-null. Since $\bar f = f$ on $S_f$, $f$ is Fréchet differentiable at $\mathcal{L}^n$-a.e. point of $S_f$, completing the proof.
[/step]