Is this function continuous on rationals? If $f: \mathbb{Q}\to \mathbb{Q}$ such that $p \to p+1$.
I know a function is continuous iff for any open set in Y inverse image is open. But I don't think Q has any open sets. I am very confused and a beginner in analysis and topology.
Please explain in detail if it is not continuous, and how do I construct continuous maps between Q to Q?

If the topology of $\mathbb{Q}$ is the induced topology of $\mathbb{R}$ on $\mathbb{Q}$, then it is true.
Take the translation (and so the continuos map) $t\colon \mathbb{R}\to \mathbb{R}$ sending $x\mapsto x+1$.
Then, if $i\colon \mathbb{Q}\to \mathbb{R}$ is the inclusion, your map is $f=t\circ i$, that is continuos (because is the the composition of continuos maps).
