Have I proved that $f$ is not continuous correctly? Consider the function 

$f:(\Bbb R, T) \rightarrow(\Bbb R,T)$

Where $T$ is generated by the basis $ \{(−q,q)|q ∈ \Bbb Q , q &gt; 0\},$ and $f(x) = x^2$ 

I want to decide if f is continuous.

Here is my attempt

Consider an open set $U\subset (\Bbb R, T)$

There are 3 possibilities for what $U$ will be 


$U$ is the empty set
$U$ is all of $\Bbb R$
$U$ is of the form $(-q,q)$


for 1. inputting the empty set in any function will output the empty set , which is in $T$ so 1. checks out

for 2. we can choose q large enough so that the set $(-q,q)$ is all of $\Bbb R$, so we need only look at 3.

for 3. consider the inverse of $f, f^{-1} $, we know that $f^{-1}=\sqrt{x}$

$f^{-1}(q)=+_-\sqrt{q}$

$f^{-1}(-q)=+_-i\sqrt{q}$

Therefore $f^{-1}((-q,q))=(-i\sqrt{q},-\sqrt{q})\cup (i\sqrt{q},\sqrt{q})$

But $+_-\sqrt{q}$ and $+_-i\sqrt{q}$ are not elements of $\Bbb Q$ so neither set in the above union can be open in T, therefore f can not be continuous .

Does this proof look about right ?
Your $f$ is indeed continuous, we can prove this with sequences since $(\mathbb{R},T)$ is second countable.

Assume that $x_n \to x$ in $(\mathbb{R},T)$. We wish to prove that $x_n^2 \to x^2$ in $(\mathbb{R},T)$.

Let $q \in \mathbb{Q}, q &gt; 0$ such that $x^2 \in (-q,q)$. Then $x \in (-\sqrt{q}, \sqrt{q})$. Pick $r \in \mathbb{Q}$ such that $0 \le |x| &lt; r &lt; \sqrt{q}$. Then $x \in (-r,r)$ so, since $x_n \to x$, there exists $n_0 \in \mathbb{N}$ such that $n\ge n_0 \implies x_n \in (-r,r)$. Hence for $n \ge n_0$ we have $x_n^2 \in (-r^2,r^2) \subseteq (-q,q)$ which proves $x_n^2 \to x^2$.

Therefore $f$ is continuous.
No, it is not right. The set $f^{-1}\bigl((-q,q)\bigr)$ is equal to $\left(-\sqrt q,\sqrt q\right)$, which is an open set, since, if $(q_n)_{n\in\mathbb N}$ is an increasing sequence of rational numbers such that $\lim_{n\to\infty}q_n=q$, we have$$\left(-\sqrt q,\sqrt q\right)=\bigcup_{n\in\mathbb N}(-q_n,q_n)\in T.$$Therefore, $f$ is indeed continuous.