# On some doubts on tangent space of immersed submanifold

In Lee's book "Introduction to Smooth manifolds", he following lemma can be found. Lemma 8.26 Let $$M$$ be a smooth manifold, let $$S\subseteq M$$ be an embedded submanifold, and let $$Y$$ be a smooth vector field on $$M$$. Then $$Y$$ is tangent to $$S$$ iff $$Yf$$ vanishes on $$S$$ for all $$f\in C^\infty(M)$$ such that $$f|_S=0.$$

My question is what if $$S$$ just an immersed submanifold? Is the same conclusion true? It should be because earlier Lee proves that any immersed submanifold is locally embedded submanifold. But why does Lee state the theorem only for embedded submanifod?

The lemma is not true for immersed submanifolds. A counterexample is the irrational winding of the torus (see Example 4.20 in Lee). This is the image of the map $$\gamma:\mathbb{R}\rightarrow\mathbb{T}^{2}:t\mapsto (e^{2\pi it},e^{2\pi i\alpha t}),$$ where $$\alpha$$ is an irrational number. It is an immersed, but not an embedded submanifold.
Since $$\gamma(\mathbb{R})$$ is dense in $$\mathbb{T}^{2}$$, the zero function is the only function that vanishes on $$\gamma(\mathbb{R})$$. So for any vector field $$Y\in\mathfrak{X}(\mathbb{T}^{2})$$, we have $$f|_{\gamma(\mathbb{R})}=0 \Rightarrow Y(f)|_{\gamma(\mathbb{R})}=0$$. But not all vector fields on $$\mathbb{T}^{2}$$ are tangent to $$\gamma(\mathbb{R})$$.
Another example of an immersed but not embedded submanifold. Take $$F: \mathbb{R}\to \mathbb{R^2}$$ defined by $$F(t)=\left(2cos\left(t-\frac{\pi}{2}\right), 2sin\left(t-\frac{\pi}{2}\right)\right)$$ Then $$(F, \mathbb{R})$$ is an immersed submanifold of $$\mathbb{R^2}$$ but not an embedded submanifold of $$\mathbb{R^2}$$.
It looks like this and goes through the origin twice as the leminiscate loops around itself: 