Prove that this function is Borel measurable Prove that if $s\ge 0$, $f:\mathbb{R}^n\to\mathbb{R}^m$ is continuous and $K\subset\mathbb{R}^n$ is compact, then the function
$$
F:\mathbb{R}^m\to [0,\infty]\\y\mapsto H^{s}(K\cap f^{-1}(\{y\}))
$$
is a Borel function.
I am considering, instead of $F$, for $\delta>0$ 
$$
F_{\delta}:\mathbb{R}^m\to [0,\infty]\\y\mapsto H^{s}_{\delta}(K\cap f^{-1}(\{y\}))
$$.
I want to prove that $F_{\delta}$ is Borel.
Let's compute:
$$
F_{\delta}^{-1}(]-\infty,a])=\{x\in\mathbb{R}^m:H^s_{\delta}(K\cap f^{-1}\{x\})\in]-\infty,a]\}=\\=\{x\in\mathbb{R}^m:H^s_{\delta}(\{y\in K: f(y)=x\})\in]-\infty,a]\}=\\=\{x\in\mathbb{R}^m:H^s_{\delta}(\{y\in K: f(y)=x\})\in[0,a]\}$$.
I can't go over. Any ideas??
where 
$$H^{s}_{\delta}(A):=inf\{\sum_i \alpha(s)2^{-s}diam(E_i)^s:A\subset\bigcup_i E_i, diam(E_i)<\delta\}$$
$$H^{s}(A):=sup_{\delta>0}H^{s}_{\delta}(A)$$
 A: First observe that that for every real number $t$
$$ \{y : H^s(K \cap f^{-1}(y)) \le t\} = \bigcap_{j=1}^\infty \left\{y : H^s_{1/j} (K \cap f^{-1}(y)) < t + \frac 1j \right\}.\tag{1}$$
It suffices to show that every set of the form $\{y : H^s_\delta(K \cap f^{-1}(y)) < r\}$ where $\delta > 0$ and $r \in \mathbb R$ is a Borel set. 
Next observe that the definition of $H^s_\delta(E)$ is unchanged if we require each set $\{E_i\}$ in every cover to be open. This means that $\def\diam{\mathrm{diam\, }}H^s_\delta(K \cap f^{-1}(y)) < r$ if and only if there is a sequence $\{G_k\}$ of open sets with the property that 
$$K \cap f^{-1}(y) \subset \bigcup_k G_k,\quad \diam G_k < \delta, \quad \sum_k \alpha(s) 2^{-s}(\diam G_k)^s < r.\tag{2}$$
Now consider the following: if $K \subset \mathbb R^n$ is compact, $f : \mathbb R^n \to \mathbb R^m$ is continuous, $G \subset \mathbb R^n$ is open, $y \in \mathbb R^m$, and $K \cap f^{-1}(y) \subset G$, then there exists $\delta > 0$ with the property that $|y-z| < \delta$ implies $K \cap f^{-1}(z) \subset G$. 
Suppose not. Then for every $j \ge 1$ there exists $z_j \in \mathbb R^m$ with the property that $|y - z_j| < \frac 1j$, but $K \cap f^{-1}(z_j) \not\subset G$. In particular there exists a sequence $\{t_j\} \subset K \setminus G$ with the property that $f(t_n) = z_n$ so that $f(t_n) \to y$. Since $K \setminus G$ is compact, there exists a subsequence $\{t_{j_\ell}\}$ that converges to a point $t \in K \setminus G$. On the other hand, since $f(t_{j_\ell}) \to f(t)$, we obtain $f(t) = y$ so that $t \in K \cap f^{-1}(y)$, contrary to the fact that $t \notin G$. 
This implies that the set of points $y \in \mathbb R^m$ satisfying $(2)$ is open, because if $y$ satisfies $(2)$ and $z$ is sufficiently close to $y$, then $K\cap f^{-1}(z)$ is covered by the same union of open sets.
Thus each set on the right hand side of $(1)$ is open, so $\{ y : H^s(K \cap f^{-1}(y)) \le t\}$ is a $G_\delta$ set for each $t$.
