----
> [!definition] Definition. ([[scheme]])
> A **scheme** is a [[locally ringed space]] $(X, \mathcal{O}_{X})$ with an [[cover|open cover]] $\{ U_{i} \}_{i \in I}$ such that each $(U_{i}, \mathcal{O}_{X} |_{U_{i}})$ is an [[affine scheme]].
>
Here, $\mathcal{O}_{X} |_{U_{i}}$ denotes the [[restriction sheaf|restriction]] of the [[sheaf]] $\mathcal{O}_{X}$ to the open subset $U_{i} \subset X$.[^2]
>
[[scheme|Schemes]] are objects of the [[category]] $\mathsf{Sch}$, with [[category|morphisms]] being [[morphism of locally ringed spaces|morphisms of locally ringed spaces]].
>
>The [[sheaf]] $\mathcal{O}_X$ is called the **structure sheaf** or **sheaf of regular functions** of the scheme, and is often suppressed from notation.
^definition
Note that distinguished open affines $D(f)$ [[condition for obtaining a basis from a topology|form]] [[topology generated by a basis|a]] [[basis for a topology|basis]] for the [[topological space|topology]] on $X$, in the following sense: Given an open set $a$ of $X$, and $x \in U$, we may consider an affine piece $\text{Spec }A_{i}$ containing $x$; then $\text{Spec }A_{i} \cap U$ is an open subset of $\text{Spec }A_{i}$. Since $\text{Spec }A_{i}$ has as basis sets of the form $D(f_{i})$, $f_{i}\in A_{i}$, we can find a $D(f_{i}) \subset \text{Spec }A_{i} \cap U$ containing $x$. Then $x \in D(f_{i}) \subset U$.
> [!intuition]
> If a [[manifold]] is a [[topological space]] that 'locally looks like Euclidean space', a scheme is a [[topological space]] that 'locally looks like an affine scheme $(\text{Spec }A, \mathcal{O}_{\text{Spec }A})