let $f:M \rightarrow \mathbb{R}$ be a nowhere vanishing function defined on a Riemannian manifold $(M,g)$. consider the distribution $\ker(df)$. This is clearly involutive and thus defines a foliation. My question is now: is it possible that the dimension of the foliation changes or it remains $n-1$, where $n = \dim(M)$? Well this should depend on the function, right? What conditions, on $f$, does one need to impose in order that the foliation remains codimension one?
bill