Logic seminar 3 First order logic 24.10.2005. Slobodan Petrović.

Slides:



Advertisements
Similar presentations
Predicate Logic Colin Campbell. A Formal Language Predicate Logic provides a way to formalize natural language so that ambiguity is removed. Mathematical.
Advertisements

Completeness and Expressiveness
Biointelligence Lab School of Computer Sci. & Eng.
First Order Logic Resolution
Section 1.3. More Logical Equivalences Constructing New Logical Equivalences We can show that two expressions are logically equivalent by developing.
Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
Predicates and Quantifiers
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Exam #3 is Friday. It will consist of proofs, plus symbolizations in predicate logic.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Logic seminar 2 Propositional logic Slobodan Petrović.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 11 Introduction to Predicate Logic Limitations of Propositional Logic Predicates, quantifiers and propositions.
FIRST ORDER LOGIC Levent Tolga EREN.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Predicates and Quantifiers
Section 1.3: Predicates and Quantifiers
Chapter 1: The Foundations: Logic and Proofs
The Foundations: Logic and Proofs
Theoretical basis of GUHA Definition 1. A (simplified) observational predicate language L n consists of (i) (unary) predicates P 1,…,P n, and an infinite.
DECIDABILITY OF PRESBURGER ARITHMETIC USING FINITE AUTOMATA Presented by : Shubha Jain Reference : Paper by Alexandre Boudet and Hubert Comon.
1st-order Predicate Logic (FOL)
Review I Rosen , 3.1 Know your definitions!
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CMPF144 FUNDAMENTALS OF COMPUTING THEORY Module 5: Classical Logic.
Logic CL4 Episode 16 0 The language of CL4 The rules of CL4 CL4 as a conservative extension of classical logic The soundness and completeness of CL4 The.
Advanced Topics in Propositional Logic Chapter 17 Language, Proof and Logic.
First Order Predicate Logic
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Copyright © Curt Hill Quantifiers. Copyright © Curt Hill Introduction What we have seen is called propositional logic It includes.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
(CSC 102) Lecture 8 Discrete Structures. Previous Lectures Summary Predicates Set Notation Universal and Existential Statement Translating between formal.
Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
0 Propositional logic versus first-order (predicate) logic The universe of discourse Constants, variables, terms and valuations Predicates as generalized.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
LOGIC AND QUANTIFIERS. INTRODUCTION Many algorithms and proofs use logical expressions such as: “IF p THEN q” or “If p1 AND p2, THEN q1 OR q2” Therefore.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
Discrete Mathematics Mathematical reasoning: think logically; know how to prove Combinatorial analysis: know how to count Discrete structures: represent.
1 Outline Quantifiers and predicates Translation of English sentences Predicate formulas with single variable Predicate formulas involving multiple variables.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
1 Introduction to Abstract Mathematics Chapter 3: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 3.1.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Chapter 1 Logic and proofs
ece 627 intelligent web: ontology and beyond
The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
1st-order Predicate Logic (FOL)
MA/CSSE 474 More Math Review Theory of Computation
Predicates and Quantifiers
CS201: Data Structures and Discrete Mathematics I
1st-order Predicate Logic (FOL)
Presentation transcript:

Logic seminar 3 First order logic Slobodan Petrović

First order logic In the propositional logic, the most basic elements are atoms. Through atoms we build up formulas. We then use formulas to express various complex ideas. In this simple logic, an atom represents a declarative sentence that can be either true or false. An atom is created as a single unit. Its structure and composition are suppressed. However, there are many ideas that cannot be treated in this simple way.

First order logic Example The deduction of statements: –Every man is mortal. –Since Confucius is a man, he is mortal. This reasoning is intuitively correct.

First order logic Example (cont.) –If we denote P: Every man is mortal, Q: Confucius is a man, R: Confucius is mortal, –then R is not a logical consequence of P and Q within the framework of the propositional logic. –This is because the structures of P, Q, and R are not used in the propositional logic.

First order logic The first order logic has three more logical notions (called terms, predicates, and quantifiers) than does the propositional logic. Much of everyday and mathematical language can be symbolized by the first order logic.

First order logic Just as in the propositional logic, we first have to define atoms in the first-order logic. Example –We want to represent “x is greater than 3.” –We first define a predicate GREATER(x,y) to mean “x is greater than y.” –A predicate is a relation. –Then the sentence “x is greater than 3” is represented by GREATER(x,3).

First order logic Example: –Similarly, we can represent “x loves y” by the predicate LOVE(x,y). –Then “John loves Mary” can be represented by LOVE(John, Mary).

First order logic We can also use function symbols in the first order logic. Example –We can use plus(x,y) to denote “x+y” and father(x) to mean the father of x. –The sentences “x+1 is greater than x” and “John’s father laves John” can be symbolized as GREATER(plus(x,1),x) LOVE(father(John),John).

First order logic Atoms: –GREATER(x,3) –LOVE(John,Mary) –GREATER(plus(x,1),x) –LOVE(father(John),John). Predicate symbols: –GREATER –LOVE.

First order logic Variable: –x. Individual symbols or constants –3 –John –Mary. Function symbols –father –plus.

First order logic In general, we are allowed to use the following four types of symbols to construct an atom: –i. Individual symbols or constants: These are usually names of objects, such as John, Mary, and 3. –ii. Variable symbols: These are customarily lowercase unsubscripted or subscripted letters, x, y, z,... –iii. Function symbols: These are customarily lowercase letters f, g, h,... or expressive strings of lowercase letters such as father and plus. –iv. Predicate symbols: These are customarily uppercase letters P, Q, R,... or expressive strings of uppercase letters such as GREATER and LOVE.

First order logic Any function or predicate symbol takes a specified number of arguments. If a function symbol f takes n arguments, f is called an n-place function symbol. An individual symbol or a constant may be considered a function symbol that takes no argument. If a predicate symbol P takes n arguments, P is called an n-place predicate symbol.

First order logic Example –father is a one-place function symbol, –GREATER and LOVE are two-place predicate symbols. A function is a mapping that maps a list of constants to a constant. Example father is a function that maps a person named John to a person who is John’s father.

First order logic father(John) represents a person, even though his name is unknown. We call father(John) a term in the first order logic.

First order logic Definition. Terms are defined recursively as follows: –i. A constant is a term. –ii. A variable is a term. –iii. If f is an n-placefunction symbol, and t 1,..., t n are terms, then f(t 1,..., t n ) is a term. –iv. All terms are generated by applying the above rules.

First order logic Example –Since x and 1 are both terms and plus is a two- place function symbol, plus(x,1) is a term according to the definition. –Furthermore, plus(plus(x,1),x) and father(father(John)) are also terms; the former denotes (x+1)+x, and the latter denotes the grandfather of John.

First order logic A predicate is a mapping that maps a list of constants to T or F. For example, GREATER is a predicate. – GREATER(5,3) is T, –but GREATER(1,3) is F.

First order logic Definition –If P is an n-place predicate symbol, and t 1,..., t n are terms, then P(t 1,..., t n ) is an atom. Once atoms are defined, we can use the same five logical connectives as in the propositional logic to build up formulas. Furthermore, since we have introduced variables, we use two special symbols  and  to characterize variables. The symbols  and  are called, respectively, the universal and existential quantifiers.

First order logic If x is a variable, then (  x) is read as “for all x”, “for each x” or “for every x”, while (  x) is read as “there exists an x” “for some x” or “for at least one x” Example –Symbolize the following statements: (a)Every rational number is a real number. (b)There exists a number that is a prime. (c)For every number x, there exists a number y such that x<y.

First order logic Denote “x is a prime number” by P(x), “x is a rational number” by Q(x), “x is a real number” by R(x), and “x is less than y” by LESS(x,y). Then statements can he denoted, respectively, as –(a’) (  x)(Q(x)  R(x)) –(b’) (  x)P(x) –(c’) (  x)(  y)LESS(x,y). Each of the expressions (a’), (b’), and (c’) is called a formula.

First order logic The scope of a quantifier occurring in a formula - the formula to which the quantifier applies. Example –The scope of both the universal the existential quantifiers in the formula (  x)(  y)LESS(x,y) is LESS(x,y). –The scope of the universal quantifier in the formula (  x)(Q(x)  R(x)) is (Q(x)  R(x)).

First order logic An occurrence of a variable in a formula is bound if and only if the occurrence is within the scope of a quantifier employing the variable, or is the occurrence in that quantifier. An occurrence of a variable in a formula is free if and only if this occurrence of the variable is not bound.

First order logic A variable is free in a formula if at least one occurrence of it is free in the formula. A variable is bound in a formula if at least one occurrence of it is bound. Example –In the formula (  x)P(x,y), since both the occurrences of x are bound, the variable x is bound. –The variable y is free since the only occurrence of it is free.

First order logic A variable can be both free and bound in a formula. Example –y is both free and bound in the formula (  x)P(x,y)  (  y)Q(y).

First order logic Definition –Well formed formulas, or formulas for short, in the first-order logic are defined recursively as follows: An atom is a formula. (Actually, “atom” is an abbreviation for an atomic formula.) If F and G are formulas, then ~(F), (F  G), (F  G), (F  G) and (F  G) are formulas. If F is a formula and x is a free variable in F, then (  x)F and (  x)F are formulas. Formulas are generated only by a finite number of applications of the three rules given above.

First order logic Parentheses may be omitted by the same conventions that hold in the propositional logic. The quantifiers have the least rank. Example –(  x)A  B stands for (((  x)A)  (B)).

First order logic Example –Translate the statement “Every man is mortal. Confucius is a man. Therefore, Confucius is mortal.” into a formula. Denote “x is a man” by MAN(x), and “x is mortal” by MORTAL(x). Then “every man is mortal” can be represented by –(  x)(MAN(x)  MORTAL(x)), “Confucius is a man” by –MAN(Confucius), and “Confucius is mortal” by –MORTAL(Confucius).

First order logic Example (cont.) –The, whole statement can now be represented by (  x)(MAN(x)  MORTAL(x))  MAN(Confucius)  MORTAL(Confucius).

First order logic Example –The basic axioms of natural numbers are the following: For every number, there is one and only one immediate successor. There is no number for which 0 is the immediate successor. For every number other than 0, there is one and only one immediate predecessor.

First order logic Example (cont.) –Let f(x) and g(x) represent the immediate successor and predecessor of x, respectively. –Let “x is equal to y” be denoted by E(x,y). –Then the axioms can be represented by the following formulas: (  x)(  y)(E(y,f(x))  (  z)(E(z,f(x))  E(y,z))) ~((  x)E(0,f(x))) (  x)(~E(x,0)  ((  y)(E(y,g(x))  (  z)(E(z,g(x))  E(y,z))))).

First order logic In the propositional logic, an interpretation is an assignment of truth values to atoms. In the first-order logic, since there are variables involved, we have to do more than that. To define an interpretation for a formula in the first- order logic, we have to specify: –the domain –an assignment to constants, function symbols, and predicate symbols occurring in the formula.

First order logic Definition –An interpretation of a formula F in the first-order logic consists of a nonempty domain D, and an assignment of “values” to each constant, function symbol, and predicate symbol occurring in F as follows: To each constant, we assign an element in D. To each n-place function symbol, we assign a mapping from D n to D. (D n ={(x 1,...,x n )|x 1  D,...,x n  D}). To each n-place predicate symbol, we assign a mapping from D n to {T,F}. –Sometimes, to emphasize the domain D, we speak of an interpretation of the formula over D. –When we evaluate the truth value of a formula in an interpretation over the domain D, (  x) will be interpreted as “for all elements x in D,” and (  x) as “there is an element in D.”

First order logic For every interpretation of a formula over a domain D, the formula can be evaluated to T or F according to the following rules: –If the truth values of formulas G and H are evaluated, then the truth values of the formulas ~G, (G  H), (G  H), (G  H), and (G  H) are evaluated by using the rules that hold in the propositional logic. –(  x)G is evaluated to T if the truth value of G is evaluated to T for every x in D; otherwise, it is evaluated to F. –(  x)G is evaluated to T if the truth value of G is T for at least one x in D; otherwise, it is evaluated to F.

First order logic Any formula containing free variables cannot be evaluated. It should be assumed either that formulas do not contain free variables, or that free variables are treated as constants.

First order logic Example –Let us consider the formulas (  x)P(x) and (  x)~P(x). Let an interpretation be as follows: –Domain:D={1,2}. –Assignment for P: P(1)=T, P(2)=F.

First order logic (  x)P(x) is F in this interpretation because P(x) is not T for both x=1 and x=2. Since ~P(2) is T in this interpretation, (  x)~P(x) is T in this interpretation.

First order logic Example –The formula (  x)(  y)P(x,y) –The interpretation P(1,1)=T, P(1, 2)=F, P(2,1)=F, P(2,2)=T, –If x=1, there is a y, 1, such that P(1,y) is T. –If x=2, there is also a y, 2, such that P(2,y) is T. Therefore, in this interpretation, for every x in D, there is a y such that P(x,y) is T. That means that (  x)(  y)P(x,y) is T in this interpretation.

First order logic The formula –G: (  x)(P(x)  Q(f(x),a)). There are one constant a, one one-place function symbol f, one one-place predicate symbol P, and one two-place predicate symbol Q in G.

First order logic The interpretation I of G –Domain: D={1,2}. –Assignment for a: a=1. –Assignment for f: f(1)=2, f(2)=1. –Assignment for P and Q: P(1)=F, P(2)=T, Q(1,1)=T, Q(1,2)=T, Q(2,l)=F, Q(2,2)=T.

First order logic If x=1, then –P(x)  Q(f(x),a)=P(1)  Q(f(1),a) –=P(1)  Q(2,1) –=F  F=T. If x=2, then –P(x)  Q(f(x),a)=P(2)  Q(f(2),a) –=P(2)  Q(1,1) –=T  T=T.

First order logic Since P(x)  Q(f(x),a) is true for all elements x in the domain D, the formula (  x)(P(x)  Q(f(x),a)) is true under the interpretation I.

First order logic Example –Evaluate the truth values of the following formulas under the interpretation given in the previous example. (a) (  x)(P(f(x))  Q(x,f(a)) (b) (  x)(P(x)  Q(x,a)) (c) (  x)(  y)(P(x)  Q(x,y))

First order logic (a): –If x=l, P(f(x))  Q(x,f(a))=P(f(1))  Q(1,f(a)) =P(2)  Q(1,f(1)) =P(2)  Q(1,2) =T  T=T. –If x=2, P(f(x))  Q(x,f(a))=P(f(2))  Q(2,f(1)) =P(1)  Q(2,2) =F  T=F. Since there is an element in the domain D, x=l, such that P(f(x))  Q(x,f(a)) is true, the truth value of the formula (  x)P(f(x))  Q(x,f(a)) is true under the interpretation I.

First order logic (b): –If x=l, P(x)  Q(x,a)=P(1)  Q(1,1)=F  T=F. –If x=2, P(x)  Q(x,a)=P(2)  Q(2,1)=T  F=F. –Since there is no element in the domain D such that P(x)  Q(x,a) is true, the formula (  x)(P(x)  Q(x,a)) is evaluated to be false under the interpretation I.

First order logic (c): –If x=1, then P(x)=P(1)=F. –Therefore: P(x)  Q(x,y)=F for y=1 and y=2. –Since there exists an x, x=l, such that (  y)(P(x)  Q(x,y)) is false, the formula (  x)(  y)(P(x)  Q(x,y)) is false under the interpretation I, that is, the formula is falsified by I.

First order logic Once interpretations are defined, all the concepts, such as validity, inconsistency, and logical consequence, defined in propositional logic can be defined analogously for formulas of the first-order logic.

First order logic Definition –A formula G is consistent (satisfiable) if and only if there exists an interpretation I such that G is evaluated to T in I. If a formula G is T in an interpretation I, we say that I is a model of G and I satisfies G.

First order logic Definition –A formula G is inconsistent (unsatisfiable) if and only if there exists no interpretation that satisfies G. Definition –A formula G is valid if and only if every interpretation of G satisfies G. Definition –A formula G is a logical consequence of formulas F 1, F 2,..., F n, if and only if for every interpretation I, if F 1  F 2...  F n is true in I, G is also true in I.

First order logic The relations between validity (incon-sistency) and logical consequence that hold in propositional logic also hold for the first-order logic. In fact, the first-order logic can be considered as an extension of the propositional logic. When a formula in the first-order logic contains no variables and quantifiers, it can be treated just as a formula in the propositional logic.

First order logic Example –The formulas F 1 : (  x)(P(x)  Q(x)) F 2 : P(a) –Prove that formula Q(a) is a logical consequence of F 1 and F 2.

First order logic We consider any interpretation I that satisfies (  x)(P(x)  Q(x))  P(a). In this interpretation, P(a) is T. We assume Q(a) is not T in this interpretation. Then ~P(a)  Q(a), that is, P(a)  Q(a) is F in I. This means that (  x)(P(x)  Q(x)) is F in I, which is impossible.

First order logic Therefore, Q(a) must be T in every interpretation that satisfies –(  x)(P(x)  Q(x))  P(a). This means that Q(a) is a logical consequence of F 1, and F 2.

First order logic In the first-order logic, since there are an infinite number of domains, in general, there are an infinite number of inter-pretations of a formula. Therefore, unlike in the propositional logic, it is not possible to verify a valid or an inconsistent formula by evaluating the formula under all the possible inter-pretations.

First order logic In the propositional logic: –conjunctive normal form –disjunctive normal form. In the first-order logic, there is also a normal form called the “prenex normal form.” The reason for considering a prenex normal form of a formula is to simplify proof procedures.

First order logic Definition –A formula F in the first-order logic is said to be in a prenex normal form if and only if the formula F is in the form of (Q 1 x 1 )... (Q n x n )(M) –where every (Q i x i ), i=1,...,n, is either (  x i ) or (  x i ), and M is a formula containing no quantifiers. –(Q 1 x 1 )... (Q n x n ) is called the prefix and M is called the matrix of the formula F.

First order logic Examples –(  x)(  y)(P(x,y)  Q(y)) –(  x)(  y)(~P(x,y)  Q(y)) –(  x)(  y)(  z)(Q(x,y)  R(z)) The basic equivalent formulas that hold in the propositional logic also hold in the first order logic. In addition, other equivalent formulas containing quantifiers also hold.

First order logic Let F be a formula containing a variable x. To emphasize that the variable x is in F, we represent F by F[x]. Let G be a formula that does not contain variable x.

First order logic Then we have the following pairs of equivalent formulas (“laws”), where Q is either  or  : –(Qx)F[x]  G=(Qx)(F[x]  G). –(Qx)F[x]  G=(Qx)(F[x]  G). –~((  x)F[x])=(  x)(~F[x]). –~((  x)F[x])=(  x)(~F[x]).

First order logic Suppose F[x] and H[x] are two formulas containing x. The following laws hold: –(  x)F[x]  (  x)H[x]=(  x)(F[x]  H[x]). –(  x)F[x]  (  x)H[x]=(  x)(F[x]  H[x]). That is, the universal quantifier  and the existential quantifier  can distribute over  and , respectively.

First order logic However, the universal quantifier  and the existential quantifier  cannot distribute over  and , respectively. That is –(  x)F[x]  (  x)H[x]  (  x)(F[x]  H[x]). –(  x)F[x]  (  x)H[x]  (  x)(F[x]  H[x]). The workaround is the following: –Since every bound variable in a formula can he considered as a dummy variable, every bound variable x can be renamed z, and the formula (  x)H[x] becomes (  z)H[z]. –That is, (  x)H[x]=(  z)H[z].

First order logic Thus, in general we have: –(Q 1 x)F[x]  (Q 2 x)H[x]=(Q 1 x)(Q 2 z)(F[x]  H[z]). –(Q 3 x)F[x]  (Q 4 x)H[x]=(Q 3 x)(Q 4 z)(F[x]  H[z]). where Q 1, Q 2, Q 3, and Q 4 are either  or , and z does not appear in F[x]. If Q 1 =Q 2 =  and Q 3 =Q 4 = , then we do not have to rename x’s in (Q 2 x)H[x] or (Q 4 x)H[x]. We can use the corresponding laws directly.

First order logic An outline of the transforming procedure –Step 1 - Use the laws F  G=(F  G)  (G  F) F  G=~F  G –to eliminate the logical connectives  and .

First order logic An outline of the transforming procedure (cont.) –Step 2 - Repeatedly use the law ~(~F)=F –De Morgan’s laws ~(F  G)=~F  ~G ~(F  G)= ~F  ~G –and the laws ~((  x)F[x])=(  x)(~F[x]) ~((  x)F[x])=(  x)(~F[x]) –to bring the negation signs immediately before atoms.

First order logic An outline of the transforming procedure (cont.) –Step 3 - Rename bound variables if necessary. –Step 4 – Use the laws (Qx)F[x]  G=(Qx)(F[x]  G) (Qx)F[x]  G=(Qx)(F[x]  G) (  x)F[x]  (  x)H[x]=(  x)(F[x]  H[x]) (  x)F[x]  (  x)H[x]=(  x)(F[x]  H[x]) (Q 1 x)F[x]  (Q 2 x)H[x]=(Q 1 x)(Q 2 z)(F[x]  H[z]) (Q 3 x)F[x]  (Q 4 x)H[x]=(Q 3 x)(Q 4 z)(F[x]  H[z]) –to move the quantifiers to the left of the entire formula to obtain a prenex normal form.

First order logic Example –Transform the formula (  x)P(x)  (  x)Q(x) into prenex normal form. (  x)P(x)  (  x)Q(x)=~((  x)P(x))  (  x)Q(x) =(  x)(~P(x))  (  x)Q(x) =(  x)(~P(x)  Q(x))

First order logic Example –Obtain a prenex normal form for the formula (  x)(  y)((  z)(P(x,z)  P(y,z))  (  u)Q(x,y,u)). (  x)(  y)((  z)(P(x,z)  P(y,z))  (  u)Q(x,y,u)) =(  x)(  y)(~((  z)(P(x,z)  P(y,z)))  (  u)Q(x,y,u)) =(  x)(  y)((  z)(~P(x,z)  ~P(y,z))  (  u)Q(x,y,u)) =(  x)(  y)(  z)(  u)(~P(x,z)  ~P(y,z)  Q(x,y,u)).