2 deleted 126 characters in body

Assume $f\colon \mathbb Q\to \mathbb Q$ is a function which admits continuous extensions

• $f_0\colon\mathbb R\to \mathbb R$ and
• $f_p\colon \mathbb Q_p\to \mathbb Q_p$ for each prime $p$.

Is it true that $f$ is a polynomial?

I guess the answer is no, but I do not see a counterexample.

The function $$f(x)=|2x-2[x]-1|$$ is continous in $\mathbb R$ and in $\mathbb Q_2$, but not in $\mathbb Q_p$ for $p>2$.

1

# Continuous extensions reals and to p-adic numbers

Assume $f\colon \mathbb Q\to \mathbb Q$ is a function which admits continuous extensions

• $f_0\colon\mathbb R\to \mathbb R$ and
• $f_p\colon \mathbb Q_p\to \mathbb Q_p$ for each prime $p$.

Is it true that $f$ is a polynomial?

I guess the answer is no, but I do not see a counterexample.

The function $$f(x)=|2x-2[x]-1|$$ is continous in $\mathbb R$ and in $\mathbb Q_2$, but not in $\mathbb Q_p$ for $p>2$.