About Boolean Function
I want to find the Algebraic Normal Form of a boolean function.
sage: R.<x1,x2,x3> = BooleanPolynomialRing(3, order='degneglex') sage: x3>x1 True sage: L = BooleanFunction(x1+x2*x3) sage: L.truth_table() (False, True, False, True, False, True, True, False) sage: L.algebraic_normal_form() x0 + x1*x2
Unfortunately, Algebraic Normal Form of this specific boolean function is not correct (x0 should be x3, x1 should be x2 and x2 should be x1). The answer of the ANF() method is in order='lex' (not as I desired in order = 'degneglex'). Furthermore, the ANF() form is calculated out of this ring (x0 involved?)
How should I extract the ANF() in correct syntax (where x3>x2>x1)?