TITLE: What exactly is $\mathbb{P}_\mathbb{Z}^n$?
QUESTION [6 upvotes]: So, I have the following definition of $\mathbb{P}_A^n$ for an arbitrary (commutative) ring $A$, from Hartshorne:
Set $S=A[x_0,\ldots,x_n]$, so that $S=\bigoplus_{d\geq 0}S_d$ as a graded ring, $S_+=\bigoplus_{d\geq 1}S_d$, and for convenience, let $S^\mathrm{H}=\bigcup_{d\geq 0} S_d$ denote the homogeneous elements. We define the set $\mathrm{Proj}\ S=\{\mathfrak{p}\subset S \mid \mathfrak{p} \mathrm{\ hmg.\ prime}, S_+ \nsubseteq\mathfrak{p}\}$ with closed sets $V(\mathfrak{a})=\{\mathfrak{p}\in\mathrm{Proj}\ S\mid \mathfrak{p}\supseteq\mathfrak{a}\}$ for all homogeneous ideals $\mathfrak{a}\subseteq S$.
Next, for all $\mathfrak{p}\in\mathrm{Proj}\ S$, we set $T_\mathfrak{p}=S^\mathrm{H}\setminus\mathfrak{p}$, $S_{(\mathfrak{p})}=\{\frac{f}{g}\in T_\mathfrak{p}^{-1} S \mid f\in S^\mathrm{H}, \deg f = \deg g\}$. Finally, for any open subset $U\subseteq\mathrm{Proj}\ S$, we define $$\mathcal{O}(U)=\{s:U\to\bigsqcup_\mathfrak{p} S_{(\mathfrak{p})} \mid \forall\ \mathfrak{p}\in U, s(\mathfrak{p})\in S_{(\mathfrak{p})}, \exists\ \mathfrak{p}\in V\subseteq U \mathrm{\ open}, a,f \in S^\mathrm{H} \mathrm{\ s.t.\ } \deg\frac{a}{f} = 0, \mathrm{\ and\ }\forall\ \mathfrak{q}\in V, f\notin\mathfrak{q}, s(\mathfrak{q})=\frac{a}{f}\in S_{(\mathfrak{q})}\}$$
When $A$ is an algebraically closed field, I can see the analogy with the projective space $\mathbb{P}^n$ of classical algebraic geometry. But for arbitrary rings, even for the simplest case of $A=\mathbb{Z}$, I struggle to make sense of this mess of symbols. Is there some good intuition to keep in mind when working with $\mathbb{P}_A^n$, or some simpler way of describing the ring of regular functions?
At the very least, I'd like to understand what's going on in $\mathbb{P}_\mathbb{Z}^n$, to gain some intuition for the more general case.

REPLY [2 votes]: A typical way to picture this is to look at affine patches.
If, for example, $X,Y,Z$ are your standard coordinates on $\mathbb{P}^2$, then if we remove the subscheme $Z=0$, we are left with a copy of the affine plane $\mathbb{A}^2 \cong \mathrm{Spec}\left(\mathbb{Z}[\frac{X}{Z}, \frac{Y}{Z}] \right) \subseteq \mathbb{P}^2$.
The subscheme $Z=0$, incidentally, is isomorphic to the projective line $\mathbb{P}^1$. So you can think of the projective plane as the affine plane together with a projective line encircling it. This picture works in higher dimensions as well.
Similarly, if we remove $Y=0$, we get a different copy of the affine plane $\mathbb{A}^2 = \mathrm{Spec}\left(\mathbb{Z}[\frac{X}{Y}, \frac{Z}{Y}] \right)$.
These two copies of the affine plane overlap: their intersection is
$$ \mathrm{Spec}\left(\mathbb{Z}\left[\frac{X}{Z}, \frac{Y}{Z}, \frac{X}{Y}, \frac{Z}{Y}\right] \right)
=  \mathrm{Spec}\left(\mathbb{Z}\left[\frac{X}{Z}, \frac{Y}{Z}, \left(\frac{Y}{Z}\right)^{-1}\right] \right)
\cong \mathbb{A}^2 \setminus \mathbb{A}^1
$$
If we remove $X=0$, we get yet another copy of the affine plane $\mathbb{A}^2 = \mathrm{Spec}\left(\mathbb{Z}[\frac{Y}{X}, \frac{Z}{X}] \right)$.
These three copies of the affine plane are enough to cover the projective plane. So if you need to, you can do computations in these three affine patches, transferring from one to another as needed. Or to define things, define them on each patch and ensure they're consistent. (or other things, like define something on one affine patch and then extend it by continuity or whatever to the whole projective space)