I'm looking for a smooth function $f:\mathbb{R}^3\rightarrow \mathbb{R}$ with a non-vanishing gradient, such that the vector fields: $$X=(0,1,0) \qquad Y=(1,0,y)$$ are tangent to each 2-dim submanifold given by $f_c=\{x\in\mathbb{R}^n; f(x)=c\}$.
My attempt:
$df=df_c$ and additionally: $\langle X(\textbf x),df (\textbf x)\rangle=0 \quad\langle Y(\textbf x),df (\textbf x)\rangle=0 $. This gives: $$\frac{\partial}{\partial y} f=0 \qquad(1)$$
$$\text{and}:$$ $$\frac{\partial}{\partial x}f+y\frac{\partial}{\partial z}f=0 \qquad(2)$$
Conclusion:If $(2)$ needs to hold for all $y$, then there is no such function, because $f$ must be independent of $y$ according to $(1)$.
My question:
Is my conclusion correct? I understand that there is an explanation using Lie brackets and the Fröbenious theorem, can someone help me with that?