Projective space as the glue of affine schemes: checking the cocycle condition One construction of projective space over a ring $A$ is to take $n+1$ affine opens given by $$ U_i = \operatorname{Spec} \frac{A\left[\frac{x_0}{x_i}, \dots, \frac{x_n}{x_i}\right]}{x_i/x_i-1},$$ and then gluing along the open sets $D(x_j/x_i)$, which admit the explicit description $$U_{ij} = \operatorname{Spec} \frac{A\left[\frac{x_0}{x_i}, \dots, \frac{x_n}{x_i}, \frac{1}{x_j/x_i}\right]}{x_i/x_i-1}.$$
We take the gluing isomorphisms $\phi_{ij}$ by sending $x_k/x_i$ to $\frac{x_k/x_j}{x_i/x_j}$ and $x_k/x_j$ to $\frac{x_k/x_i}{x_j/x_i}$.
I want to check that these isomorphisms agree on the triple intersections.
The first hint is to show the triple intersection $U_{ij} \cap U_{jk} \cap U_{ik}$ is affine.
I think the corresponding ring should look like
$$ \frac{A\left[\frac{x_0}{x_i}, \dots, \frac{x_n}{x_i}, \frac{x_0}{x_j}, \dots, \frac{x_n}{x_j}, \frac{1}{x_j/x_i}, \frac{1}{x_k/x_i}, \frac{1}{x_k/x_j}\right]}{(x_i/x_i-1, x_j/x_j-1)}.$$
Then via the gluing ismorphisms, I have $$ \frac{1}{x_j/x_i} = x_i/x_j, \\ \frac{1}{x_k/x_i} = \frac{x_i/x_j}{x_k/x_j} = x_i/x_j \cdot x_k/x_i \cdot x_i/x_j, \\ \frac{1}{x_k/x_j} = \frac{x_k/x_i}{x_j/x_i} = x_k/x_i \cdot x_i/x_j.$$
I don't believe I assume anywhere in this calculation that the cocycle condition holds. Thus the intersection should reduce to
$$ \frac{A\left[\frac{x_0}{x_i}, \dots, \frac{x_n}{x_i}, \frac{x_0}{x_j}, \dots, \frac{x_n}{x_j}\right]}{(x_i/x_i-1, x_j/x_j-1)}.$$
Since this is independent of which gluing isomorphism I use first, I'm quite sure this shows that the gluing information agrees on triple intersections, but as this is my first time working with these concepts I am not sure if it is complete. Is there a better way to see the result?
 A: Let $R \subset A(x_0,\dotsc,x_n)$ be the ring of rational functions with coefficients in $A$, with numerator and denominator homogeneous of the same degree. To allow non-integral domain rings $A$, let's add the restriction that denominators of elements in $R$ have to be monomials with coefficient $1$.
Then each of the open sets $U_i$ corresponds to the subring of $R$ consisting of elements with denominators that are just powers of $x_i$. This is not great notation, but let's write $R_i$ for this ring, so $R_i = \{p/q \colon \deg(p)=\deg(q), q = x_i^t\}$. So $U_i = \operatorname{Spec}(R_i)$.
Similarly, let's write $R_{ij}$ for the elements $p/q$, $q = x_i^t x_j^u$, and similarly $R_{ijk}$ for the elements whose denominator factors in powers of $x_i,x_j,x_k$.
These are subrings of $R$.
And in fact $U_{ij} = \operatorname{Spec}(R_{ij})$,
and $U_{ijk} = \operatorname{Spec}(R_{ijk})$.
More than this, the inclusion maps $U_{ijk} \subset U_{ij} \subset U_i$
correspond to the inclusions $R_i \subset R_{ij} \subset R_{ijk}$.
At this point the agreement on triple intersections (the fact that $U_{ijk} \to U_{ij} \to U_j$ agrees with $U_{ijk} \to U_{jk} \to U_j$)
is pretty immediate from the fact that the inclusion maps of rings are all compatible, $R_j \subset R_{ij} \subset R_{ijk}$ gives the same inclusion map as $R_j \subset R_{jk} \subset R_{ijk}$.
