Q:

This function is clearly continuous but how would you write it formally?

Let $f:X\rightarrow{X\times{\{t\}}}$ with $X$ a topological space and t fixed element of the interval $I$. Clearly f is continuous, but how would one show this formally?
Is it enough to say an open set $U\subset{X}$ paired with $\{t\}$ has a pre-image under $f$ of $U$ in $X$ $\implies$ f is continuous.

A:

I think you can apply the following reasoning. Consider $X \times \{t\}$ with the product topology. Then, a basis element is simply a set of the form $U \times \{t\}$ with $U$ open in $X$ and $f^{-1}(U\times \{t\}) = U$, which is open in $X$. Now you just have to complete it considering arbitrary unions of such sets.

