normal forms (logic)

36
Normal forms (logic) From Wikipedia, the free encyclopedia

Upload: man

Post on 06-Nov-2015

303 views

Category:

Documents


1 download

DESCRIPTION

1. From Wikipedia, the free encyclopedia2. Lexicographical order

TRANSCRIPT

  • Normal forms (logic)From Wikipedia, the free encyclopedia

  • Contents

    1 Algebraic normal form 11.1 Common uses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Performing operations within algebraic normal form . . . . . . . . . . . . . . . . . . . . . . . . . 11.3 Converting to algebraic normal form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Formal representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    1.4.1 Recursively deriving multiargument Boolean functions . . . . . . . . . . . . . . . . . . . 31.5 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    2 Head normal form 42.1 Beta reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 Reduction strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.3 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    3 Blake canonical form 63.1 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.2 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    4 Conjunctive normal form 74.1 Examples and Non-Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74.2 Conversion into CNF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.3 First-order logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.4 Computational complexity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.5 Converting from rst-order logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.6 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.7 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.8 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.9 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    5 Disjunctive normal form 115.1 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125.2 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    i

  • ii CONTENTS

    6 Head normal form 136.1 Beta reduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136.2 Reduction strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136.3 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146.4 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    7 Herbrandization 157.1 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    8 Herbrandization 178.1 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

    9 Horn clause 199.1 Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199.2 Logic programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199.3 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209.4 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    10 Negation normal form 2210.1 Examples and counterexamples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2210.2 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2310.3 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

    11 Prenex normal form 2411.1 Conversion to prenex form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    11.1.1 Conjunction and disjunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2411.1.2 Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2511.1.3 Implication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2511.1.4 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2511.1.5 Intuitionistic logic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    11.2 Use of prenex form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2611.3 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2711.4 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2711.5 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    12 Skolem normal form 2812.1 How Skolemization works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2812.2 Uses of Skolemization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2912.3 Skolem theories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2912.4 See also . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2912.5 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3012.6 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

  • CONTENTS iii

    12.7 External links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3012.8 Text and image sources, contributors, and licenses . . . . . . . . . . . . . . . . . . . . . . . . . . 31

    12.8.1 Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3112.8.2 Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3112.8.3 Content license . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

  • Chapter 1

    Algebraic normal form

    In Boolean algebra, the algebraic normal form (ANF), Zhegalkin normal form, or ReedMuller expansion is away of writing logical formulas in one of three subforms:

    The entire formula is purely true or false:10

    One or more variables are ANDed together into a term. One or more terms are XORed together into ANF.No NOTs are permitted:

    a b ab abc

    or in standard propositional logic symbols:

    a Y b Y (a ^ b) Y (a ^ b ^ c)

    The previous subform with a purely true term:1 a b ab abc

    Formulas written in ANF are also known as Zhegalkin polynomials (Russian: ) and PositivePolarity (or Parity) ReedMuller expressions.

    1.1 Common usesANF is a normal form, which means that two equivalent formulas will convert to the same ANF, easily showingwhether two formulas are equivalent for automated theorem proving. Unlike other normal forms, it can be representedas a simple list of lists of variable names. Conjunctive and disjunctive normal forms also require recording whethereach variable is negated or not. Negation normal form is unsuitable for that purpose, since it doesn't use equality asits equivalence relation: a a isn't reduced to the same thing as 1, even though they're equal.Putting a formula into ANF also makes it easy to identify linear functions (used, for example, in linear feedback shiftregisters): a linear function is one that is a sum of single literals. Properties of nonlinear feedback shift registers canalso be deduced from certain properties of the feedback function in ANF.

    1.2 Performing operations within algebraic normal formThere 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

  • 2 CHAPTER 1. ALGEBRAIC NORMAL FORM

    (1 x) (1 x y)1 x 1 x y1 1 x x yy

    NOT (logical negation) is XORing 1:[1]

    (1 x y)1 (1 x y)1 1 x yx y

    AND (logical conjunction) is distributed algebraically[2]

    (1 x)(1 x y)1(1 x y) x(1 x y)(1 x y) (x x xy)1 x x x y xy1 x y xy

    OR (logical disjunction) uses either 1 (1 a)(1 b)[3] (easier when both operands have purely true terms) or a b ab[4] (easier otherwise):

    (1 x) + (1 x y)1 (1 1 x)(1 1 x y)1 x(x y)1 x xy

    1.3 Converting to algebraic normal formEach variable in a formula is already in pure ANF, so you only need to perform the formulas boolean operations asshown above to get the entire formula into ANF. For example:

    x + (y z)x + (y(1 z))x + (y yz)x (y yz) x(y yz)x y xy yz xyz

    1.4 Formal representationANF is sometimes described in an equivalent way:

    where a0; a1; : : : ; a1;2;:::;n 2 f0; 1g fully describes f .

  • 1.5. SEE ALSO 3

    1.4.1 Recursively deriving multiargument Boolean functionsThere are only four functions with one argument:

    f(x) = 0 f(x) = 1 f(x) = x f(x) = 1 x

    To represent a function with multiple arguments one can use the following equality:

    f(x1; x2; : : : ; xn) = g(x2; : : : ; xn) x1h(x2; : : : ; xn) , where g(x2; : : : ; xn) = f(0; x2; : : : ; xn) h(x2; : : : ; xn) = f(0; x2; : : : ; xn) f(1; x2; : : : ; xn)

    Indeed,

    if x1 = 0 then x1h = 0 and so f(0; : : :) = f(0; : : :) if x1 = 1 then x1h = h and so f(1; : : :) = f(0; : : :) f(0; : : :) f(1; : : :)

    Since both g and h have fewer arguments than f it follows that using this process recursively we will nish withfunctions with one variable. For example, let us construct ANF of f(x; y) = x _ y (logical or):

    f(x; y) = f(0; y) x(f(0; y) f(1; y)) since f(0; y) = 0 _ y = y and f(1; y) = 1 _ y = 1 it follows that f(x; y) = y x(y 1) by distribution, we get the nal ANF: f(x; y) = y xy x = x y xy

    1.5 See also Boolean function Logical graph Zhegalkin polynomial Negation normal form Conjunctive normal form Disjunctive normal form

    1.6 References[1] WolframAlpha NOT-equivalence demonstration: a = 1 a

    [2] WolframAlpha AND-equivalence demonstration: (a b)(c d) = ac ad bc bd

    [3] From De Morgans laws

    [4] WolframAlpha OR-equivalence demonstration: a + b = a b ab

  • Chapter 2

    Head normal form

    In the lambda calculus, a term is in beta normal form if no beta reduction is possible.[1] A term is in beta-etanormal form if neither a beta reduction nor an eta reduction is possible. A term is in head normal form if there isno beta-redex in head position.

    2.1 Beta reductionIn the lambda calculus, a beta redex is a term of the form

    ((x:A(x))t)

    where A(x) is a term (possibly) involving variable x .A beta reduction is an application of the following rewrite rule to a beta redex

    ((x:A(x))t)! A(t)

    where A(t) is the result of substituting the term t for the variable x in the term A(x) .A beta reduction is in head position if it is of the following form:

    x0 : : : xi1:(xi:A(xi))M1M2 : : :Mn ! x0 : : : xi1:A(M1)M2 : : :Mn , where i 0; n 1 .

    Any reduction not in this form is an internal beta reduction.

    2.2 Reduction strategiesIn general, there can be several dierent beta reductions possible for a given term. Normal-order reduction is theevaluation strategy in which one continually applies the rule for beta reduction in head position until no more suchreductions are possible. At that point, the resulting term is in normal form.In contrast, in applicative order reduction, one applies the internal reductions rst, and then only applies the headreduction when no more internal reductions are possible.Normal-order reduction is complete, in the sense that if a term has a head normal form, then normal order reductionwill eventually reach it. In contrast, applicative order reduction may not terminate, even when the term has a normalform. For example, using applicative order reduction, the following sequence of reductions is possible:

    (x:z)((w:www)(w:www))

    4

  • 2.3. SEE ALSO 5

    ! (x:z)((w:www)(w:www)(w:www))! (x:z)((w:www)(w:www)(w:www)(w:www))! (x:z)((w:www)(w:www)(w:www)(w:www)(w:www)): : :

    But using normal-order reduction, the same starting point reduces quickly to normal form:

    (x:z)((w:www)(w:www))

    ! zSinots director strings is one method by which the computational complexity of beta reduction can be optimized.

    2.3 See also Lambda calculus Normal form (disambiguation)

    2.4 References[1] Beta normal form. Encyclopedia. TheFreeDictionary.com. Retrieved 18 November 2013.

  • Chapter 3

    Blake canonical form

    In Boolean logic, a formula for a Boolean function f is in Blake canonical form, also called the complete sum ofprime implicants,[1] the complete sum,[2] or the disjunctive prime form,[3] when it is a disjunction of all the primeimplicants of f.[4] Blake canonical form is a disjunctive normal form.The Blake canonical form is not necessarily minimal, however all the terms of a minimal sum are contained in theBlake canonical form.[2]

    It was introduced in 1937 by Archie Blake, who called it the simplied canonical form";[5] it was named in honorof Blake by Frank Markham Brown in 1990.[4]

    Blake discussed three methods for calculating the canonical form: exhaustion of implicants, iterated consensus, andmultiplication. The iterated consensus method was rediscovered by Samson and Mills, Quine, and Bing.[4]

    3.1 See also Horn clause

    3.2 Notes[1] Tsutomu Sasao, Ternary Decision Diagrams and their Applications, in Tsutomu Sasao, Masahira Fujita, eds., Represen-

    tations of Discrete Functions ISBN 0792397207, 1996, p. 278

    [2] Abraham Kandel, Foundations of Digital Logic Design, p. 177

    [3] Donald E. Knuth, The Art of Computer Programming 4A: Combinatorial Algorithms, Part 1, 2011, p. 54

    [4] Frank Markham Brown, The Blake Canonical Form, chapter 4 of Boolean Reasoning: The Logic of Boolean Equations,ISBN 0486427854, 2nd edition, 2012, p. 77 (rst edition, 1990)

    [5] Canonical expressions in Boolean algebra, Dissertation, Dept. of Mathematics, U. of Chicago, 1937, reviewed in J. C.C. McKinsey, The Journal of Symbolic Logic 3:2:93 (June 1938) doi:10.2307/2267634 JSTOR 2267634

    6

  • Chapter 4

    Conjunctive normal form

    In Boolean logic, a formula is in conjunctive normal form (CNF) or clausal normal form if it is a conjunction ofclauses, where a clause is a disjunction of literals; otherwise put, it is an AND of ORs. As a normal form, it is usefulin automated theorem proving. It is similar to the product of sums form used in circuit theory.All conjunctions of literals and all disjunctions of literals are in CNF, as they can be seen as conjunctions of one-literal clauses and conjunctions of a single clause, respectively. As in the disjunctive normal form (DNF), the onlypropositional connectives a formula in CNF can contain are and, or, and not. The not operator can only be used aspart of a literal, which means that it can only precede a propositional variable or a predicate symbol.In automated theorem proving, the notion "clausal normal form" is often used in a narrower sense, meaning a par-ticular representation of a CNF formula as a set of sets of literals.

    4.1 Examples and Non-ExamplesAll of the following formulas in the variables A, B, C, D, and E are in conjunctive normal form:

    :A ^ (B _ C) (A _B) ^ (:B _ C _ :D) ^ (D _ :E) A _B A ^B

    The last formula is in conjunctive normal form because it can be seen as the conjunction of the two single-literalclauses A and B . Incidentally, the last two formulas are also in disjunctive normal form.The following formulas are not in conjunctive normal form:

    :(B _ C) (A ^B) _ C A ^ (B _ (D ^ E)):

    Every formula can be equivalently written as a formula in conjunctive normal form. In particular this is the case forthe three non-examples just mentioned; they are respectively equivalent to the following three formulas, which are inconjunctive normal form:

    :B ^ :C (A _ C) ^ (B _ C) A ^ (B _D) ^ (B _ E):

    7

  • 8 CHAPTER 4. CONJUNCTIVE NORMAL FORM

    4.2 Conversion into CNFEvery propositional formula can be converted into an equivalent formula that is in CNF. This transformation is basedon rules about logical equivalences: the double negative law, De Morgans laws, and the distributive law.Since all logical formulae can be converted into an equivalent formula in conjunctive normal form, proofs are oftenbased on the assumption that all formulae are CNF. However, in some cases this conversion to CNF can lead to anexponential explosion of the formula. For example, translating the following non-CNF formula into CNF produces aformula with 2n clauses:

    (X1 ^ Y1) _ (X2 ^ Y2) _ _ (Xn ^ Yn):

    In particular, the generated formula is:

    (Xn1 _ Yn) ^ ^ (Y1 _ _ Yn1 _ Yn):

    This formula contains 2n clauses; each clause contains either Xi or Yi for each i .There exist transformations into CNF that avoid an exponential increase in size by preserving satisability rather thanequivalence.[1][2] These transformations are guaranteed to only linearly increase the size of the formula, but introducenew variables. For example, the above formula can be transformed into CNF by adding variables Z1; : : : ; Zn asfollows:

    (Z1 _ _ Zn) ^ (:Z1 _X1) ^ (:Z1 _ Y1) ^ ^ (:Zn _Xn) ^ (:Zn _ Yn):

    An interpretation satises this formula only if at least one of the new variables is true. If this variable is Zi , thenbothXi and Yi are true as well. This means that every model that satises this formula also satises the original one.On the other hand, only some of the models of the original formula satisfy this one: since the Zi are not mentionedin the original formula, their values are irrelevant to satisfaction of it, which is not the case in the last formula. Thismeans that the original formula and the result of the translation are equisatisable but not equivalent.An alternative translation, the Tseitin transformation, includes also the clauses Zi _:Xi _:Yi . With these clauses,the formula implies Zi Xi ^ Yi ; this formula is often regarded to dene Zi to be a name for Xi ^ Yi .

    4.3 First-order logicIn rst order logic, conjunctive normal form can be taken further to yield the clausal normal form of a logical formula,which can be then used to perform rst-order resolution. In resolution-based automated theorem-proving, a CNFformulaSee below for an example.

    4.4 Computational complexityAn important set of problems in computational complexity involves nding assignments to the variables of a booleanformula expressed in Conjunctive Normal Form, such that the formula is true. The k-SAT problem is the problem ofnding a satisfying assignment to a boolean formula expressed in CNF in which each disjunction contains at most kvariables. 3-SAT is NP-complete (like any other k-SAT problem with k>2) while 2-SAT is known to have solutionsin polynomial time. As a consequence,[3] the task of converting a formula into a DNF, preserving satisability, isNP-hard; dually, converting into CNF, preserving validity, is also NP-hard; hence equivalence-preserving conversioninto DNF or CNF is again NP-hard.Typical problems in this case involve formulas in 3CNF": conjunctive normal formwith no more than three variablesper conjunct. Examples of such formulas encountered in practice can be very large, for example with 100,000variables and 1,000,000 conjuncts.

  • 4.5. CONVERTING FROM FIRST-ORDER LOGIC 9

    A formula in CNF can be converted into an equisatisable formula in "kCNF (for k>=3) by replacing each conjunctwith more than k variablesX1_ _Xk _ _Xn by two conjunctsX1_ _Xk1_Z and :Z _Xk _Xnwith Z a new variable, and repeating as often as necessary.

    4.5 Converting from rst-order logicTo convert rst-order logic to CNF:[4]

    1. Convert to negation normal form.

    (a) Eliminate implications and equivalences: repeatedly replace P ! Q with :P _ Q ; replace P $ Qwith (P _ :Q) ^ (:P _Q) . Eventually, this will eliminate all occurrences of! and$ .

    (b) Move NOTs inwards by repeatedly applying De Morgans Law. Specically, replace :(P _ Q) with(:P ) ^ (:Q) ; replace :(P ^Q) with (:P ) _ (:Q) ; and replace ::P with P ; replace :(8xP (x))with 9x:P (x) ; :(9xP (x)) with 8x:P (x) . After that, a : may occur only immediately before apredicate symbol.

    2. Standardize variables

    (a) For sentences like (8xP (x)) _ (9xQ(x)) which use the same variable name twice, change the nameof one of the variables. This avoids confusion later when dropping quantiers later. For example,8x[9yAnimal(y)^:Loves(x; y)]_[9yLoves(y; x)] is renamed to 8x[9yAnimal(y)^:Loves(x; y)]_[9zLoves(z; x)] .

    3. Skolemize the statement

    (a) Move quantiers outwards: repeatedly replaceP^(8xQ(x))with 8x(P^Q(x)) ; replaceP_(8xQ(x))with 8x(P _Q(x)) ; replace P ^ (9xQ(x)) with 9x(P ^Q(x)) ; replace P _ (9xQ(x)) with 9x(P _Q(x)) . These replacements preserve equivalence, since the previous variable standardization step en-sured that x doesn't occur in P . After these replacements, a quantier may occur only in the initial prexof the formula, but never inside a : , ^ , or _ .

    (b) Repeatedly replace 8x1 : : :8xn 9y P (y) with 8x1 : : :8xn P (f(x1; : : : ; xn)) , where f is a new n -aryfunction symbol, a so-called "skolem function". This is the only step that preserves only satisabilityrather than equivalence. It eliminates all existential quantiers.

    4. Drop all universal quantiers.

    5. Distribute ORs inwards over ANDs: repeatedly replace P _ (Q ^R) with (P _Q) ^ (P _R) .

    As an example, the formula saying Who loves all animals, is in turn loved by someone is converted into CNF (andsubsequently into clause form in the last line) as follows (highlighting replacement rule redices in red ):Informally, the skolem function g(x) can be thought of as yielding the person by whom x is loved, while f(x) yieldsthe animal (if any) that x doesn't love. The 3rd last line from below then reads as " x doesn't love the animal f(x) ,or else x is loved by g(x) ".The 2nd last line from above, (Animal(f(x)) _ Loves(g(x); x)) ^ (:Loves(x; f(x)) _ Loves(g(x); x)) , is theCNF.

    4.6 Notes[1] Tseitin (1968)

    [2] Jackson and Sheridan (2004)

    [3] since one way to check a CNF for satisability is to convert it into a DNF, the satisability of which can be checked inlinear time

    [4] Articial Intelligence: A modern Approach [1995...] Russell and Norvig

  • 10 CHAPTER 4. CONJUNCTIVE NORMAL FORM

    4.7 See also Algebraic normal form Disjunctive normal form Horn clause QuineMcCluskey algorithm

    4.8 References Paul Jackson, Daniel Sheridan: Clause Form Conversions for Boolean Circuits. In: Holger H. Hoos, David G.Mitchell (Eds.): Theory and Applications of Satisability Testing, 7th International Conference, SAT 2004,Vancouver, BC, Canada, May 1013, 2004, Revised Selected Papers. Lecture Notes in Computer Science3542, Springer 2005, pp. 183198

    G.S. Tseitin: On the complexity of derivation in propositional calculus. In: Slisenko, A.O. (ed.) Structures inConstructive Mathematics and Mathematical Logic, Part II, Seminars in Mathematics (translated from Rus-sian), pp. 115125. Steklov Mathematical Institute (1968)

    4.9 External links Hazewinkel, Michiel, ed. (2001), Conjunctive normal form, Encyclopedia of Mathematics, Springer, ISBN978-1-55608-010-4

    Java applet for converting to CNF and DNF, showing laws used Mayuresh S. Pardeshi, Dr. Bashirahamed F. Momin Conversion of cnf to dnf using grid computing IEEE,ISBN 978-1-4673-2816-6

    Mayuresh S. Pardeshi, Dr. Bashirahamed F.Momin Conversion of cnf to dnf using grid computing in parallelIEEE, ISBN 978-1-4799-4041-7

  • Chapter 5

    Disjunctive normal form

    In boolean logic, a disjunctive normal form (DNF) is a standardization (or normalization) of a logical formulawhich is a disjunction of conjunctive clauses; it can also be described as an OR of ANDs, a sum of products, or (inphilosophical logic) a cluster concept. As a normal form, it is useful in automated theorem proving. A logical formulais considered to be in DNF if and only if it is a disjunction of one or more conjunctions of one or more literals. ADNF formula is in full disjunctive normal form if each of its variables appears exactly once in every clause. As inconjunctive normal form (CNF), the only propositional operators in DNF are and, or, and not. The not operator canonly be used as part of a literal, which means that it can only precede a propositional variable. For example, all ofthe following formulas are in DNF:

    (A ^ :B ^ :C) _ (:D ^ E ^ F )(A ^B) _ Cbut and also

    A ^BA

    However, the following formulas are NOT in DNF:

    :(A _B)A _ (B ^ (C _D))Converting a formula to DNF involves using logical equivalences, such as the double negative elimination, De Mor-gans laws, and the distributive law.All logical formulas can be converted into disjunctive normal form. However, in some cases conversion to DNF canlead to an exponential explosion of the formula. For example, in DNF, logical formulas of the following form have2n terms:

    (X1 _ Y1) ^ (X2 _ Y2) ^ ^ (Xn _ Yn)Any particular Boolean function can be represented by one and only one full disjunctive normal form, one of the twocanonical forms.An important variation used in the study of computational complexity is k-DNF. A formula is in k-DNF if it is inDNF and each clause contains at most k literals. Unlike the corresponding subclasses of conjunctive normal form fork>=3, there is no easy algorithm to convert an arbitrary instance of a formula in DNF to k-DNF.The following is a formal grammar for DNF:

    11

  • 12 CHAPTER 5. DISJUNCTIVE NORMAL FORM

    1. disjunct conjunct

    2. disjunct disjunct conjunct3. conjunct literal

    4. conjunct (conjunct literal)5. literal variable

    6. literal variable

    Where variable is any variable.

    5.1 See also Algebraic normal form Boolean function Boolean-valued function Conjunctive normal form Horn clause Karnaugh map Logical graph Propositional logic QuineMcCluskey algorithm Truth table

    5.2 External links Hazewinkel, Michiel, ed. (2001), Disjunctive normal form, Encyclopedia of Mathematics, Springer, ISBN978-1-55608-010-4

    Java applet for converting boolean logic expressions to CNF and DNF, showing the laws used

  • Chapter 6

    Head normal form

    In the lambda calculus, a term is in beta normal form if no beta reduction is possible.[1] A term is in beta-etanormal form if neither a beta reduction nor an eta reduction is possible. A term is in head normal form if there isno beta-redex in head position.

    6.1 Beta reductionIn the lambda calculus, a beta redex is a term of the form

    ((x:A(x))t)

    where A(x) is a term (possibly) involving variable x .A beta reduction is an application of the following rewrite rule to a beta redex

    ((x:A(x))t)! A(t)

    where A(t) is the result of substituting the term t for the variable x in the term A(x) .A beta reduction is in head position if it is of the following form:

    x0 : : : xi1:(xi:A(xi))M1M2 : : :Mn ! x0 : : : xi1:A(M1)M2 : : :Mn , where i 0; n 1 .

    Any reduction not in this form is an internal beta reduction.

    6.2 Reduction strategiesIn general, there can be several dierent beta reductions possible for a given term. Normal-order reduction is theevaluation strategy in which one continually applies the rule for beta reduction in head position until no more suchreductions are possible. At that point, the resulting term is in normal form.In contrast, in applicative order reduction, one applies the internal reductions rst, and then only applies the headreduction when no more internal reductions are possible.Normal-order reduction is complete, in the sense that if a term has a head normal form, then normal order reductionwill eventually reach it. In contrast, applicative order reduction may not terminate, even when the term has a normalform. For example, using applicative order reduction, the following sequence of reductions is possible:

    (x:z)((w:www)(w:www))

    13

  • 14 CHAPTER 6. HEAD NORMAL FORM

    ! (x:z)((w:www)(w:www)(w:www))! (x:z)((w:www)(w:www)(w:www)(w:www))! (x:z)((w:www)(w:www)(w:www)(w:www)(w:www)): : :

    But using normal-order reduction, the same starting point reduces quickly to normal form:

    (x:z)((w:www)(w:www))

    ! zSinots director strings is one method by which the computational complexity of beta reduction can be optimized.

    6.3 See also Lambda calculus Normal form (disambiguation)

    6.4 References[1] Beta normal form. Encyclopedia. TheFreeDictionary.com. Retrieved 18 November 2013.

  • Chapter 7

    Herbrandization

    The Herbrandization of a logical formula (named after Jacques Herbrand) is a construction that is dual to theSkolemization of a formula. Thoralf Skolem had considered the Skolemizations of formulas in prenex form as partof his proof of the Lwenheim-Skolem theorem (Skolem 1920). Herbrand worked with this dual notion of Her-brandization, generalized to apply to non-prenex formulas as well, in order to prove Herbrands theorem (Herbrand1930).The resulting formula is not necessarily equivalent to the original one. As with Skolemization which only preservessatisability, Herbrandization being Skolemizations dual preserves validity: the resulting formula is valid if and onlyif the original one is.Let F be a formula in the language of rst-order logic. We may assume that F contains no variable that is bound bytwo dierent quantier occurrences, and that no variable occurs both bound and free. (That is, F could be reletteredto ensure these conditions, in such a way that the result is an equivalent formula).The Herbrandization of F is then obtained as follows:

    First, replace any free variables in F by constant symbols.

    Second, delete all quantiers on variables that are either (1) universally quantied and within an even numberof negation signs, or (2) existentially quantied and within an odd number of negation signs.

    Finally, replace each such variable v with a function symbol fv(x1; : : : ; xk) , where x1; : : : ; xk are the variablesthat are still quantied, and whose quantiers govern v .

    For instance, consider the formula F := 8y9x[R(y; x) ^ :9zS(x; z)] . There are no free variables to replace. Thevariables y; z are the kind we consider for the second step, so we delete the quantiers 8y and 9z . Finally, we thenreplace y with a constant cy (since there were no other quantiers governing y ), and we replace z with a functionsymbol fz(x) :

    FH = 9x[R(cy; x) ^ :S(x; fz(x))]:The Skolemization of a formula is obtained similarly, except that in the second step above, we would delete quantierson variables that are either (1) existentially quantied and within an even number of negations, or (2) universallyquantied and within an odd number of negations. Thus, considering the same F from above, its Skolemizationwould be:

    FS = 8y[R(y; fx(y)) ^ :9zS(fx(y); z)]:To understand the signicance of these constructions, see Herbrands theorem or the Lwenheim-Skolem theorem.

    7.1 See also Predicate functor logic

    15

  • 16 CHAPTER 7. HERBRANDIZATION

    7.2 References Skolem, T. Logico-combinatorial investigations in the satisability or provability of mathematical proposi-tions: A simplied proof of a theorem by L. Lwenheim and generalizations of the theorem. (In van Hei-jenoort 1967, 252-63.)

    Herbrand, J. Investigations in proof theory: The properties of true propositions. (In van Heijenoort 1967,525-81.)

    van Heijenoort, J. From Frege to Gdel: A Source Book in Mathematical Logic, 1879-1931. Harvard UniversityPress, 1967.

  • Chapter 8

    Herbrandization

    The Herbrandization of a logical formula (named after Jacques Herbrand) is a construction that is dual to theSkolemization of a formula. Thoralf Skolem had considered the Skolemizations of formulas in prenex form as partof his proof of the Lwenheim-Skolem theorem (Skolem 1920). Herbrand worked with this dual notion of Her-brandization, generalized to apply to non-prenex formulas as well, in order to prove Herbrands theorem (Herbrand1930).The resulting formula is not necessarily equivalent to the original one. As with Skolemization which only preservessatisability, Herbrandization being Skolemizations dual preserves validity: the resulting formula is valid if and onlyif the original one is.Let F be a formula in the language of rst-order logic. We may assume that F contains no variable that is bound bytwo dierent quantier occurrences, and that no variable occurs both bound and free. (That is, F could be reletteredto ensure these conditions, in such a way that the result is an equivalent formula).The Herbrandization of F is then obtained as follows:

    First, replace any free variables in F by constant symbols.

    Second, delete all quantiers on variables that are either (1) universally quantied and within an even numberof negation signs, or (2) existentially quantied and within an odd number of negation signs.

    Finally, replace each such variable v with a function symbol fv(x1; : : : ; xk) , where x1; : : : ; xk are the variablesthat are still quantied, and whose quantiers govern v .

    For instance, consider the formula F := 8y9x[R(y; x) ^ :9zS(x; z)] . There are no free variables to replace. Thevariables y; z are the kind we consider for the second step, so we delete the quantiers 8y and 9z . Finally, we thenreplace y with a constant cy (since there were no other quantiers governing y ), and we replace z with a functionsymbol fz(x) :

    FH = 9x[R(cy; x) ^ :S(x; fz(x))]:The Skolemization of a formula is obtained similarly, except that in the second step above, we would delete quantierson variables that are either (1) existentially quantied and within an even number of negations, or (2) universallyquantied and within an odd number of negations. Thus, considering the same F from above, its Skolemizationwould be:

    FS = 8y[R(y; fx(y)) ^ :9zS(fx(y); z)]:To understand the signicance of these constructions, see Herbrands theorem or the Lwenheim-Skolem theorem.

    8.1 See also Predicate functor logic

    17

  • 18 CHAPTER 8. HERBRANDIZATION

    8.2 References Skolem, T. Logico-combinatorial investigations in the satisability or provability of mathematical proposi-tions: A simplied proof of a theorem by L. Lwenheim and generalizations of the theorem. (In van Hei-jenoort 1967, 252-63.)

    Herbrand, J. Investigations in proof theory: The properties of true propositions. (In van Heijenoort 1967,525-81.)

    van Heijenoort, J. From Frege to Gdel: A Source Book in Mathematical Logic, 1879-1931. Harvard UniversityPress, 1967.

  • Chapter 9

    Horn clause

    In mathematical logic and logic programming, aHorn clause is a logical formula of a particular rule-like form whichgives it useful properties for use in logic programming, formal specication, and model theory. Horn clauses arenamed for the logician Alfred Horn, who rst pointed out their signicance in 1951, in the article On sentenceswhich are true of direct unions of algebras", Journal of Symbolic Logic, 16, 1421.

    9.1 DenitionA Horn clause is a clause (a disjunction of literals) with at most one positive, i.e. unnegated, literal.Conversely, a disjunction of literals with at most one negated literal is called a dual-Horn clause.A Horn clause with exactly one positive literal is a denite clause; a denite clause with no negative literals issometimes called a fact; and a Horn clause without a positive literal is sometimes called a goal clause (note thatthe empty clause consisting of no literals is a goal clause). These three kinds of Horn clauses are illustrated in thefollowing propositional example:In the non-propositional case, all variables in a clause are implicitly universally quantied with scope the entire clause.Thus, for example:

    human(X) mortal(X)

    stands for:

    X( human(X) mortal(X) )

    which is logically equivalent to:

    X ( human(X) mortal(X) )

    Horn clauses play a basic role in constructive logic and computational logic. They are important in automated theoremproving by rst-order resolution, because the resolvent of two Horn clauses is itself a Horn clause, and the resolventof a goal clause and a denite clause is a goal clause. These properties of Horn clauses can lead to greater ecienciesin proving a theorem (represented as the negation of a goal clause).Propositional Horn clauses are also of interest in computational complexity, where the problem of nding truth valueassignments to make a conjunction of propositional Horn clauses true is a P-complete problem (in fact solvablein linear time), sometimes called HORNSAT. (The unrestricted Boolean satisability problem is an NP-completeproblem however.) Satisability of rst-order Horn clauses is undecidable.

    9.2 Logic programmingHorn clauses are also the basis of logic programming, where it is common to write denite clauses in the form of animplication:

    19

  • 20 CHAPTER 9. HORN CLAUSE

    (p q ... t) u

    In fact, the resolution of a goal clause with a denite clause to produce a new goal clause is the basis of the SLDresolution inference rule, used to implement logic programming in the programming language Prolog.In logic programming a denite clause behaves as a goal-reduction procedure. For example, the Horn clause writtenabove behaves as the procedure:

    to show u, show p and show q and ... and show t.

    To emphasize this reverse use of the clause, it is often written in the reverse form:

    u (p q ... t)

    In Prolog this is written as:u :- p, q, ..., t.In logic programming and datalog, computation and query evaluation are performed by representing the negation ofa problem to be solved as a goal clause. For example, the problem of solving the existentially quantied conjunctionof positive literals:

    X (p q ... t)

    is represented by negating the problem (denying that it has a solution), and representing it in the logically equivalentform of a goal clause:

    X (false p q ... t)

    In Prolog this is written as::- p, q, ..., t.Solving the problem amounts to deriving a contradiction, which is represented by the empty clause (or false). Thesolution of the problem is a substitution of terms for the variables in the goal clause, which can be extracted from theproof of contradiction. Used in this way, goal clauses are similar to conjunctive queries in relational databases, andHorn clause logic is equivalent in computational power to a universal Turing machine.The Prolog notation is actually ambiguous, and the term goal clause is sometimes also used ambiguously. Thevariables in a goal clause can be read as universally or existentially quantied, and deriving false can be interpretedeither as deriving a contradiction or as deriving a successful solution of the problem to be solved.Van Emden and Kowalski (1976) investigated the model theoretic properties of Horn clauses in the context of logicprogramming, showing that every set of denite clauses D has a unique minimal model M. An atomic formula Ais logically implied by D if and only if A is true in M. It follows that a problem P represented by an existentiallyquantied conjunction of positive literals is logically implied by D if and only if P is true inM. The minimal modelsemantics of Horn clauses is the basis for the stable model semantics of logic programs.

    9.3 Notes[1] Like in resolution theorem proving, intuitive meanings show " and assume " are synonymous (indirect proof); they

    both correspond to the same formula, viz. . This way, a mechanical proving tool needs to maintain only one set offormulas (assumptions), rather than two sets (assumptions and (sub)goals).

    9.4 Bibliography Horn, Alfred (1951). On sentences which are true of direct unions of algebras. Journal of Symbolic Logic16 (1): 1421. doi:10.2307/2268661.

  • 9.4. BIBLIOGRAPHY 21

    Dowling, William F.; Gallier, Jean H. (1984). Linear-time algorithms for testing the satisability of proposi-tional Horn formulae. Journal of Logic Programming 1 (3): 267284. doi:10.1016/0743-1066(84)90014-1.

    van Emden, M. H.; Kowalski, R. A. (1976). The semantics of predicate logic as a programming language(PDF). Journal of the ACM 23 (4): 733742. doi:10.1145/321978.321991.

  • Chapter 10

    Negation normal form

    In mathematical logic, a formula is in negation normal form if the negation operator ( : , not) is only applied tovariables and the only other allowed Boolean operators are conjunction ( ^ , and) and disjunction ( _ , or).Negation normal form is not a canonical form: for example, a^ (b_:c) and (a^ b)_ (a^:c) are equivalent, andare both in negation normal form.In classical logic and many modal logics, every formula can be brought into this form by replacing implications andequivalences by their denitions, using De Morgans laws to push negation inwards, and eliminating double negations.This process can be represented using the following rewrite rules:

    :(8x:G)! 9x::G

    :(9x:G)! 8x::G::G! G:(G1 ^G2)! (:G1) _ (:G2):(G1 _G2)! (:G1) ^ (:G2)A formula in negation normal form can be put into the stronger conjunctive normal form or disjunctive normal formby applying distributivity.

    10.1 Examples and counterexamplesThe following formulae are all in negation normal form:

    (A _B) ^ C

    (A ^ (:B _ C) ^ :C) _DA _ :BA ^ :BThe rst example is also in conjunctive normal form and the last two are in both conjunctive normal form anddisjunctive normal form, but the second example is in neither.The following formulae are not in negation normal form:

    A) B

    :(A _B)

    22

  • 10.2. REFERENCES 23

    :(A ^B):(A _ :C)They are however respectively equivalent to the following formulae in negation normal form:

    :A _B

    :A ^ :B:A _ :B:A ^ C

    10.2 References Alan J.A. Robinson andAndrei Voronkov,Handbook of Automated Reasoning 1:203 (2001) ISBN0444829490.

    10.3 External links Java applet for converting logical formula to Negation Normal Form, showing laws used

  • Chapter 11

    Prenex normal form

    A formula of the predicate calculus is in prenex[1] normal form if it is written as a string of quantiers (referred toas the prex) followed by a quantier-free part (referred to as thematrix).Every formula in classical logic is equivalent to a formula in prenex normal form. For example, if (y) , (z) , and(x) are quantier-free formulas with the free variables shown then

    8x9y8z((y) _ ( (z)! (x)))is in prenex normal form with matrix (y) _ ( (z)! (x)) , while

    8x((9y(y)) _ ((9z (z))! (x)))is logically equivalent but not in prenex normal form.

    11.1 Conversion to prenex formEvery rst-order formula is logically equivalent (in classical logic) to some formula in prenex normal form. Thereare several conversion rules that can be recursively applied to convert a formula to prenex normal form. The rulesdepend on which logical connectives appear in the formula.

    11.1.1 Conjunction and disjunctionThe rules for conjunction and disjunction say that

    (8x) ^ is equivalent to 8x( ^ ) ,(8x) _ is equivalent to 8x( _ ) ;

    and

    (9x) ^ is equivalent to 9x( ^ ) ,(9x) _ is equivalent to 9x( _ ) .

    The equivalences are valid when x does not appear as a free variable of ; if x does appear free in , it must bereplaced with another free variable.For example, in the language of rings,

    (9x(x2 = 1)) ^ (0 = y) is equivalent to 9x(x2 = 1 ^ 0 = y) ,

    24

  • 11.1. CONVERSION TO PRENEX FORM 25

    but

    (9x(x2 = 1)) ^ (0 = x) is not equivalent to 9x(x2 = 1 ^ 0 = x)

    because the formula on the left is true in any ring when the free variable x is equal to 0, while the formula on the righthas no free variables and is false in any nontrivial ring.

    11.1.2 NegationThe rules for negation say that

    :9x is equivalent to 8x:

    and

    :8x is equivalent to 9x: .

    11.1.3 ImplicationThere are four rules for implication: two that remove quantiers from the antecedent and two that remove quantiersfrom the consequent. These rules can be derived by rewriting the implication ! as : _ and applying therules for disjunction above. As with the rules for disjunction, these rules require that the variable quantied in onesubformula does not appear free in the other subformula.The rules for removing quantiers from the antecedent are:

    (8x)! is equivalent to 9x(! ) ,(9x)! is equivalent to 8x(! ) .

    The rules for removing quantiers from the consequent are:

    ! (9x ) is equivalent to 9x(! ) ,! (8x ) is equivalent to 8x(! ) .

    11.1.4 ExampleSuppose that , , and are quantier-free formulas and no two of these formulas share any free variable. Considerthe formula

    ( _ 9x )! 8zBy recursively applying the rules starting at the innermost subformulas, the following sequence of logically equivalentformulas can be obtained:

    ( _ 9x )! 8z(9x( _ ))! 8z:(9x( _ )) _ 8z(8x:( _ )) _ 8z8x(:( _ ) _ 8z)8x(( _ )! 8z)

  • 26 CHAPTER 11. PRENEX NORMAL FORM

    8x(8z(( _ )! ))8x8z(( _ )! )This is not the only prenex form equivalent to the original formula. For example, by dealing with the consequentbefore the antecedent in the example above, the prenex form

    8z8x(( _ )! )can be obtained:

    8z(( _ 9x )! )8z((9x( _ ))! )8z(8x(( _ )! ))8z8x(( _ )! )

    11.1.5 Intuitionistic logicThe rules for converting a formula to prenex form make heavy use of classical logic. In intuitionistic logic, it is nottrue that every formula is logically equivalent to a prenex formula. The negation connective is one obstacle, but not theonly one. The implication operator is also treated dierently in intuitionistic logic than classical logic; in intuitionisticlogic, it is not denable using disjunction and negation.The BHK interpretation illustrates why some formulas have no intuitionistically-equivalent prenex form. In thisinterpretation, a proof of

    (9x)! 9y (1)is a function which, given a concrete x and a proof of (x) , produces a concrete y and a proof of (y). In this caseit is allowable for the value of y to be computed from the given value of x. A proof of

    9y(9x! ); (2)on the other hand, produces a single concrete value of y and a function that converts any proof of 9x into a proofof (y). If each x satisfying can be used to construct a y satisfying but no such y can be constructed withoutknowledge of such an x then formula (1) will not be equivalent to formula (2).The rules for converting a formula to prenex form that do fail in intuitionistic logic are:

    (1) 8x( _ ) implies (8x) _ ,(2) 8x( _ ) implies _ (8x ) ,(3) (8x)! implies 9x(! ) ,(4) ! (9x ) implies 9x(! ) ,(5) :8x implies 9x: ,

    (x does not appear as a free variable of in (1) and (3); x does not appear as a free variable of in (2) and (4)).

    11.2 Use of prenex formSome proof calculi will only deal with a theory whose formulae are written in prenex normal form. The concept isessential for developing the arithmetical hierarchy and the analytical hierarchy.Gdel's proof of his completeness theorem for rst-order logic presupposes that all formulae have been recast inprenex normal form.

  • 11.3. SEE ALSO 27

    11.3 See also Herbrandization Skolemization Arithmetical hierarchy

    11.4 Notes[1] The term 'prenex' comes from the Latin praenexus tied or bound up in front, past participle of praenectere .

    11.5 References Hinman, P. (2005), Fundamentals of Mathematical Logic, A K Peters, ISBN 978-1-56881-262-5

  • Chapter 12

    Skolem normal form

    In mathematical logic, reduction to Skolem normal form (SNF) is a method for removing existential quantiersfrom formal logic statements, often performed as the rst step in an automated theorem prover.A formula of rst-order logic is in Skolem normal form (named after Thoralf Skolem) if it is in prenex normal formwith only universal rst-order quantiers. Every rst-order formula may be converted into Skolem normal form whilenot changing its satisability via a process called Skolemization (sometimes spelled Skolemnization). The resultingformula is not necessarily equivalent to the original one, but is equisatisable with it: it is satisable if and only if theoriginal one is satisable.[1]

    The simplest form of Skolemization is for existentially quantied variables which are not inside the scope of a universalquantier. These may be replaced simply by creating new constants. For example, 9xP (x) may be changed to P (c), where c is a new constant (does not occur anywhere else in the formula).More generally, Skolemization is performed by replacing every existentially quantied variable ywith a term f(x1; : : : ; xn)whose function symbol f is new. The variables of this term are as follows. If the formula is in prenex normal form,x1; : : : ; xn are the variables that are universally quantied and whose quantiers precede that of y . In general, theyare the variables that are quantied universally and such that 9y occurs in the scope of their quantiers. The functionf introduced in this process is called a Skolem function (or Skolem constant if it is of zero arity) and the term iscalled a Skolem term.As an example, the formula 8x9y8z:P (x; y; z) is not in Skolem normal form because it contains the existentialquantier 9y . Skolemization replaces y with f(x) , where f is a new function symbol, and removes the quanticationover y . The resulting formula is 8x8z:P (x; f(x); z) . The Skolem term f(x) contains x , but not z , because thequantier to be removed 9y is in the scope of 8x , but not in that of 8z ; since this formula is in prenex normal form,this is equivalent to saying that, in the list of quantifers, x precedes y while z does not. The formula obtained by thistransformation is satisable if and only if, the original formula is.

    12.1 How Skolemization worksSkolemization works by applying a second-order equivalence in conjunction to the denition of rst-order satisa-bility. The equivalence provides a way for moving an existential quantier before a universal one.

    8xR(g(x)) _ 9yR(x; y)

    () 8x

    R(g(x)) _R(x; f(x))

    where

    f(x) is a function that maps x to y .

    Intuitively, the sentence for every x there exists a y such that R(x; y) " is converted into the equivalent form thereexists a function f mapping every x into a y such that, for every x it holds R(x; f(x)) ".This equivalence is useful because the denition of rst-order satisability implicitly existentially quanties over theevaluation of function symbols. In particular, a rst-order formula is satisable if there exists a modelM and an

    28

  • 12.2. USES OF SKOLEMIZATION 29

    evaluation of the free variables of the formula that evaluate the formula to true. The model contains the evaluationof all function symbols; therefore, Skolem functions are implicitly, existentially quantied. In the example above,8x:R(x; f(x)) is satisable if and only if, there exists a model M , which contains an evaluation for f , such that8x:R(x; f(x)) is true for some evaluation of its free variables (none in this case). This may be expressed in secondorder as 9f8x:R(x; f(x)) . By the above equivalence, this is the same as the satisability of 8x9y:R(x; y) .At themeta-level, rst-order satisability of a formulamay bewrittenwith a little abuse of notation as9M9 : (M; j=) , whereM is a model, is an evaluation of the free variables, and j= means that is a semantic consequence ofM and . Since rst-order models contain the evaluation of all function symbols, any Skolem function containsis implicitly, existentially quantied by 9M . As a result, after replacing an existential quantier over variables intoan existential quantiers over functions at the front of the formula, the formula still may be treated as a rst-orderone by removing these existential quantiers. This nal step of treating 9f8x:R(x; f(x)) as 8x:R(x; f(x)) may becompleted because functions are implicitly existentially quantied by 9M in the denition of rst-order satisability.Correctness of Skolemization may be shown on the example formula F1 = 8x1 : : :8xn9yR(x1; : : : ; xn; y) asfollows. This formula is satised by a model M if and only if, for each possible value for x1; : : : ; xn in the do-main of the model there exists a value for y in the domain of the model that makes R(x1; : : : ; xn; y) true. Bythe axiom of choice, there exists a function f such that y = f(x1; : : : ; xn) . As a result, the formula F2 =8x1 : : :8xnR(x1; : : : ; xn; f(x1; : : : ; xn)) is satisable, because it has the model obtained by adding the evalua-tion of f to M . This shows that F1 is satisable only if F2 is satisable as well. In the other way around, if F2 issatisable, then there exists a model M 0 that satises it; this model includes an evaluation for the function f suchthat, for every value of x1; : : : ; xn , the formula R(x1; : : : ; xn; f(x1; : : : ; xn)) holds. As a result, F1 is satised bythe same model because one may choose, for every value of x1; : : : ; xn , the value y = f(x1; : : : ; xn) , where f isevaluated according toM 0 .

    12.2 Uses of SkolemizationOne of the uses of Skolemization is automated theorem proving. For example, in the method of analytic tableaux,whenever a formula whose leading quantier is existential occurs, the formula obtained by removing that quantiervia Skolemization may be generated. For example, if 9x:(x; y1; : : : ; yn) occurs in a tableau, where x; y1; : : : ; ynare the free variables of (x; y1; : : : ; yn) , then (f(y1; : : : ; yn); y1; : : : ; yn) may be added to the same branchof the tableau. This addition does not alter the satisability of the tableau: every model of the old formula may beextended, by adding a suitable evaluation of f , to a model of the new formula.This form of Skolemization is an improvement over classical Skolemization in that, only variables that are free inthe formula are placed in the Skolem term. This is an improvement because the semantics of tableau may implicitlyplace the formula in the scope of some universally quantied variables that are not in the formula itself; these variablesare not in the Skolem term, while they would be there according to the original denition of Skolemization. Anotherimprovement that may be used is applying the same Skolem function symbol for formulae that are identical up tovariable renaming.[2]

    Another use is in the resolution method for rst order logic, where formulas are represented as sets of clauses under-stood to be universally quantied. (For an example see drinker paradox.)

    12.3 Skolem theoriesIn general, if T is a theory and for each formula F with free variables x1; : : : ; xn; y there is a Skolem function, thenT is called a Skolem theory.[3] For example, by the above, arithmetic with the Axiom of Choice is a Skolem theory.Every Skolem theory is model complete, i.e. every substructure of a model is an elementary substructure. Given amodel M of a Skolem theory T, the smallest substructure containing a certain set A is called the Skolem hull of A.The Skolem hull of A is an atomic prime model over A.

    12.4 See also Herbrandization, the dual of Skolemization

  • 30 CHAPTER 12. SKOLEM NORMAL FORM

    Predicate functor logic

    12.5 Notes[1] Normal Forms and Skolemization (PDF). max planck institut informatik. Retrieved 15 December 2012.

    [2] R. Hhnle. Tableaux and related methods. Handbook of Automated Reasoning.

    [3]

    12.6 References Hodges, Wilfrid (1997), A shorter model theory, Cambridge University Press, ISBN 978-0-521-58713-6

    12.7 External links Hazewinkel, Michiel, ed. (2001), Skolem function, Encyclopedia of Mathematics, Springer, ISBN 978-1-55608-010-4

    Skolemization on PlanetMath.org Skolemization by Hector Zenil, The Wolfram Demonstrations Project. Weisstein, Eric W., SkolemizedForm, MathWorld.

  • 12.8. TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES 31

    12.8 Text and image sources, contributors, and licenses12.8.1 Text

    Algebraic normal form Source: http://en.wikipedia.org/wiki/Algebraic_normal_form?oldid=666467874 Contributors: Michael Hardy,Charles Matthews, Olathe, CyborgTosser, Macrakis, Mairi, Oleg Alexandrov, Linas, Ner102, GBL, Jon Awbrey, CBM, Salgueiro~enwiki,Magioladitis, JackSchmidt, Hans Adler, Uscitizenjason, Legobot, Yobot, Omnipaedista, Jiri 1984, YiFeiBot and Anonymous: 5

    Beta normal form Source: http://en.wikipedia.org/wiki/Beta_normal_form?oldid=664174311 Contributors: Michael Hardy, Dominus,Dysprosia, Ruakh, Spayrard, Tromp, Linas, BD2412, StevenDaryl,WilliamLovas, Salsb, Jpbowen, Donhalcon, SmackBot, Mhss, Addbot,Erik9bot, JonathasDantas, Synthwave.94, Shallchang and Anonymous: 2

    Blake canonical form Source: http://en.wikipedia.org/wiki/Blake_canonical_form?oldid=582064814 Contributors: Macrakis, DavidEppstein and Kmzayeem

    Conjunctive normal form Source: http://en.wikipedia.org/wiki/Conjunctive_normal_form?oldid=667514105Contributors: BryanDerk-sen, Robert Merkel, BenBaker, Arvindn, Toby Bartels, B4hand, Michael Hardy, Aquatopia~enwiki, Ldo, Thesilverbail, Jleedev, Giftlite,CyborgTosser, Niteowlneils, Macrakis, Gubbubu, Wzwz, Ary29, Erik Garrison, MementoVivere, ESkog, Cherlin, Obradovic Goran,Poromenos, Oleg Alexandrov, Linas, Jacobolus, Eclecticos, Graham87, BD2412, Tizio, Salix alba, Mike Segal, Mathbot, Jrtayloriv,Fresheneesz, Masnevets, Chobot, Dresdnhope, YurikBot, Hairy Dude, GrinBot~enwiki, SmackBot, Jpvinall, Rotemliss, Mhss, Bluebot,PrimeHunter, Jon Awbrey, Danlev, Ylloh, CBM, Andkore, Myasuda, Simeon, Gregbard, Blaisorblade, Thijs!bot, Hermel, A3nm, Ay-dos~enwiki, Mikhail Dvorkin, AntiSpamBot, Policron, Ross Fraser, TXiKiBoT,Mx2323, Jamelan, AlleborgoBot, IsleLaMotte, Tesi1700,Dardasavta, Alejandrocaro35, DumZiBoT, Addbot, Yobot, IM Serious, LilHelpa, Snikeris, Hobsonlane, D'ohBot, Mikolasj, EmausBot,Frostyandy2k, Bobogoobo, Tijfo098, Cognominally, Hofmic, OSDevLabs, Jamesx12345, Jochen Burghardt and Anonymous: 73

    Disjunctive normal form Source: http://en.wikipedia.org/wiki/Disjunctive_normal_form?oldid=667361538 Contributors: Bryan Derk-sen, BenBaker, Toby Bartels, B4hand, Sarrazip, Altenmann, Tobias Bergemann, DavidCary, Bnn, Brona, CyborgTosser, Macrakis,Wzwz, MementoVivere, ZeroOne, EmilJ, Haham hanuka, Linas, A3r0, Graham87, BD2412, Tizio, Fresheneesz, Roboto de Ajvol, Grin-Bot~enwiki, Ajm81, Mhss, Bluebot, Jon Awbrey, Ben Spinozoan, CBM, Simeon, Gregbard, Dougher, Batenka~enwiki, Kundu, Policron,Jamelan, Tvdm, Alejandrocaro35, Hans Adler, Addbot, Linket, Groovenstein, Doulos Christos, Gryllida, Igor Yalovecky, Diego GrezBot, Jiri 1984, Intervallic, Ref1fois and Anonymous: 27

    Head normal form Source: http://en.wikipedia.org/wiki/Beta_normal_form?oldid=664174311 Contributors: Michael Hardy, Dominus,Dysprosia, Ruakh, Spayrard, Tromp, Linas, BD2412, StevenDaryl,WilliamLovas, Salsb, Jpbowen, Donhalcon, SmackBot, Mhss, Addbot,Erik9bot, JonathasDantas, Synthwave.94, Shallchang and Anonymous: 2

    Herbrand normal form Source: http://en.wikipedia.org/wiki/Herbrandization?oldid=439798612 Contributors: AshtonBenson, Bjones,Linas, SmackBot, MarshBot, Mere Interlocutor, MorganGreen and Anonymous: 2

    Herbrandization Source: http://en.wikipedia.org/wiki/Herbrandization?oldid=439798612 Contributors: AshtonBenson, Bjones, Linas,SmackBot, MarshBot, Mere Interlocutor, MorganGreen and Anonymous: 2

    Horn clause Source: http://en.wikipedia.org/wiki/Horn_clause?oldid=665046843Contributors: Vkuncak, Edward,Michael Hardy, Karada,Angela, CharlesMatthews, Dcoetzee, Doradus, Thadk, Ldo, Robbot, Fieldmethods, Altenmann, Kwi, Cek, Tom harrison, Gubbubu, Xml-izer, Luqui, Elwikipedista~enwiki, Chalst, EmilJ, Karlheg, Jumbuck, Woohookitty, Linas, Jacobolus, MattGiuca, BD2412, Tizio, Tawker,YurikBot, Ritchy, Bota47, Ott2, GrinBot~enwiki, Mhss, Theone256, NYKevin, Rsimmonds01, Ft1~enwiki, CRGreathouse, Tajko, Greg-bard, A Softer Answer, Thijs!bot, Hannes Eder, Kevin.cohen, Paullakso, Inquam, Knverma, Jamelan, RatnimSnave, Logperson, HansAdler, Addbot, Lightbot, Jarble, Ptbotgourou, AnomieBOT, Rubinbot, ArthurBot, MIRROR, Nunoplopes, EmausBot, Tijfo098, ClueBotNG, Gareth Grith-Jones, Osnetwork, Michael Zeising, Helpful Pixie Bot, BLNarayanan, Compulogger, ChrisGualtieri, Hmainsbot1,Jochen Burghardt, Rintdusts, Marcello sachs, Jackee1234 and Anonymous: 33

    Negation normal form Source: http://en.wikipedia.org/wiki/Negation_normal_form?oldid=665947556 Contributors: Vkuncak, Silver-sh, Olathe, Macrakis, Starblue, Obradovic Goran, Pearle, Oleg Alexandrov, Linas, Kbdank71, Mets501, CRGreathouse, CBM, Greg-bard, Cydebot, Christian75, Amikake3, Brian Geppert, Addbot, Luckas-bot, Tomdwrightenator, Kejia, Mogism, Ayush3292 and Anony-mous: 6

    Prenex normal form Source: http://en.wikipedia.org/wiki/Prenex_normal_form?oldid=622113385 Contributors: The Anome, MichaelHardy, AugPi, Charles Matthews, Dysprosia, Greenrd, Pfortuny, Gandalf61, Lockeownzj00, 4pq1injbok, Oleg Alexandrov, Joriki, Linas,MattGiuca, BD2412, Reetep, Jayme, SmackBot, Mhss, Esoth~enwiki, CRGreathouse, CBM, Thijs!bot, Jakob.scholbach, Toobaz, Alle-borgoBot, SieBot, IsleLaMotte, PixelBot, Addbot, SamatBot, Coreyoconnor, AnomieBOT, Omnipaedista, Epiglottisz, WikitanvirBot andAnonymous: 21

    Skolem normal form Source: http://en.wikipedia.org/wiki/Skolem_normal_form?oldid=635523763 Contributors: Charles Matthews,Dysprosia, Aleph4, Gandalf61, Ashley Y, Thesilverbail, Jason Quinn, Gubbubu, Nortexoid, Oleg Alexandrov, Linas, Tizio, Winter-stein, Mathbot, Jrtayloriv, Fresheneesz, Jayme, 4C~enwiki, Maxme~enwiki, Jsnx, SmackBot, Commander Keane bot, Mhss, Chris thespeller, Xyzzy n, Tompsci, ILikeThings, Kayobee, David Eppstein, Policron, 83d40m, Heyitspeter, VolkovBot, Pleasantville, Kyle thebot, IsleLaMotte, PixelBot, Hans Adler, El bot de la dieta, Addbot, Legobot, Yobot, AnomieBOT, Xqbot, Klangenfurt, John of Reading,KYLEMONGER, Tijfo098, Wcherowi, BG19bot, Jochen Burghardt, Mark viking, Kal71 and Anonymous: 27

    12.8.2 Images File:CardContin.svg Source: https://upload.wikimedia.org/wikipedia/commons/7/75/CardContin.svg License: Public domain Contrib-

    utors: en:Image:CardContin.png Original artist: en:User:Trovatore, recreated by User:Stannered File:Mergefrom.svg Source: https://upload.wikimedia.org/wikipedia/commons/0/0f/Mergefrom.svg License: Public domain Contribu-

    tors: ? Original artist: ? File:Question_book-new.svg Source: https://upload.wikimedia.org/wikipedia/en/9/99/Question_book-new.svg License: Cc-by-sa-3.0

    Contributors:Created from scratch in Adobe Illustrator. Based on Image:Question book.png created by User:Equazcion Original artist:Tkgd2007

  • 32 CHAPTER 12. SKOLEM NORMAL FORM

    File:Text_document_with_red_question_mark.svg Source: https://upload.wikimedia.org/wikipedia/commons/a/a4/Text_document_with_red_question_mark.svg License: Public domain Contributors: Created by bdesham with Inkscape; based upon Text-x-generic.svgfrom the Tango project. Original artist: Benjamin D. Esham (bdesham)

    File:Wiki_letter_w_cropped.svg Source: https://upload.wikimedia.org/wikipedia/commons/1/1c/Wiki_letter_w_cropped.svg License:CC-BY-SA-3.0 Contributors:

    Wiki_letter_w.svg Original artist: Wiki_letter_w.svg: Jarkko Piiroinen File:Wiktionary-logo-en.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/f8/Wiktionary-logo-en.svg License: Public

    domain Contributors: Vector version of Image:Wiktionary-logo-en.png. Original artist: Vectorized by Fvasconcellos (talk contribs),based on original logo tossed together by Brion Vibber

    12.8.3 Content license Creative Commons Attribution-Share Alike 3.0

    Algebraic normal formCommon uses Performing operations within algebraic normal form Converting to algebraic normal form Formal representation Recursively deriving multiargument Boolean functions

    See alsoReferences

    Head normal formBeta reductionReduction strategiesSee alsoReferences

    Blake canonical formSee alsoNotes

    Conjunctive normal formExamples and Non-ExamplesConversion into CNFFirst-order logicComputational complexityConverting from first-order logicNotesSee alsoReferencesExternal links

    Disjunctive normal formSee alsoExternal links

    Head normal formBeta reductionReduction strategiesSee alsoReferences

    HerbrandizationSee also References

    HerbrandizationSee also References

    Horn clauseDefinition Logic programmingNotesBibliography

    Negation normal formExamples and counterexamplesReferencesExternal links

    Prenex normal formConversion to prenex form Conjunction and disjunction Negation Implication Example Intuitionistic logic

    Use of prenex form See alsoNotesReferences

    Skolem normal formHow Skolemization worksUses of SkolemizationSkolem theoriesSee alsoNotesReferencesExternal linksText and image sources, contributors, and licensesTextImagesContent license