Extending vector fields on algebraic varieties Let $X \subseteq Y$ be a pair of affine algebraic varieties over $\mathbb C$. Suppose we have a regular vector field $\partial$ on $X$.
Is it true that one can always extend it to a regular vector field on $Y$?

Question: "Is it true that one can always extend it to a regular vector field on Y?"
Answer: Assume for simplicity that $i:X:=Spec(B) \rightarrow Y:=Spec(A)$ where $B:=A/I$.  There is the cotangent sequence
$$ I/I^2 \rightarrow B\otimes_A \Omega^1_{A/k} \rightarrow \Omega^1_{B/k} \rightarrow 0$$
and dualizing (assume there is an isomorphism $Hom_B(B\otimes_A \Omega^1_{A/k},A)\cong B\otimes_A Der_k(A)$)
$$0 \rightarrow Der_k(B) \rightarrow B\otimes_A Der_k(A) \rightarrow^{\phi} Hom_B(I/I^2,B).$$
This is (when $X \subseteq Y$ is a nonsingular subvariety of a non-singular variety $Y$) the sequence on page 182 in Hartshorne
$$N1.\text{  }0 \rightarrow T_X \rightarrow^u i^*(T_Y) \rightarrow N_{Y/X} \rightarrow 0$$
and in this case, the sequence $N1$ splits. And this means that for any vector field $x$ on $X$ there is a vector field $y$ on $Y$ "restricting" to $x$. There is a map $j: i^*(T_Y) \rightarrow T_X$ with $u \circ j = Id$ is the identity map (Thm.II.8.17  in HH).
