Algebraic normal form (ANF) is a representation of functions in boolean algebra. Formulas written in ANF are also known as ring sum normal form (RSNF or RNF), Zhegalkin polynomials (Russian: полиномы Жегалкина), or Positive Polarity (or parity) Reed–Muller expansions (PPRM). These terms describe a way of writing propositional logic formulas in one of three sub-forms:
The entire formula is purely true or false: 1 0 One or more variables are combined into a term by AND (∧), then one or more terms are combined by XOR (⊕) together into ANF. Negations are not permitted: a⊕b⊕(a∧b)⊕(a∧b∧c) The previous subform with a purely true term: 1⊕a⊕b⊕(a∧b)⊕(a∧b∧c) Introduced by the Russian mathematician Ivan Ivanovich Zhegalkin in 1927, they are the polynomial ring over the integers modulo 2. The resulting degeneracies of modular arithmetic result in Zhegalkin polynomials being simpler than ordinary polynomials, requiring neither coefficients nor exponents. Coefficients are redundant because 1 is the only nonzero coefficient. Exponents are redundant because in arithmetic mod 2, x2 = x. Hence a polynomial such as 3x2y5z is congruent to, and can therefore be rewritten as, xyz.
History Prior to 1927, Boolean algebra had been considered a calculus of logical values with logical operations of conjunction, disjunction, negation, and so on. Zhegalkin showed that all Boolean operations could be written as ordinary numeric polynomials, representing the false and true values as 0 and 1, the integers mod 2. Logical conjunction is written as xy, and logical exclusive-or as arithmetic addition mod 2, (written here as x⊕y to avoid confusion with the common use of + as a synonym for inclusive-or ∨). The logical complement ¬x is then x⊕1. Since ∧ and ¬ form a basis for Boolean algebra, all other logical operations are compositions of these basic operations, and so the polynomials of ordinary algebra can represent all Boolean operations, allowing Boolean reasoning to be performed using elementary algebra. For example, the Boolean 2-out-of-3 threshold or median operation is written as the Zhegalkin polynomial xy⊕yz⊕zx. In 1927, in the same year as Zhegalkin's paper, the American mathematician Eric Temple Bell published a sophisticated arithmetization of Boolean algebra based on Richard Dedekind's ideal theory and general modular arithmetic (as opposed to arithmetic mod 2). The much simpler arithmetic character of Zhegalkin polynomials was first noticed in the west (independently, communication between Soviet and Western mathematicians being very limited in that era) by the American mathematician Marshall Stone in 1936 when he observed while writing up his celebrated Stone duality theorem that the supposedly loose analogy between Boolean algebras and rings could in fact be formulated as an exact equivalence holding for both finite and infinite algebras, leading him to substantially reorganize his paper over the next few years.
Formal properties
Formally a Zhegalkin monomial is the product of a finite set of distinct variables (hence square-free), including the empty set whose product is denoted 1. There are 2n possible Zhegalkin monomials in n variables, since each monomial is fully specified by the presence or absence of each variable. A Zhegalkin polynomial is the sum (exclusive-or) of a set of Zhegalkin monomials, with the empty set denoted by 0. A given monomial's presence or absence in a polynomial corresponds to that monomial's coefficient being 1 or 0 respectively. The Zhegalkin monomials, being linearly independent, span a 2n-dimensional vector space over the Galois field GF(2) (NB: not GF(2n), whose multiplication is quite different). The 22n vectors of this space, i.e. the linear combinations of those monomials as unit vectors, constitute the Zhegalkin polynomials. The exact agreement with the number of Boolean operations on n variables, which exhaust the n-ary operations on {0,1}, furnishes a direct counting argument for completeness of the Zhegalkin polynomials as a Boolean basis. This vector space is not equivalent to the free Boolean algebra on n generators because it lacks complementation (bitwise logical negation) as an operation (equivalently, because it lacks the top element as a constant). This is not to say that the space is not closed under complementation or lacks top (the all-ones vector) as an element, but rather that the linear transformations of this and similarly constructed spaces need not preserve complement and top. Those that do preserve them correspond to the Boolean homomorphisms, e.g. there are four linear transformations from the vector space of Zhegalkin polynomials over one variable to that over none, only two of which are Boolean homomorphisms.
Common uses ANF is a canonical form, which means that two logically equivalent formulas will convert to the same ANF, easily showing whether two formulas are equivalent for automated theorem proving. Unlike other normal forms, it can be represented as a simple list of lists of variable names—conjunctive and disjunctive normal forms also require recording whether each variable is negated or not. Negation normal form is unsuitable for determining equivalence, since on negation normal forms, equivalence does not imply equality: a ∨ ¬a is not reduced to the same thing as 1, even though they are logically equivalent. Putting a formula into ANF also makes it easy to identify linear functions (used, for example, in linear-feedback shift registers): a linear function is one that is a sum of single literals. Properties of nonlinear-feedback shift registers can also be deduced from certain properties of the feedback function in ANF.
Performing operations within algebraic normal form There are straightforward ways to perform the standard Boolean operations on ANF inputs in order to get ANF results. XOR (logical exclusive disjunction) is performed directly:
(1 ⊕ x) ⊕ (1 ⊕ x ⊕ y) 1 ⊕ x ⊕ 1 ⊕ x ⊕ y 1 ⊕ 1 ⊕ x ⊕ x ⊕ y y NOT (logical negation) is XORing 1:
¬(1 ⊕ x ⊕ y) 1 ⊕(1 ⊕ x ⊕ y) 1 ⊕ 1 ⊕ x ⊕ y x ⊕ y AND (logical conjunction) is distributed algebraically
(1 ⊕ x)(1 ⊕ x ⊕ y) 1(1 ⊕ x ⊕ y) ⊕ x(1 ⊕ x ⊕ y) (1 ⊕ x ⊕ y) ⊕ (x ⊕ x ⊕ xy) 1 ⊕ x ⊕ x ⊕ x ⊕ y ⊕ xy 1 ⊕ x ⊕ y ⊕ xy OR (logical disjunction) uses either 1 ⊕ (1 ⊕ a)(1 ⊕ b) (easier when both operands have purely true terms) or a ⊕ b ⊕ ab (easier otherwise):
(1 ⊕ x) + (1 ⊕ x ⊕ y) 1 ⊕ (1 ⊕ 1 ⊕ x)(1 ⊕ 1 ⊕ x ⊕ y) 1 ⊕ x(x ⊕ y) 1 ⊕ x ⊕ xy
… excerpt ends here. Continue reading the full article.

