How to avoid nested loops intelligently with the computer when solving Diophantine equations with finite range of variables?

68 Views Asked by At

I have 59 quadratic equations in 59 variables $\{x_1, ..., x_{59}\}$ and I'm interested in the integer solutions of this equation system, where all $x_i$ can have values only between $-100$ and $+100$.

I would like to let a computer solve this problem via brute force.

Now, I don't like to let the computer calculate through 59 nested loops of size 201, since this will take too long.

On the other hand, some equations are very simple, like $x_1^2 + x_2^2 + x_3^2 =1$, such that this limits the number of solutions drastically.

Question: How to tell the computer to start with the easy equations and to maintain a list of conditions / solutions (see an example below) in order to solve the system in a reasonable time?

In the example above I would like the computer to automatically set up the cases $x_1=x_2=0, x_3=1$; $x_1=x_2=0, x_3=-1$, $x_1=x_3=0, x_2=1$; ... and then to continue the calculation only with these cases.

Is there a computer algebra system that can do this?

Thanks in advance.