# Showing the Affine functor $\underline{\mathbb{A}}^r$ is representable by Affine Space $\mathbb{A}^r := Spec(\mathbb{Z}[X_1, \dots, X_r])$

Let $$\underline{\mathbb{A}}^r$$ be the functor from $$\textbf{Schemes}$$ to $$\textbf{Sets}$$ which associates to each scheme $$S$$ the set of morphisms $$\bigoplus_{k=1}^rO_S \to O_S$$ ($$O_S$$ is the structure sheaf of $$S$$). Let $$\mathbb{A}^r$$ be the scheme $$Spec(\mathbb{Z}[X_1, \dots, X_r])$$.

Assume it is given that whenever $$X$$ is a scheme the restriction of $$\underline{\mathbb{A}}^r$$ to $$Top(X)$$ (which I presume is the subcategory of $$\textbf{Schemes}$$ consisting of the open subschemes of $$X$$ and the open immersions between them) is a sheaf of sets on $$X$$.

Assume further that the restriction of the representable functor $$h_{\mathbb{A}^r} := Mor(\_, \mathbb{A}^r)$$ to Top(X) is also a sheaf of sets on $$X$$.

If we wish to show that $$\underline{\mathbb{A}}^r$$ is representable by $$\mathbb{A}^r$$, why does it suffice to show that there is an isomorphism between $$\mathbb{A}^r$$ restricted to the category $$\textbf{Aff}$$ of affine schemes and $$\underline{\mathbb{A}}^r$$ restricted also to $$\textbf{Aff}$$? This is just stated at some point in a proof in my Schemes course.

I vaguely see that perhaps the fact that every scheme is a bunch of affine schemes glued together, and that 'sheaves allow us to glue', might help - but given that $$Top(X)$$ does not appear to be a full subcategory of $$\textbf{Schemes}$$ in general I do not quite follow the logic. It is stated that this fact follows from the two facts stated above about restrictions to $$Top(X)$$.

What am I misunderstanding, here?

• Your gluing idea is correct. A hint is that every scheme is a colimit of affines and Hom preserves colimits – Samir Canning Feb 22 at 16:52
• @SamirCanning I have thought about this but I still cannot see how it follows. You can decompose any Hom(X, Y) perhaps into a double colimit of Hom(Spec(R), Spec(S))'s, but unless each morphism between affine schemes is an open embedding I cannot really see how that helps. – Nethesis Mar 7 at 16:56
• Oh wait, it is just because any scheme has an open affine cover, and then you use the sheaf property to make the deduction. – Nethesis Mar 7 at 18:59
• Yes, that is it. – Samir Canning Mar 7 at 19:40