**Definitions:**


Let $E$ be a subset of $X$. By an extension of a function $f: E \to \mathbb R$, I mean a function $\bar f: X \to \mathbb R$ such that $f = \bar f$ on $E$.



> 
> **Question:** For every continuous function $f: \mathbb Q \to \mathbb R$, does there exist an extension $\bar f: \mathbb R \to \mathbb R$ that is continuous at each $q \in \mathbb Q$?
> 
> 
> 


In other words, can every continuous function on the rationals be extended to a function on the reals that is continuous at every rational point?



Extending continuous functions from $\mathbb Q$ to $\mathbb R$
You may extend by upper limit.


Details.


Denote $g(y)=\limsup\_{x\to y, x\in \mathbb{Q}} f(x)$ for all real $y$. So, possibly $g$ takes the value $+\infty$ or $-\infty$ at some points. But we have $g(x)=f(x)$ for rational $x$, and for each rational $x$ and each $\varepsilon>0$ there exists $\delta>0$ such that $|g(y)-f(x)|<\varepsilon$ whenever $|y-x|<\delta$, in particular $g(y)\ne \pm \infty$ if $|y-x|<\delta$. Thus if we replace all infinite values of $g$ to 0, $g$ remains continuous at rational points.


