# On the set on which $|Df|$ is maximal for Lipschitz $f$

Let $$f: \mathbb R^n \to \mathbb R$$ be a Lipschitz continuous function with strict Lipschitz constant $$L > 0$$.

That is, $$|f(x) - f(y)| < L|x - y|$$ for all $$x \neq y$$ in $$\mathbb R^d$$.

Question: What is the maximal Hausdorff dimension of the set on which $$f$$ is differentiable and $$|Df| = L$$?

Remarks:

1. $$\mathcal H^{n-1}$$ is trivially achievable.

2. By sticking together a maximising sequence, we may achieve the supremal Hausdorff dimension, so we are justified in speaking of the maximum.

The maximal dimension is $$n$$, and it can be even of positive Lebesgue measure.
For $$n=1$$, consider a fat cantor set $$K$$. Then the primitive $$f(x):=\int_0^x \chi_K(t)dt$$ is a maximizer. Indeed, since $$K$$ is nowhere dense, we get $$|f(x)-f(y)|< |x-y|$$. On the other hand, by the fundamental theorem of calculus (i.e., some form of Lebesgue differentiation theorem) we obtain that $$f$$ is differentiable with derivative 1 at all density points of $$K$$, which form a positive measure set.
In general dimension it is sufficient to consider the same function of one coordinate, say $$f(x_1)$$.