Locally finite family and continuous function Let $X$ be a Tychonoff space. Let $\{U_n:n\in\mathbb{N}\}$ be a locally finite family of open subsets and choose $x_i\in U_i$ for every $i\in\mathbb{N}$. Then there exists a continuous function $f_i:X\to [0,i]$ such that $f_i(z)=0$ if $z\in X\setminus U_i$ and $f_i(x_i)=i$ for each $i\in\mathbb{N}$ (because $X$ is a Tychonoff space).
Now, we define $f=\displaystyle\sum_{n\in\mathbb{N}}f_n$. 
I want to prove that $f$ is a continuous function, but I don't know how. Also, I don't see why is $f$ well-defined (couldn't it be $f(x)=\infty$ for some $x\in X$?)
Can you help me? Thanks.
 A: $f$ is well defined since each $x$ is contained in a finite number of $U_i$, so $f_i(x)\ne 0$ for only finitely many $i$. To show continuity at $x$, let $V$ be the neighborhood of $x$ which intersects only a finite number of $U_i$'s. Then the restriction $f|_V$ is the sum of the corresponding $f_i$'s as all the other $f_j$'s vanish completely on $V$. So each point has a neighborhood where the restriction of $f$ is continuous. This implies that $f$ is continuous.
A: Since the family $\{ U_n : n \in \mathbb{N} \}$ is locally-finite, this implies (but is stronger than) the fact that each $x \in X$ belongs to only finitely many of the $U_n$.  Because of this, for each $x \in X$, the series $$f(x) = \sum_{n \in \mathbb{N}} f_n (x)$$ has only finitely many non-zero terms, and it therefore must converge.  Thus the function is well-defined.

For continuity, show that $f$ is continuous at each $x \in X$: given $\epsilon > 0$ find an open neighbourhood $V$ of $x$ such that $| f(y) - f(x) | < \epsilon$ for all $y \in V$.  
Hint: For this recall that the family of open sets is locally finite, meaning that there is an open neighbourhood $W$ of $x$ such that $A = \{ n \in \mathbb{N} : W \cap U_n \neq \varnothing \}$ is finite.  This should be a starting point in finding the open neighbourhood $V$ of $x$.  (Note that for each $y \in W$ we can show that $f(y) = \sum_{n \in A} f_n(y)$, and this is a finite sum.)
