I am (slowly) reading Eisenbud and Harris and trying to get my head around (affine) schemes.
Let $R$ be a ring, and $X=\text{spec}(R)$, as usual with the Zariski topology. We have a basis of open sets; for $f \in R$, $X_f=\{ p \subset R | f \notin p \}$ where $p$ is a prime ideal. Then the structure sheaf is $\mathcal{O}(X_f) = R_f$, the localization of the ring $R$ with respect to the multiplicative subset $\{ 1,f,f^2,\ldots \}$.
Exercise I-20 in E-H is to calculate the points and sheaf of functions for some schemes
1) $X_1 = \text{Spec } \mathbb{C}[x]/(x^2)$
This shouldn't be to hard - there is exactly one (closed) point corresponding to the maximal ideal $(x)$ in which case $X_1 = \{(x)\}$. Thus the only open sets are $\emptyset \subset X_1$ and then $\mathcal{O}(\emptyset) = 0$ and $\mathcal{O}(X_1) = \mathbb C[x]/(x^2)$
Is this correct?
2) $X_2 = \text{Spec } \mathbb{C}[x](x^2-x)$ Here we should have exactly two (closed) points: $(x),(x-1)$. Call these $\{ a,b \}$. The topology should then be $\{\emptyset,\{a \}, \{ b \}, \{a, b\} \}$ (the discrete topology). Again we have $\mathcal{O}(\emptyset) =0 $ and $\mathcal{O}(\{ a,b \}) = \mathbb C[x]/(x^2-x)$.
Now $ \begin{align} \mathcal{O}(\{ a \}) &= [\mathbb C[x]/(x^2-x)]_{(x)} \\ &\simeq [\mathbb C[x]/(x(x-1)]_{(x)} \end{align} $
Am I now localizaing with respect to the multiplicative set $R - \mathfrak{p}$ where $\mathfrak{p}=(x)$ and $R = \mathbb C[x]/(x^2-x)$? And then is this just: $ \begin{align} \mathcal{O}(\{ a \}) &\simeq [\mathbb C[x]/(x(x-1)]_{(x)} \\ &\simeq [\mathbb C[x]/(x-1)]_{(x)} \\ &\simeq \mathbb{C} \end{align} $ ?