$\phi \ : \ \mathbb{P}^n \rightarrow \mathbb{P}^m$ continuous $\ \Longrightarrow \ \phi$ morphism of algebraic varieties? I am confused about regular functions on 
$\mathbb{P}^n(K)$, (K algebraicly closed field.) It is about the following result:

Regular functions on $\mathbb{P}^n$ are locally constant.

Does that mean that all continuous maps $\mathbb{P}^n \rightarrow \mathbb{P}^m$ are immediately morphisms of algebraic varieties? That is what I thought I proved below:


Claim: All continuous maps $\mathbb{P}^n \rightarrow \mathbb{P}^m$ are morphisms of algebraic varieties.

"Proof": Let $\phi \ : \ \mathbb{P}^n \rightarrow \mathbb{P}^m$ be continuous.
We will show $\phi$ is compatible with regular functions.
Let $f \ : \ \mathbb{P}^m \rightarrow K$ be regular, i.e locally constant. That means that
$$
\forall Q \in \mathbb{P}^m, \
\exists U_Q \stackrel{\text{open}}{\subseteq} \mathbb{P}^m, \
\text{ such that } \# \phi(U_Q) = 1
$$
Where $U_Q$ denotes a neighbourhood of $Q$. 
Now we consider $f \circ \phi \ : \ \mathbb{P}^n \rightarrow K$.
Let $P \in \mathbb{P}^n$. For $\phi(P) \in \mathbb{P}^m$ we obtain an open neighbourhood $U_{\phi(P)}$ as described above.
Hence $V_P \ := \ \phi^{-1}(U_{\phi(P)})$ is an open neighbourhood for $P$ on which $f \circ \phi$ is constant, as desired.

It seems so strange because I would say being a morphism of algebraic varieties is a much stronger property then being a continuous map. This is what you could help me with:


*

*Confirm that my reasoning is wrong.

*Point out where it went wrong.

*Provide a counterexemple to the statement I thought I proved.


Thanks in advance.
 A: Let me address your questions:

Confirm that my reasoning is wrong. 

Dear friend, your reason is, in fact, wrong. Or, more to the point it's based off of fallacious assumptions that I will address below.

Point out where it went wrong.

First, you should totally ignore the statement that regular functions on $\mathbb{P}^n$ are locally constant. While true, that's just...silly to say, and really misleading. In fact, recall that a locally constant function on a connected space is automatically constant. So, since most varieties we consider are connected, local constancy is the same thing as constancy. That, there, is the more instructive statement: every regular function $\mathbb{P}^n\to K$ is constant. 
The second issue that you have is the following. To show that a map of varieties $f:X\to Y$ is regular, you need to show that for every open $V\subseteq Y$ and every regular function $\varphi:V\to K$ the composition $\varphi\circ f:f^{-1}(V)\to K$ is regular. You have only shown in your proof when $X=\mathbb{P}^n$ and $Y=\mathbb{P}^m$ that this is true for $V=Y$--this is certainly not enough. For example, what do you do when you take $V=\mathbb{A}^m$ whose regular functions are just polynomials in $n$-variables?

Give me a counterexample to what I thought I proved.

As I mentioned above, the regular maps $\mathbb{P}^n\to\mathbb{P}^m$ are of the form
$$[x_0:\cdots:x_n]\mapsto [\varphi_1(x_0,\ldots,x_n):\cdots:\varphi_m(x_0,\ldots,x_n)]$$
where $\varphi_i$ are homogeneous polynomials of the same degree which have no common zeros on $\mathbb{P}^n$. 
So, any function not of that form, but continuous would work.
As a nudge towards a more concrete example, note that $\mathbb{P}^1$ has the cofinite topology. So any set-theoretic automorphism of $\mathbb{P}^1$ is continuous. I'm sure you can write one down that is not of the above form.
