# Is a map given by a function from the ring of global regular functions a morphism?

I'm trying to answer the following question:

Show if $X$ is a prevariety and $f \in \mathcal{O}_X(X)$, then the map $f:X \rightarrow \mathbb{A}^1$ by $x \mapsto f(x)$ is a morphism.

I'm stuck trying to show that if $\phi \in \mathcal{O}_{\mathbb{A}^1}(U)$, where $U \subset \mathbb{A}^1$ open, then $f^*\phi \in \mathcal{O}_X(f^{-1}(U))$. Here is some of my thinking so far:

Since $U$ is open in $\mathbb{A}^1$, $U = \mathbb{A}^1\setminus \{p_1,...,p_k\}$ and so for any point $a \in U$, around some neighborhood of $a$ in $U$, $\phi = f(x)/g(x)$ where $g$ has roots in $\{p_1,...,p_k\}$.

$X$ is a prevariety, so it has a cover by affine varieties $\{X_i\}_i$ where $X_i$ with structure ring $\mathcal{O}_X\mid_{X_i}$ is isomorphic to an affine variety. I'm not sure how to (if possible) leverage this to get my needed result.

Any hints would be appreciated!

Suppose that $\phi=F(x)/G(x)$, where $G$ has roots in $\{p_1,\ldots ,p_n\}$. Then $\phi^*f$ is equal to $F(f)/G(f)$. $G(f)$ has no zeros on $f^{-1}(U)$ and therefore it is invertible. In fact any regular function on $U$ has this form, but if you don't know this, you can take a cover of $U$ such that on each element of it the function $\phi$ has this simple form. Then on each element of the preimage of this cover $f^*\phi$ is regular, therefore it is regular everywhere.