How can I make peace with contravariance?

120 Views Asked by At

My question is a bit vague, but I hope it can be answered in a good way.

Various arguments involving contravariance sometimes trip me up when coming up with proofs in algebraic geometry and related subjects. For example:

Let $V \subseteq \mathbb{A}^n(k)$ and $W \subseteq \mathbb{A}^m(k)$ be algebraic sets. Show that for each $k$-algebra homomorphism $\phi: O(W) \rightarrow O(V)$, there exists a polynomial map $f: V \rightarrow W$ such that $\phi(g) = g \circ f$, for all $g \in O(W)$.

Here is a proof: Write $(x_i)$ and $(y_j)$ for the coordinates on $V$ and $W$ respectively. Define $f = (f_1, \dots, f_m)$, where for each $j$, $f_j(x_1, \cdots, x_n) = \phi(y_j)$. Then, $\phi(y_j) = y_j \circ f$ by construction, so that $\phi(g) = g \circ f$ for all $g$ (because $g$ is a $k$-algebra homomorphism).

In some sense I answered my own question, but my real frustration is that it took me twenty minutes of confusion to write that down, despite the fact that the argument is essentially tautological, and despite a fair amount of practice on similar questions.

Is there a good way to intuitively master these sorts of arguments, so that one can produce them on demand without becoming confused?