| 1 | initial version |
An import statement is needed to make your code work in Sage 7.4.
sage: R.<x1,x2,x3> = BooleanPolynomialRing(3, order='degneglex')
sage: x3>x1
True
sage: L = BooleanFunction(x1+x2*x3)
Traceback (most recent call last)
...
NameError: name 'BooleanFunction' is not defined
sage: from sage.crypto.boolean_function import BooleanFunction
sage: L = BooleanFunction(x1+x2*x3)
sage: L.algebraic_normal_form()
x0 + x1*x2
You can access the documentation for algebraic_normal_form with
sage: L.algebraic_normal_form?
and the whole source code with
sage: L.algebraic_normal_form??
Maybe you could suggest how the code should be amended to take variable names and ordering into account.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.