Solution (source code)

= Solution

The points of the <spectrum of a commutative ring> $A$ are its <prime ideals>. Its <Zariski topology> has closed sets $V(I)=\{\mathfrak p:I\subseteq\mathfrak p\}$ and basis $D(f)=\{\mathfrak p:f\notin\mathfrak p\}$. The <structure sheaf of a scheme> can be defined as follows: a section over $U$ assigns an element of $A_{\mathfrak q}$ to every $\mathfrak q\in U$, and locally that assignment is represented by one fraction $a/s$, with $s$ outside every prime in the neighbourhood. Restrictions forget values. Local representability and equality can be checked on an <open cover>, so these assignments satisfy the <sheaf gluing axiom>. On $D(f)$ the sections identify with the <localization of a ring> $A_f$.

Evaluation at $\mathfrak p$ induces the <ring homomorphism> $\mathcal O_{X,\mathfrak p}\to A_{\mathfrak p}$. It is surjective because $a/s\in A_{\mathfrak p}$ is represented by a section on $D(s)$. For injectivity, represent a germ by $a/s$ on a neighbourhood of $\mathfrak p$. If its value in $A_{\mathfrak p}$ vanishes, there is $t\notin\mathfrak p$ with $ta=0$. The section is then zero after restricting to $D(st)$ inside that neighbourhood. Its <germ> is zero. Thus
$$
\boxed{\mathcal O_{X,\mathfrak p}\cong A_{\mathfrak p}.}
$$