Solve system of symbolic binary nonlinear equations
I have 10 binary variables $x_0$, ..., $x_4$ and $y_0$, ..., $y_4$. I know $y_i = x_i + x_{(i+1)\bmod 5}$.
I want to write $x_i$ in terms of $y$ variables.
I know for this toy case we can use Gaussian elimination. But in actual case $y_i$s are nonlinear equations.
I tried this idea:
n = 5
xy = [f'x{i}' for i in range(n)] + [f'y{i}' for i in range(n)]
R = PolynomialRing(GF(2), 2*n, xy)
R.inject_variables()
Z = list(R.gens())
E = [y_0 == x_0*x_1 + x_2,
y_1 == x_1*x_2+x_3,
y_2 == x_2*x_3+x_4,
y_3 == x_3*x_4+x_0,
y_4 == x_4*x_0+x_1]
solve(E, x0, x1, x2, x3, x4)
It is not working.
Please add the actual (nonlinear) case, so that a better answer can be given.
See https://ask.sagemath.org/question/516...