Regular in codimension one (source code)

= Regular in codimension one

A <locally Noetherian scheme> $X$ is regular in codimension one, or satisfies $(R_1)$, if every <local ring> $\mathcal O_{X,x}$ of <Krull dimension> at most one is a <regular local ring>. This includes both the <generic points> and the codimension-one <points> of its <irreducible components>. Together with the depth condition $(S_2)$, it is equivalent to <normality> by <Serre criterion for normality>.<The Stacks project>[Section 28.12, Definition 28.12.1 and Lemma 28.12.5, tag 033P]{ref}

For an <integral scheme>, the <local ring> at its <generic point> is already its <function field>, so only the codimension-one <points> need checking; their <local rings> must be <discrete valuation rings>. For a general <scheme>, omitting the generic-point test changes the condition. The <nonreduced double point> has no codimension-one <points> at all, but its zero-dimensional <local ring> $k[\varepsilon]/(\varepsilon^2)$ is not a <regular local ring>. Thus it fails $(R_1)$ despite satisfying the empty list of exactly-codimension-one tests.