About continuous functions on $p$-adic fields Consider $K/ \mathbb{Q}_p$ a finite extension of the field of $p$-adic numbers. If  for every such an extension $ f_K: K \to K$ is continuous can we extend these functions to $\mathbb{C}_p$? My idea was that since $x \in \mathbb{C}_p$ then $x= lim_{n \to \infty}x_n$ where $x_n$ is an element of a finite extension on $\mathbb{Q_p}$  then $$\mathbb{C}_p \subset \prod_{K/Q_p finite}K$$ the map  given by the sequence $F=(f_K)_K$ is continuous since all the components are continuous. And so $F_{|C_p}$ is also continuous.
This method could work?
 A: 
If $f$ is continuous $\mathbb{Q}_p \to X$ then $f \circ \phi$ is continuous $\mathbb{C}_p\to X$ and extends $f$.

Where $\phi$ sends $x \in \mathbb{C}_p$ to the closest point in $\mathbb{Q}_p$ :
let $u(x) = \sup_{t \in \mathbb{Q}_p} v_p(x-t)$ and $$\phi(x) = \cases{ x \text{ if } x\in \mathbb{Q}_p \\ 0 \text{ if } v_p(x)=u(x) \not \in \mathbb{Z} \\ p^{v_p(x)} \min \{n  \in \mathbb{Z}_{\ge 0}, v_p(x-p^{v_p(x)} n) =  u(x)\} \text{ otherwise}}$$
Since $v_p(x-\phi(x)) = u(x)$ then $v_p(\phi(x)-\phi(y)) \ge v_p(x-y)$
A: Your question seems not well-posed to me. User reuns seems to interpret it as:

Let $K$ be one fixed finite extension of $\Bbb Q_p$. If $f: K \rightarrow K$ is continuous, is there a continuous map $\hat{f}: \Bbb C_p \rightarrow K$ such that $\hat{f}_{\vert K} = f$?

and in his answer simultaneously restricts to the special case $\Bbb Q_p$ for the domain of $f$, but generalises to an arbitrary topological space $X$ for the codomain of $f$ and $\hat{f}$. Both the restriction and the generalisation are harmless though, and indeed this boils down to the question whether there is a continuous map $\phi: \Bbb C_p\rightarrow K$ (or in the special case $\rightarrow \Bbb Q_p$) with $\phi_{\vert K} = id_K$, which I think he indeed constructs. So the answer to that interpretation of the question is yes.
I however interpret the question differently, namely as:

For each finite extensions $K\vert \Bbb Q_p$ (contained in $\Bbb C_p$), let a continuous map $f_K : K \rightarrow K$ be given. Then is there a continuous map $F: \Bbb C_p \rightarrow \Bbb C_p$ such that $F_{\vert K} = f_K$ for all $K$ as above?

The answer to this is no, for two reasons.


*

*Quite obviously the given maps $f_K$ need to be compatible in the sense that for every $K_1, K_2$, we need $f_{K_1 \vert (K_1 \cap K_2)} = f_{K_2 \vert (K_1 \cap K_2)}$ (or something similar).

*Now if the condition in 1. is satisfied, then indeed the maps do define a map $f$ on $\overline{\Bbb Q_p} = \bigcup_{K\vert \Bbb Q_p \text{ finite}} K$, and maybe that is what you have in mind when you write that product in the OP. I am not sure if that map necessarily is continuous on $\overline{\Bbb Q_p}$; however, even if it is continuous, I think that such a map does not necessarily extend to $\Bbb C_p$. A counterexample is:


*

*Let $c \in \Bbb C_p \setminus \overline{\Bbb Q_p}$ such that there exists a sequence $(x_n)_n$ with $x_n \to c$ and $v_p(x_n-c) \in \Bbb Z$ for all but finitely many $n$. Then for all $K$ as above, set $f_K(x) = \phi (\dfrac{1}{x-c})$, where $\phi: \Bbb C_p \rightarrow \Bbb Q_p$ is the map constructed in reuns' answer. While the $f_K$ give a map $f$ on $\overline{\Bbb Q_p}$ as above, we have $\lim_{n\to \infty} v_p(f(x_n)) = -\infty$, which means $f$ cannot be extended to $c$.


