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/4483452/is-it-true-that-if-f-mathbb-rd-to-mathbb-r-is-continuous-then-the-differ). 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?