Borel sigma algebra and measurability of continuous functions Let ($X, \tau_X$) and ($Y, \tau_Y$) be topological spaces. Let $\mathcal{B}(X)=\sigma(\tau_X)$ and $\mathcal{B}(Y)=\sigma(\tau_Y)$ be the corresponding Borel sigma algebras. Do we have that if $\mathcal{B} \subseteq \mathcal{P}(X)$ is a sigma algebra such that every continuous function $f:X\rightarrow Y$ is $\mathcal{B}/\mathcal{B}(Y)$ measurable, then $\mathcal{B}(X) \subseteq \mathcal{B}$?
If not, does it hold for the reals? i.e. when $X=\mathbb{R}^m,Y=\mathbb{R}^n$ for some $m,n$.
My attempt:
Let $f^{-1}(\tau_Y) \equiv \{f^{-1}(E)|E\in\tau_Y\}$. Then $f$ continuous iff $f^{-1}(\tau_Y) \subseteq \tau_X$, and $f$ Borel measurable iff $f^{-1}(\sigma(\tau_Y))=\sigma(f^{-1}(\tau_Y)) \subseteq \sigma(\tau_X)$.  Assume that $f$ is $\mathcal{B}/\mathcal{B}(Y)$ measurable, then $f^{-1}(\sigma(\tau_Y))=\sigma(f^{-1}(\tau_Y)) \subseteq \mathcal{B}$. We now want to show that $\sigma(\tau_X) \subseteq \mathcal{B}$, and I don't know how to proceed.
For the real case, I found the following answer, but it doesn't seem to make sense for me, could someone please elaborate further?
Prove that Borel sigma field on R(d) is the smallest sigma-field that makes all continuous functions f:R(d)->R measurable.
 A: Part 1: In the general case, you cannot prove that $\mathcal{B}(X) \subseteq \mathcal{B}$.
Here is a counter-example.
Let $X=\{a,b\}$, $\tau_X$ be the discrete topology (that is  $\tau_X=\mathcal{P}(X)$) and then $\mathcal{B}(X)=\mathcal{P}(X)$.
Let $Y=\{c\}$, $\tau_Y =\{\emptyset, Y\}$  and so $\mathcal{B}(Y)= \{\emptyset, Y\}$.
All functions $f:X\rightarrow Y$ are continuous and constant functions.
Let $\mathcal{B}=\{\emptyset, X\}$ be a $\sigma$-algebra in $X$.
All (continuous) functions $f:X\rightarrow Y$ are $\mathcal{B}/\mathcal{B}(Y)$ measurable, but $\mathcal{B}\subsetneq \mathcal{B}(X)$.
Part 2 For the case of $X=\mathbb{R}^m,Y=\mathbb{R}^n$, let us prove the following more general result.

Let ($X, d$) be a metric space,  $\tau_X$ the topology induced by the metric and  let $\mathcal{B}(X)=\sigma(\tau_X)$ the Borel sigma algebra of $X$. Let us  consider $\mathbb{R}^n$ with its usual topology and its usual Borel sigma algebra.  If $\mathcal{B} \subseteq \mathcal{P}(X)$ is a sigma algebra such that every continuous function $f:X\rightarrow \mathbb{R}^n$ is $\mathcal{B}/\mathcal{B}(\mathbb{R}^n)$ measurable, then $\mathcal{B}(X) \subseteq \mathcal{B}$.

Proof: Let us prove that for any $F$ closed set of $X$, $F \in \mathcal{B}$. It will follow immediately that $\mathcal{B}(X) \subseteq \mathcal{B}$.
Given any $F$ closed set of $X$, define the function $f:X\rightarrow \mathbb{R}^n$ such that for all $x \in X$, $f(x) = (d(x,F),0,\dots,0) \in \mathbb{R}^n$.
It is easy to see that $f$ is continuous, so $f$ is $\mathcal{B}/\mathcal{B}(\mathbb{R}^n)$ measurable. Since $\{(0,\dots,0)\}$ is a Borel set in $\mathbb{R}^n$, we have that
$$F=f^{-1}(\{(0,\dots,0)\}) \in \mathcal{B}$$
So we have proved that for any $F$ closed set of $X$, $F \in \mathcal{B}$, and so $\mathcal{B}(X) \subseteq \mathcal{B}$.
