Let $f:\mathbb R^n \to \mathbb R$ and $E := \{x \in X : f \text{ not Fréchet differentiable at }x\}$. Then $E$ [is Borel measurable](https://math.stackexchange.com/questions/3307418/let-f-mathbbrn-rightarrow-mathbbr-is-the-set-of-points-at-which-f). It is well-known that



> 
> [Theorem](https://www.pmf.ni.ac.rs/filomat-content/2017/31-18/31-18-27-4617.pdf) If $f$ is convex, then the Hausdorff dimension of $E$ is at most $n-1$.
> 
> 
> 


I would like to ask for a reference of the following statement, i.e.,



> 
> If $f$ is locally Lipschitz, then the Hausdorff dimension of $E$ is at most $n-1$.
> 
> 
> 


My closest search is [the following](https://pagine.dm.unipi.it/alberti/ricerca/2010-12/acp-icm2010.pdf)



> 
> **Definition 1.2.** A set $E \subset \mathbb{R}^n$ is porous at a point $x \in E$ if there is a $c>0$ and there is a sequence $y\_n \rightarrow 0$ such that the balls $B\left(x+y\_n, c\left|y\_n\right|\right)$ are disjoint from $E$. The set $E$ is porous if it is porous at each of its points, and it is called $\sigma$-porous if it is a countable union of porous sets.
> 
> 
> **Theorem 1.3.** Let $f: \mathbb{R}^n \rightarrow \mathbb{R}^m$ be a Lipschitz function. Then the set of those points at which $f$ is not differentiable but it is **(directionally) differentiable** in $n$ linearly independent directions is $\sigma$-porous.
> 
> 
> 


We have the Hausdorff dimension of a $\sigma$-porous subset of $\mathbb R^n$ [is at most $n-1$](https://www.pmf.ni.ac.rs/filomat-content/2017/31-18/31-18-27-4617.pdf). However, the Lipschitz function in **Theorem 1.3.** has one more restriction, i.e., it must be directionally differentiable in $n$ linearly independent directions.


Could you elaborate on such a reference?



Hausdorff dimension of the non-differentiability set of a locally Lipschitz function
You can't find a reference because it's false. Rademacher's theorem (Lebesgue-almost everywhere differentiability) is the best one can do.


In fact, *for every Lebesgue-null set $E \subset \mathbf{R}$, you can construct a Lipschitz function $f: \mathbf{R} \to \mathbf{R}$ that is not differentiable at any point of $E$.* [ACP10]


The reference for this is Theorem 1.1 in... the same paper you linked in your question. The result is on page 1. I don't think they give a proof there, but elsewhere, Preiss gives the argument in some [notes](https://homepages.warwick.ac.uk/%7Emasfay/talks/helsinki_07_08_slides.pdf) from a talk given in Helsinki. The proof basically goes as follows.


*Proof.*
Construct some nested sequence of open sets $\mathbf{R} = G\_0 \supset G\_1 \supset \cdots \supset E$ that are rapidly shrinking: for every connected component $C$ of $G\_k$, the next open set has
\begin{equation}
\lvert G\_{k+1} \cap C \rvert \leq 2^{-k-1} \lvert C \rvert.
\end{equation}
(Let us say additionally that $\lvert G\_1 \rvert \leq 1$.) You can find such a sequence because the Lebesgue measure is outer regular.


The sets $(G\_k \setminus G\_{k+1} \mid k \in \mathbf{N})$, together with $E$, partition the real line, and we define the function
$\psi: x \mapsto (-1)^k$ if $x \in G\_k \setminus G\_{k+1}$. This is bounded and measurable. (We need not define $\psi$ on $E$ as it is a null set.)


Then the desired function is $f: x \in \mathbf{R} \to \int\_0^x \psi$. This is Lipschitz, but not differentiable at any point of $E$.


Essentially, the reason is the following:
take an arbitrary point $x \in E$, and let, for each $k \in \mathbf{N}$, $(a\_k,b\_k)$ be the connected component of $G\_k$ containing $x$. Then the derivative of $f$ on $(a\_k,b\_k)$ is equal to $(-1)^k$ on a large portion of the interval. Certainly this is the case on $(a\_k,b\_k) \setminus G\_{k+1}$, and therefore
\begin{equation}
\lvert f(b\_k) - f(a\_k) - (-1)^k (b\_k - a\_k) \rvert
\leq 2 \lvert (a\_k,b\_k) \setminus G\_{k+1} \rvert
\leq 2^{-k} (b\_k - a\_k).
\end{equation}


If you now repeat the same calculation for the next term, you find that
\begin{equation}
\lvert f(b\_{k+1}) - f(a\_{k+1}) - (-1)^{k+1} (b\_{k+1} - a\_{k+1}) \rvert \leq 2^{-k-1} (b\_{k+1} - a\_{k+1}). 
\end{equation}
If you divide this equation through by $b\_{k+1} - a\_{k+1}$, respectively the previous equation through by $b\_k - a\_k$, you will see that the two combined are incompatible with differentiability of $f$ at $x$. Q.E.D.


[ACP10] G. Alberti, M. Csörnyei, and D. Preiss. *Differentiability of lipschitz functions, structure of null sets, and other problems.* In Proceedings of the ICM 2010, pages 1379-1394.


