I know that each polynomial $f_{i}$ is a function of $n^2$ variables where $n$ is determined by input from the user. Is there any way that I can reduce this system of polynomial equations in Python (or with a Sage package) to a minimal number of polynomials and variables?