In algebraic geometry, a closed immersion i : X ↪ Y {\displaystyle i:X\hookrightarrow Y} of schemes is a regular embedding of codimension r if each point x in X has an open affine neighborhood U in Y such that the ideal of X ∩ U {\displaystyle X\cap U} is generated by a regular sequence of length r. A regular embedding of codimension one is precisely an effective Cartier divisor.