I have been reading Hartshornes' Algebraic Geometry and am trying to understand the example II.8.12.1 about the sheaf of differentials on affine n-space:
Example 8.12.1: If $X = \mathbb{A}^{n}_{Y}$, then $\Omega_{X/Y}$ is a free $\mathcal{O}_{X}$-module of rank $n$, generated by the global sections $dx_{1},...,dx_{n}$, where $x_{1},...,x_{n}$ are the affine coordinates for $\mathbb{A}^{n}$.
I was hoping for a short explanation or hint about how to arrive at this, since Hartshorne has given none, and I have been unable to find any other help online. I am comfortable with the Kahler module of relative differentials and the module $\Omega_{B/A}$ when $B = A[x_{1},...,x_{n}]$, and sense that these two things are probably related, but cannot see how, so would appreciate hints in this respect.
Consider the case when we're looking at $\Bbb A^n_{\Bbb Z}\to \operatorname{Spec} \Bbb Z$. Then by direct calculation, we have that the sheaf of relative differentials is the sheaf associated to $\Bbb Z\langle dx_1,\cdots,dx_n\rangle$, the free module on $dx_1,\cdots,dx_n$. Now apply proposition II.8.10 to the fiber product square defining $X=\Bbb A^n_Y \cong \Bbb A^n_{\Bbb Z}\times_{\operatorname{Spec} \Bbb Z} Y$, which says that $\Omega_{X/Y}$ is isomorphic to the pullback of $\Omega_{\Bbb A^n_{\Bbb Z}/\operatorname{Spec} \Bbb Z}$ along the map $X\to \Bbb A^n_{\Bbb Z}$. But the pullback of a free sheaf is free on the same generators.