Solution (source code)

= Solution

If $a\ne0$, the first equation defines the ellipse
$$
x_1^2+2x_2^2=a^2
$$
in the $(x_1,x_2)$-plane, a smooth one-dimensional manifold, while $x_3=ax_4$ defines a one-dimensional linear subspace in the $(x_3,x_4)$-plane. Their product is a smooth manifold, parametrized by
$$
(\theta,t)\longmapsto
(a\cos\theta,a\sin\theta/\sqrt2,at,t),
$$
so $\dim X_a=2$.

For $a=0$, positivity of the first equation forces $x_1=x_2=0$, and the second forces $x_3=0$. Hence
$$
X_0=\{(0,0,0,t):t\in\mathbb R\},
$$
a smooth line. Therefore
$$
\boxed{\ \dim X_a=2\text{ for }a\ne0,
\qquad \dim X_0=1.\ }
$$