Proposition (morphism and pullback preserving local rings)

Let $f: X\to Y$ be a function between irreducible affine varieties. The following are equivalent:

  1. $f$ is a morphism.

  2. For any $x\in X$, the pullback extends to a ring homomorphism between local rings $$ \begin{align*} O_{Y,f(x)} &\to O_{X,x} \\ ϕ = \frac{g}{h} &\mapsto f^\ast ϕ := \frac{g \circ f}{h \circ f}. \end{align*} $$

Proof