sympy solve linear equations XOR, NOT
<p>I have 60 equations with 70 variables.
all of them are in one list:</p>

<p>(x0,x1,...,x239) are sympy symbols</p>

<pre><code>list_a = [Xor(Not(x40), Not(x86)), Xor(x41, Not(x87)), ...]
</code></pre>

<p>and my question is, if it is possible somehow transform this equations to matrix or solved them.
I think, that it can have more than one solution.</p>

<p>A solution to a system of logic expressions is the same as checking SAT for the conjunction (And) of the expressions.</p>

<pre><code>In [3]: list_a = [Xor(Not(x40), Not(x86)), Xor(x41, Not(x87))]

In [4]: list_a
Out[4]: [Â¬xââ â» Â¬xââ, xââ â» Â¬xââ]

In [5]: satisfiable(And(*list_a))
Out[5]: {x87: False, x40: True, x86: False, x41: False}
</code></pre>

<p>If you want all solutions you can pass <code>all_models=True</code>, although note that in the general case there are exponentially many solutions.</p>

python sympy equation algebra