Cochran's Theorem says that
The conditional distribution of $\chi^2=\sum_{i=1}^nX_i^2$ under $m(<n)$ independent homogeneous linear constraints: $$\begin{align}a_{11}X_1+\cdots\dots +a_{1n}X_n&=0\\\vdots \\a_{m1}X_1+\cdots\dots +a_{mn}X_n&=0\end{align}$$ is $\chi ^2_{n-m}$, provided $X_1,\dots,X_n$ are i.i.d $N(0,1)$ variables.
It is clear that if the constraint is linear then the dergees of freedom(d.f) diminise.If we consider non-linear (like quadratic or cubic) constraint what will be the effect on the d.f of $\chi^2$ distribution.