I am wondering under which conditions the intersection of two smooth manifolds, say $X$ and $Y$, is a smooth manifold. I know that if they intersect transversally then the intersection is a manifold.
Now suppose that the manifolds do not intersect transversally. Can the intersection still be a manifold? And can the formula $\operatorname{codim}(X\cap Y)=\operatorname{codim}(X)+\operatorname{codim}(Y)$ still be valid?