How to show that $D$ is a Borel measurable set and $D_{f}$ is a Borel function. How to show that $D_{f}$ is a Borel measurable function.
Well I have one Lipschitz function  $f:\Bbb{R}^{n}\to \Bbb{R}$ and I want to proof that
$D_{f}:D\to L(\Bbb{R}^{n},\Bbb{R})$ is Borel function, where $D=\{ x\in \Bbb{R}^{n}: f'(x)\quad \text{exist }\}$
I try with the definition to show that $\forall U$ Borel set in $ L(\Bbb{R}^{n},\Bbb{R})$ imply $D_{f}^{-1}(U)$ is Borel set.
Then let $U$ Borel set in $L(\Bbb{R}^{n},\Bbb{R})$ hence
$D_{f}^{-1}(U)=\{x\in \Bbb{R}^{n}: D_{f}(x)\in U\}$ but $D_{f}(x)$ is one linear transformation  hence
$D_{f}^{-1}(U)=\{x\in \Bbb{R}^{n}: T(x)\in U \}$ can to say : Like $T$ is continuous because is linear transformation then $D_{f}^{-1}(U)$ is measurable imply is Borel set?, can somebody help me please or give me one hint...thank you
 A: Let us prove the following result:

Let $f:\Bbb{R}^{n}\to \Bbb{R}$ be a Lipschitz function and $D=\{ x\in \Bbb{R}^{n}: f'(x)\: \text{exists }\}$. Let $D_{f}:D\to L(\Bbb{R}^{n},\Bbb{R})$ be the function that associates to each point $x\in D$  the value $f'(x)$. Then

*

*$D$ is Borel subset of $\Bbb{R}^{n}$

*$D_f$ is a Borel Measurable function.


(Note: $f'(x)$ is the derivative of $f$ at $x$ and $L(\Bbb{R}^{n},\Bbb{R})$ is the space of linear transformations from $\Bbb R^n$ to $\Bbb R$).
Since $f:\Bbb{R}^{n}\to \Bbb{R}$ is a Lipschitz function, there is $K>0$, such that for all $x, y \in  \Bbb{R}^n$, $|f(x)-f(y)| < K \|x - y\|$.  Note that $f$ is continuous and so it is a Borel measurable function.
Let $D=\{ x\in \Bbb{R}^{n}: f'(x)\: \text{exists }\}$
Let us prove that $D$ is a Borel measurable set.
It can be proved (see Remark below) that $x \in D$ if and only if
$$\forall\epsilon\in  \mathbb{Q}, \epsilon>0, \: \exists\delta \in  \mathbb{Q},\delta>0,\:\exists T\in\mathbb{Q}_{1\times n}, \Vert T\Vert \leqslant K ,\:\forall h \in \mathbb{Q}^{n},\Vert h\Vert<\delta, \:\\ | f(x+h)-f(x)-Th |\leq\epsilon\Vert h\Vert,$$
where $\mathbb{Q}_{1\times n}$ is the set of $1\times n$ rational matrices. It means that
$$ D= \bigcap_{\substack{\epsilon\in  \mathbb{Q} \\ \epsilon>0}}\bigcup_{\substack{\delta \in  \mathbb{Q} \\ \delta>0}} \bigcup_{\substack{T\in\mathbb{Q}_{1\times n} \\ \Vert T\Vert \leqslant K }}\bigcap_{\substack{ h \in \mathbb{Q}^{n} \\ \Vert h\Vert<\delta }} \{x \in \mathbb{R}^n: | f(x+h)-f(x)-Th |\leq\epsilon\Vert h\Vert\} \tag{1}$$
But it is easy to see that the sets $\{x \in \mathbb{R}^n: | f(x+h)-f(x)-Th |\leq\epsilon\Vert h\Vert\}$ are Borel measurable sets. So, since all intersections and unions in $(1)$ are countable intersections and countable unions, we have that $D$ is a Borel measurable set.
Now, let us prove that  $D_{f}:D\to L(\Bbb{R}^{n},\Bbb{R})$ is a Borel function.
First, note that Borel sets in $L(\Bbb{R}^{n},\Bbb{R})$ are the elements of the $\sigma$-algebra generate by the open sets of the norm topology of $L(\Bbb{R}^{n},\Bbb{R})$. Since $L(\Bbb{R}^{n},\Bbb{R})$ is isomorphic to $\Bbb{R}^{n}$, the Borel sets in $L(\Bbb{R}^{n},\Bbb{R})$ can be thought of as the Borel sets in $\Bbb R^n$.
Now, note that, by using the canonical basis in $\Bbb R^n$,  we have that
$$D_f= \left (\frac {\partial f}{\partial x_1}, \dots ,   \frac {\partial f}{\partial x_n} \right)$$
So it is enough to prove that any $i\in \{1,...,n\}$, the function
$\frac {\partial f}{\partial x_i}: D\to \Bbb R $ is a Borel function.
Let $(t_j)_{j \in \Bbb N}$ be a sequence of positive real numbers converging to $0$. Now,
for any $i\in \{1,...,n\}$ and any $j \in \Bbb N $, let us define $d_{i,j} : D\to \Bbb R $ by
$$d_{i,j}(x) = \frac{f(x+t_je_i) -f(x)}{t_j}$$
Since $f$ is a Borel measurable function, clearly $d_{i,j}$ are Borel measurable functions and, as $j\to \infty$, they converge pointwise to $\frac {\partial f}{\partial x_i}$ in $D$. So  $\frac {\partial f}{\partial x_i}$ are Borel measurable functions. So $D_f$ is a Borel measurable function.
Remark: let us prove that

$x \in D$ if and only if
$$\forall\epsilon\in  \mathbb{Q}, \epsilon>0, \: \exists\delta \in  \mathbb{Q},\delta>0,\:\exists T\in\mathbb{Q}_{1\times n}, \Vert T\Vert \leqslant K ,\:\forall h \in \mathbb{Q}^{n},\Vert h\Vert<\delta, \:\\ | f(x+h)-f(x)-Th |\leq\epsilon\Vert h\Vert,$$
where $\mathbb{Q}_{1\times n}$ is the set of $1\times n$ rational matrices.

Proof: Let $\mathbb{R}_{1\times n}$ be the set of $1\times n$ real matrices.
($\Rightarrow$) If $x \in D$ , then $D_f(x)$ is represented by a $1 \times n$ real matrice and $\Vert D_f \Vert \leqslant K$. Since $\mathbb{Q}_{1\times n}$ is a dense subset of $\mathbb{R}_{1\times n}$ and $D_f(x) \in \mathbb{R}_{1\times n}$, we can take $T \in \mathbb{Q}_{1\times n}$, such that $\Vert D_f(x) - T \Vert < \epsilon/2$. Now, since $\lim\frac{f(x+h)-f(x)-df(x)h}{\Vert h\Vert}=0$ there exists $\delta>0$ such that if $\Vert h\Vert<\delta$ then $\Vert f(x+h)-f(x)-df(x)h\Vert\leq\epsilon\Vert h\Vert/2$, so
\begin{align*}
\Vert f(x+h)-f(x)-Th\Vert &\leqslant \epsilon\Vert h\Vert/2+\Vert Th-df(x)h\Vert \\
& \leqslant \epsilon\Vert h\Vert/2+\Vert T-df(x)\Vert\Vert h \Vert \\
& \leqslant \epsilon\Vert h\Vert
\end{align*}
($\Leftarrow$) Let $\{\epsilon_n\}_n$ be a sequence of positive rational numbers converging to $0$. Then, there are $\delta_n \in  \mathbb{Q},\delta_n>0,\:\exists T_n\in\mathbb{Q}_{1\times n}, \Vert T_n\Vert \leqslant K$ such that
for all $ h \in \mathbb{Q}^{n},\Vert h\Vert<\delta_n$,
$$| f(x+h)-f(x)-T_n h |\leq\epsilon_n\Vert h\Vert \tag{2}$$
Since $f$ is continuous, $(2)$ holds for all  $ h \in \mathbb{R}^{n},\Vert h\Vert<\delta_n$.
Since $\{ A \in\mathbb{R}_{1\times n}: \Vert A \Vert \leqslant K\}$ is compact and, for all $n$, $T_n \in \{ A \in\mathbb{R}_{1\times n}: \Vert A \Vert \leqslant K\}$, we can, passing to a a subsequence if needed, assume that $T_n$ converges (in the norm topology) to some $T \in \mathbb{R}_{1\times n}$.
So, if $\Vert h\Vert<\delta_n$, then
\begin{align*}
\Vert f(x+h)-f(x)-T h\Vert&\leqslant \Vert f(x+h)-f(x)-T_n h\Vert+\Vert T_n h-T h\Vert\\
&\leq(\epsilon_n+\Vert T_n-T\Vert)\Vert h\Vert.
\end{align*}
Since $T_n$ converges to $T$ and $\epsilon_n$ converges to $0$, we have that $f$ is differentiable at $x$ with $df(x)=T$.
