If $(X,d)$ topological space and $f,g:X\to \Bbb{R}$ are continuous, then so is $f+g$ Let $(X,d)$ be topological space and let $C(X)$ denote the set of continuous functions  $f:X\to \Bbb{R}$. Show that if $f,g\in C(X)$ then $f+g\in C(X)$. I've seen online references of the continuity of addition topology or something around that, but my notes don't seem to really refer those topology (only the product topology is mentioned and nothing was said about it being continuous). The definition I am equipped with is: 
$f:X\to Y$ where $(X,\tau_X),(Y,\tau_Y)$ are topological spaces is called "continuous" if $\forall U\in \tau_Y, f^{-1}(U)\in \tau_X$. 
$\tau \subset P(X)$ is defined to be the topology of $X$ if $$\emptyset,X\in \tau $$ 
$$\forall B\subset \tau, \cup_{U\in B}U\in \tau $$ 
$$\forall B\subset \tau, |B|\in \Bbb{N}, \cap_{U\in B}U\in \tau $$.
This is pretty much what I am equipped with, apart from an equivalences statement relying on that definition. I really can't tell how the proof can be done that way. What should I be looking at? 

It suffices* to prove that the pre-images of intervals $ (-\infty, A)$ are open in $X$.
$$ (f+g)^{-1}(-\infty, A)=\{x \in X \ | f(x)+g(x) < A \} = \cup_{B \in \mathbb{R}} (\{x| g(x) < B \} \cap  \{x | f(x) < A-B \})$$
$\{x| g(x) < B \}$ and  $\{x | f(x) < A-B \}$ are open for any numbers A and B, because $f$ and $g$ are continuous.
So, the set above, as the union of open sets is open. Thus, $f+g$ is continuous.


*

*Because these sets form a basis for the topology of real line. 

