Solution (source code)

= Solution

The intended dynamical assumption is steady inviscid Euler flow of constant density, with conservative body-force potential $\Phi$. Its equation is $(\mathbf u\cdot\nabla)\mathbf u=-\nabla(p/\rho+\Phi)$. The <vector> identity
$$
(\mathbf u\cdot\nabla)\mathbf u=\nabla(\tfrac12|\mathbf u|^2)-\mathbf u\times(\nabla\times\mathbf u)
$$
then gives
$$
\boxed{\mathbf u\times\boldsymbol\omega=\nabla H,\qquad
H=\frac p\rho+\Phi+\frac12|\mathbf u|^2.}
$$
With no body force take $\Phi=0$. Taking the <scalar product> with $\mathbf u$ yields $\mathbf u\cdot\nabla H=0$, so the <Bernoulli function> is constant along streamlines, though not necessarily the same constant on different streamlines.

Choose the planar <streamfunction> convention $\mathbf u=(\psi_y,-\psi_x,0)$. Then $\boldsymbol\omega=(0,0,\omega)$ with $\omega=-\nabla^2\psi$, and
$$
\mathbf u\times\boldsymbol\omega=(-\omega\psi_x,-\omega\psi_y,0)=-\omega\nabla\psi.
$$
If locally $H=H(\psi)$, comparison with $\nabla H=H'(\psi)\nabla\psi$ gives
$$
\boxed{\frac{dH}{d\psi}+\omega=0}
$$
on the nonstagnant part of that flow. It extends to isolated stagnation points by continuity. Where the <streamfunction> is constant on an entire open region, cancellation of its zero <gradient> alone imposes no <derivative> condition on an arbitrarily extended $H(\psi)$.

Steadiness and incompressibility alone, without the inviscid dynamical assumption, do not imply the stated identity. In a steady Newtonian viscous flow the correct form has $\mathbf u\times\boldsymbol\omega=\nabla H-\nu\nabla^2\mathbf u$. For example, a pressure-driven planar <Poiseuille flow> has a nonzero streamwise pressure <gradient> balanced by viscosity, while $\mathbf u\times\boldsymbol\omega$ has no streamwise component. This identifies the required qualification of the printed premise.