DEFINITION.
If $\mathcal{B}$ is a disjoint cover of $X,$ then we can define a function $$f_{\mathcal{B}}: X \rightarrow \mathcal{B},$$given by the formula $$f_{\mathcal{B}}(x) = \textbf{the unique $B \in \mathcal{B}$ such that $x \in B$}.$$And to get some topology involved, we give $\mathcal{B}$ the discrete topology.
The problem is:
Let $X$ be a space and let $\mathcal{B}$ be a disjoint cover of $X.$
$(a)$ Show that $f_{\mathcal{B}}$ is continuous iff $\mathcal{B}$ is a clopen cover of $X.$
My question is:
If I know this definition:
Definition:
Suppose $\mathcal{A}$ and $\mathcal{B}$ are two covers of $X.$ We say that $\mathcal{B}$ refines $\mathcal{A}$ if each member of $\mathcal{B}$ is contained in some member of $\mathcal{A}.$ We say that $\mathcal{B}$ strictly refines $\mathcal{A}$ if each member of $\mathcal{B}$ is a proper subset of some member of $\mathcal{A}.$ if $\mathcal{B}$ strictly refines $\mathcal{A},$ we write $\mathcal{A} < \mathcal{B}.$
And if I know the proof of this problem:
Let $X$ be a compact metric space that is totally disconnected, and let $\epsilon > 0.$
(a) Show that $X$ has a finite cover $\mathcal{A}$ clopen sets with diameter at most $\epsilon.$
(b) Show that there is a clopen cover $\mathcal{B}$ such that $\mathcal{B}$ refines $\mathcal{A}$ and distinct numbers of $\mathcal{B}$ are disjoint.
How can I proof the required above?
EDIT: As my question above was answered by Brian in the comments, My new question is: Could anyone please provide me with some details about the idea of the proof either forward or backward direction ?
A function into a discrete space $D$ is continuous iff $f^{-1}[\{d\}]$ is open for all $d$, as singletons form a base for $D$.
Now, $f_{\mathcal{B}}^{-1}[\{B\}] = B$ by definition. So all $B$ are clopen, as all singletons in a discrete space are.