Two definitions for non-singular in codimension 1

629 Views Asked by At

I am trying to understand how the following definitions are the same.

Shafarevich definition (pg 128) - A variety is non-singular in codimension one if the singular locus has codimension $> 1$.

Hartshorne definition (pg 130) - A scheme is non-singular in codimension one if every local ring $\mathcal{O}_x$ of dimension one is regular.

My question is how to prove Hartshorne $\implies$ Shafarevich.

I guess that if $X$ is an affine variety and $Sing(X)$ has an irreducible component $Y$ of codimension one, then the local ring $\mathcal{O}_{\mathfrak{p}}$ of the corresponding prime $\mathfrak{p}$ should be non-regular. Is this true? If so where can I find the proof?