You are on page 1of 30

# Introduction to Propositional Logic

Propositional logic is a logic at the sentential level. The smallest unit we deal with in propositional logic is a sentence. We do not go inside individual sentences and analyze or discuss their meanings. We are going to be interested only in true or false of sentences, and major concern is whether or not the truth or falsehood of a certain sentence follows from those of a set of sentences, and if so, how. Thus sentences considered in this logic are not arbitrary sentences but are the ones that are true or false. This kind of sentences are called propositions. Subjects to be Learned

proposition

Contents Sentences considered in propositional logic are not arbitrary sentences but are the ones that are either true or false, but not both. This kind of sentences are called propositions. f a proposition is true, then we say it has a truth value of !true!" if a proposition is false, its truth value is !false!. For example, !#rass is green!, and !\$ % & ' &! are propositions. The first proposition has the truth value of !true! and the second !false!. (ut !)lose the door!, and ! s it hot outside *!are not propositions. +lso !, is greater than \$!, where , is a variable representing a number, is not a proposition, because unless a specific value is given to , we can not say whether it is true or false.

## Elements of Propositional Logic

Subjects to be Learned

## elements used for constructing complex propositions

Contents

Simple sentences which are true or false are basic propositions. Larger and more complex sentences are constructed from basic propositions by combining them with connectives. Thus propositions and connectives are the basic elements of propositional logic. Though there are many connectives, we are going to use the following five basic connectives here:

-.T, +-/, .0, 12T34- 5or 6P789, 12+-/2.-782 1. They are also denoted by the symbols: , , , , ,

## respectively. Subjects to be Learned

truth table

Contents .ften we want to discuss properties;relations common to all propositions. n such a case rather than stating them for each individual proposition we use variables representing an arbitrary proposition and state properties;relations in terms of those variables. Those variables are called a propositional variable. Propositional variables are also considered a proposition and called a proposition since they represent a proposition hence they behave the same way as propositions. + proposition in general contains a number of variables. 1or e,ample 5P <9 contains variables P and < each of which represents an arbitrary proposition. Thus a proposition takes different values depending on the values of the constituent variables. This relationship of the value of a proposition and those of its constituent variables can be represented by a table. t tabulates the value of a proposition for all possible values of its variables and it is called a truth table. 1or e,ample the following table shows the relationship between the values of P, < and P <:

&' P \$ (P \$) 11 1 1T T T1 T TT T

n the table, 1 represents truth value false and T true. This table shows that P < is false if P and < are both false, and it is true in all the other cases. Test Your Understanding of Truth Table hich of the follo!ing tables are a truth table " # belo! represents a proposition involving P and \$%
Table * Proposition # 1 T 1

P 1 T T

\$ 1 1 T

P 1 1 T

Table + Proposition # 1 T 1

For each of the above tables, clic- .Yes. if it is a truth table, else clic- ./o. belo!, then clic- Submit%

Subjects to be Learned

## meaning of connectives: -.T, +-/, .0, 6P7 4S, 1 +-/ .-78 1

Contents 7et us define the meaning of the five connectives by showing the relationship between the truth value 5i.e. true or false9 of composite propositions and those of their component propositions. They are going to be shown using truth table. n the tables P and < represent arbitrary propositions, and true and false are represented by T and 1, respectively.
/&T P P T 1 1 T

This table shows that if P is true, then 5 P9 is false, and that if P is false, then 5 P9 is true.
0/1 P \$ (P \$) 11 1 1T 1 T1 1 TT T

## This table shows that 5P other case.

<9 is true if both P and < are true, and that it is false in any

## Similarly for the rest of the tables.

&' P \$ (P \$) 11 1 1T T T1 T TT T

I2PLI3S P \$ (P \$) 11 T 1T T T1 1 TT T

When P < is always true, we e,press that by P <. That is P < is used when proposition P always implies proposition < regardless of the value of the variables in them. See mplications for e,amples of . +lso see a note on the truth value of I2PLI3S when P is 1alse.
IF 0/1 &/LY IF P \$ (P \$) 1 1 T 1 T 1 T 1 1 T T T

When P < is always true, we e,press that by P <. That is is used when two propositions always take the same value regardless of the value of the variables in them. See dentities for e,amples of .

Subjects to be Learned

## how to construct comple, propositions i.e. synta, of proposition

Contents S4ntax of propositions 1irst it is informally shown how comple, propositions are constructed from simple ones. Then proposition is defined rigorously by recursive definition. n everyday life we often combine propositions to form more comple, propositions without paying much attention to them. 1or e,ample combining !#rass is green!, and !The sun is red! we say something like !#rass is green and the sun is red!, ! f the sun is red, grass is green!, !The sun is red and the grass is not green! etc. 3ere !#rass is green!, and !The sun is red! are propositions, and form them using connectives !and!, !if... then ...! and !not! a little more comple, propositions are formed. These new propositions can in turn be combined with other propositions to construct more comple, propositions. They then can be combined to form even more comple, propositions. This process of obtaining more and more comple, propositions can be described more generally as follows: Let 5 and Y represent arbitrar4 propositions% Then 6 57, 65 Y7, 65 Y7, 65 Y7, and 65 Y7 are propositions% -ote that = and 8 here represent an arbitrary proposition. 3xample 8 > P ?@ >< A 0B B is a proposition and it is obtained by first constructing >< A 0B by applying >= A 8B to propositions < and 0, then by applying > = ?@ 8 B to the two propositions P and >< A 0B.

/ote8 0igorously speaking = and 8 above are place holders for propositions, and so they are not e,actly a proposition. They are called a propositional variable, and propositions formed from them using connectives are called a propositional form. 3owever, we are not going to distinguish them here, and both specific propositions such as !\$ is greater than C! and propositional forms such as 5P <9 are going to be called a proposition. 'igorous 1efinition of Proposition (Propositional Form) 999 S4ntax 'ules for Proposition Proposition can be described in a more rigorous way using recursive definition as follows: + proposition 5also called propositional form9 here is a template for propositions. t is a DlegalD form for propositions. 4very proposition must take one of these forms. t shows how larger more comple, propositions can be generated from simpler ones in general terms. 3ere they are defined as a set. The set of propositions is the set that satisfies the following three clauses: C. :asis Clause8 The truth values DtrueD and DfalseD, and all propositional variables such as P and Q are a proposition. 3ere a propositional variable is a variable that takes an individual specific proposition as its value. \$. Inductive Claus8 f E and F are propositions, then , ,

, , and are propositions. E. 3xtremal Clause8 -othing is a proposition unless it is obtained by C. and \$. /ote 8 +s you might have noticed, 6 7 and ( ) are used interchangeably for propositions. 3xample , where P, Q, R, and S are propositional variables, is a proposition because it can be obtained by first generating , and by applying the inductive clause to the propositional variables P and Q, and R and S,

## agian applying the inductive clause.

Test Your Understanding of Construction of Propositions Indicate !hich of the follo!ing expressions are propositions and !hich are not

Subjects to be Learned

## converse of proposition contrapositive of proposition

Contents 1or the proposition P <, the proposition < P is called its converse, and the proposition < P is called its contrapositive. 1or e,ample for the proposition ! f it rains, then get wet!, Converse: f get wet, then it rains. Contrapositive: f donDt get wet, then it does not rain. The converse of a proposition is not necessarily logically eFuivalent to it, that is they may or may not take the same truth value at the same time. .n the other hand, the contrapositive of a proposition is always logically equivalent to the proposition. That is, they take the same truth value regardless of the values of their constituent variables. Therefore, ! f it rains, then get wet.! and ! f donDt get wet, then it does not rain.! are logically eFuivalent. f one is true then the other is also true, and vice versa.

Test Your Understanding of Converse and Contrapositive Indicate !hich of the follo!ing converses and contrapositives are correct and !hich are not% Subjects to be Learned

## different ways of saying if2then: only if, necessary, sufficient

Contents f?then statements appear in various forms in practice. The following list presents some of the variations. These are all logically e;uivalent, that is as far as true or false of statement is concerned there is no difference between them. Thus if one is true then all the others are also true, and if one is false all the others are false.

If p , then ;% p implies ;% If p, ;% p onl4 if ;% p is sufficient for ;% ; if p% ; !henever p% ; is necessar4 for p% It is necessar4 for p that ;%

1or instance, instead of saying ! f she smiles then she is happy!, we can say ! f she smiles, she is happy!, !She is happy whenever she smiles!, !She smiles only if she is happy! etc. without chaning their truth values. .&nl4 if. can be translated as .then.. 1or e,ample, !She smiles only if she is happy! is eFuivalent to ! f she smiles, then she is happy!. -ote that !She smiles only if she is happy! means ! f she is not happy, she does not smile!, which is the contrapositive of ! f she smiles, she is happy!. 8ou can also look at it this way: !She smiles only if she is happy! means !She smiles only when she is happy!. So when you see her smile you know she is happy. 3ence ! f she smiles, then she is happy!. Thus they are eFuivalent. +lso .If she smiles, she is happ4. is e;uivalent to .It is necessar4 for her to smile that she is happ4.% 1or ! f she smiles, she is happy! means ! f she smiles, she is always happy!. That is, she never fails to be happy when she smiles. !(eing happy! is inevitable conseFuence;necessity of !smile!. Thus if !being happy! is missing, then

!smile! can not be there either. !(eing happy! is necessary !for her to smile! or eFuivalently ! t is necessary for her to smile that she is happy!.

Subjects to be Learned

## tautology contradiction contingency

Contents Introduction to 'easoning Logical reasoning is the process of dra!ing conclusions from premises using rules of inference% 3ere we are going to study reasoning with propositions. 7ater we are going to see reasoning with predicate logic, which allows us to reason about individual objects. 3owever, inference rules of propositional logic are also applicable to predicate logic and reasoning with propositions is fundamental to reasoning with predicate logic. These inference rules are results of observations of human reasoning over centuries. Though there is nothing absolute about them, they have contributed significantly in the scientific and engineering progress the mankind have made. Today they are universally accepted as the rules of logical reasoning and they should be followed in our reasoning. Since inference rules are based on identities and implications, we are going to study them first. We start with three types of proposition which are used to define the meaning of !identity! and !implication!. T4pes of Proposition Some propositions are always true regardless of the truth value of its component propositions. 1or e,ample 5P P9 is always true regardless of the value of the proposition P. + proposition that is always true called a tautolog4. There are also propositions that are always false such as 5P P9. Such a proposition is called a contradiction. + proposition that is neither a tautology nor a contradiction is called a contingenc4.

1or e,ample 5P

<9 is a contingency.

These types of propositions play a crucial role in reasoning. n particular every inference rule is a tautology as we see in identities and implications. Test Your Understanding of Tautolog4, Contradiction and Contingenc4 For each of the follo!ing propositions, indicate !hat the4 are%

Subjects to be Learned

## dentities5tautologies9 of propositional logic /ual of proposition

Contents 1rom the definitions5meaning9 of connectives, a number of relations between propositions which are useful in reasoning can be derived. (elow some of the often encountered pairs of logically eFuivalent propositions, also called identities, are listed. These identities are used in logical reasoning. n fact we use them in our daily life, often more than one at a time, without realizing it. f two propositions are logically eFuivalent, one can be substituted for the other in any proposition in which they occur without changing the logical value of the proposition. (elow corresponds to tautology9. and it means that the eFuivalence is always true 5a

That these eFuivalences hold can be verified by constructing truth tables for them. )lick here for more detailed discussions about it. 1irst the identities are listed, then e,amples are given to illustrate them. List of Identities8 C. P \$. P E. 5P 5P 5P <9 P9 ????? idempotence of P9 ????? idempotence of 5< P9 ????? commutativity of

## <9 <9 <9 <9 <9 5< 5<

5< 0B 0B

P9 ????? commutativity of >P >P 5< 5< 09B ????? associativity of 09B ????? associativity of

## 5 P 5 P 0B 0B >5P >5P True 1alse P P True 1alse

<9 ????? /e6organDs 7aw <9 ????? /e6organDs 7aw <9 <9 5P 5P 09B ????? distributivity of 09B ????? distributivity of over over

K. >P CL.>P CC.5P C\$.5P CE.5P CG.5P C&.5P CH.5P CI.P CJ.5P CK.5P \$L.>5P \$C.>5P \$\$.5P

## True9 1alse9 1alse9 True9 P9 P9

5 P9 ????? double negation <9 <9 <9 <9 <9 5 P >5P 0B 5P 5 < <9 ????? implication <9 >P <9B 5< 5< P9B????? eFuivalence 09B ????? e,portation P ????? absurdity

P9 ????? contrapositive

7et us see some e,ample statements in 4nglish that illustrate these identities. 3xamples8 C. P 5P P9 ????? idempotence of What this says is, for e,ample, that !Tom is happy.! is eFuivalent to !Tom is happy or Tom is happy!. This and the ne,t identity are rarely used, if ever, in everyday life. 3owever, these are useful when manipulating propositions in reasoning in symbolic form.

\$. P 5P P9 ????? idempotence of Similar to C. above. E. 5P <9 5< P9 ????? commutativity of What this says is, for e,ample, that !Tom is rich or 5Tom is9 famous.! is eFuivalent to !Tom is famous or 5Tom is9 rich!. G. 5P <9 5< P9 ????? commutativity of What this says is, for e,ample, that !Tom is rich and 5Tom is9 famous.! is eFuivalent to !Tom is famous and 5Tom is9 rich!. &. >5P <9 0B >P 5< 09B ????? associativity of What this says is, for e,ample, that !Tom is rich or 5Tom is9 famous, or he is also happy.! is eFuivalent to !Tom is rich, or he is also famous or 5he is9 happy!. H. >5P <9 0B >P Similar to &. above. 5< 09B ????? associativity of

I. 5P <9 5 P <9 ????? /e6organDs 7aw 1or e,ample, ! t is not the case that Tom is rich or famous.! is true if and only if !Tom is not rich and he is not famous.! J. 5P <9 5 P <9 ????? /e6organDs 7aw 1or e,ample, ! t is not the case that Tom is rich and famous.! is true if and only if !Tom is not rich or he is not famous.! K. >P 5< 0B >5P <9 5P 09B ????? distributivity of over What this says is, for e,ample, that !Tom is rich, and he is famous or 5he is9 happy.! is eFuivalent to !Tom is rich and 5he is9 famous, or Tom is rich and 5he is9 happy!. CL. >P 5< 0B >5P <9 5P 09B ????? distributivity of over Similarly to K. above, what this says is, for e,ample, that !Tom is rich, or he is famous and 5he is9 happy.! is eFuivalent to !Tom is rich or 5he is9 famous, and Tom is rich or 5he is9 happy!.

CC. 5P True9 True. 3ere True is a proposition that is always true. Thus the proposition 5P True9 is always true regardless of what P is. This and the ne,t three identities, like identities C and \$, are rarely used, if ever, in everyday life. 3owever, these are useful when manipulating propositions in reasoning in symbolic form. C\$. 5P CE. 5P CG. 5P 1alse9 1alse9 True9 1alse P P

C&. 5P P9 True What this says is that a statement such as !Tom is H foot tall or he is not H foot tall.! is always true. CH. 5P P9 1alse What this says is that a statement such as !Tom is H foot tall and he is not H foot tall.! is always false. CI. P 5 P9 ????? double negation What this says is, for e,ample, that ! t is not the case that Tom is not H foot tall.! is eFuivalent to !Tom is H foot tall.! CJ. 5P <9 5 P <9 ????? implication 1or e,ample, the statement ! f win the lottery, will give you a million dollars.! is not true, that is, am lying, if win the lottery and donDt give you a million dollars. t is true in all the other cases. Similarly, the statement ! donDt win the lottery or give you a million dollars.! is false, if win the lottery and donDt give you a million dollars. t is true in all the other cases. Thus these two statements are logically eFuivalent. CK. 5P <9 >5P <9 5< P9B????? eFuivalence What this says is, for e,ample, that !Tom is happy if and only if he is healthy.! is logically eFuivalent to !!if Tom is happy then he is healthy, and if Tom is healthy he is happy.!

\$L. >5P <9 0B >P 5< 09B ????? e,portation 1or e,ample, ! f Tom is healthy, then if he is rich, then he is happy.! is logically eFuivalent to ! f Tom is healthy and rich, then he is happy.! \$C. >5P <9 5P <9B P ????? absurdity 1or e,ample, if ! f Tom is guilty then he must have been in that room.! and ! f Tom is guilty then he could not have been in that room.! are both true, then there must be something wrong about the assumption that Tom is guilty. \$\$. 5P <9 5 < P9 ????? contrapositive 1or e,ample, ! f Tom is healthy, then he is happy.! is logically eFuivalent to ! f Tom is not happy, he is not healthy.!

The identities C M CH listed above can be paired by duality relation, which is defined below, as C and \$, E and G, ..., C& and CH. That is C and \$ are dual to each other, E and G are dual to each other, .... Thus if you know one of a pair, you can obtain the other of the pair by using the duality. 1ual of Proposition 7et X be a proposition involving only , , and as a connective. 7et X* be the proposition obtained from X by replacing with , with , T with F, and F with T. Then X* is called the dual of X. 1or e,ample, the dual of >P < B P is >P >T 0B is > P <B >1 0B . <B P, and the dual of > P <B

Propert4 of 1ual8 f two propositions P and Q involving only , , and connective are eFuivalent, then their duals P* and Q* are also eFuivalent.

as a

## 'easoning !ith Propositions

Logical reasoning is the process of drawing conclusions from premises using rules of inference. The basic inference rule is modus

## and P hold, then

can be

3ere the lines above the dotted line are premises and the line below it is the conclusion drawn from the premises. 1or e,ample if !if it rains, then the game is not played! and !it rains! are both true, then we can conclude that the game is not played. n addition to modus ponens, one can also reason by using identities and implications. f the left5right9 hand side of an identity appearing in a proposition is replaced by the right5left9 hand side of the identity, then the resulting proposition is logically eFuivalent to the original proposition. Thus the new proposition is deduced from the original proposition. 1or e,ample in the proposition P 5< 09, 5< 09 can be replaced with 5 < 09 to conclude P 5 < 09, since 5< 09 5 < 09 Similarly if the left5right9 hand side of an implication appearing in a proposition is replaced by the right5left9 hand side of the implication, then the resulting proposition is logically implied by the original proposition. Thus the new proposition is deduced from the original proposition. The tautologies listed as !implications! can also be considered inference rules as shown below.

0ules of nference
P P P P !P " P P !P "

Tautological 1orm
addition

-ame

simplification

P P

#P

!P

"\$

modus ponens

# P P P P #!P

!P

"\$

modus tollens

"

P\$

dis%unctive syllogism

## P & P P P !P " P & S !P " !& S" &

#!P

"

&"\$

#P

&\$

hypothetical syllogism

con%unction

#!P

"

!&

S"

!P

&"\$

S\$

constructive dilemma

!& S P &

S"

#!P P

" &\$

!&

S"

S"\$

destructive dilemma

3xample of Inferencing

)onsider the following argument8 C. Today is Tuesday or Wednesday. \$. (ut it canDt be Wednesday, since the doctorDs office is open today, and that office is always closed on Wednesdays. E. Therefore today must be Tuesday. This seFuence of reasoning 5inferencing9 can be represented as a series of application of modus ponens to the corresponding propositions as follows. The modus ponens is an inference rule which deduces Q from T: Today is Tuesday. W: Today is Wednesday. D: The doctorDs office is open today. C: The doctorDs office is always closed on Wednesdays. The above reasoning can be represented by propositions as follows. and P.

???????????? T To see if this conclusion T is correct, let us first find the relationship among , !, and ": C can be e,pressed using D and W. That is, restate C first as the doctorDs office is closed if it is Wednesday. Then for C, we can proceed as follows. D ???????????? . Thus substituting

## Proving identities using truth table

Contents +ll the identities in dentities can be proven to hold using truth tables as follows. n general two propositions are logically eFuivalent if they take the same value for each set of values of their variables. Thus to see whether or not two propositions are eFuivalent, we construct truth tables for them and compare to see whether or not they take the same value for each set of values of their variables. 1or e,ample consider the commutativit4 of : 5P <9 5< P9. To prove that this eFuivalence holds, let us construct a truth table for each of the proposition 5P <9 and 5< P9. + truth table for 5P
P \$ (P 11 1T T1 TT \$) 1 T T T

## + truth table for 5<

P \$ (\$ P) 11 1 1T T T1 T TT T

## P9 take the same value for the same

set of value of P and <. Thus they are 5logically9 eFuivalent. We can also put these two tables into one as follows:
P \$ (P 11 1T T1 TT \$) (\$ 1 T T T 1 T T T P)

Nsing this convention for truth table we can show that the first of 1e 2organ<s 7aws also holds.
P\$ 11 1T T1 TT (P \$) T 1 1 1 P T 1 1 1 \$

5P

<9 and

< are

## Introduction to Predicate Logic

The propositional logic is not po!erful enough to represent all t4pes of assertions that are used in computer science and mathematics, or to express certain t4pes of relationship bet!een propositions such as e;uivalence% For example, the assertion .x is greater than =., !here x is a variable, is not a proposition because 4ou can not tell !hether it is true or false unless 4ou -no! the value of x% Thus the propositional logic can not deal !ith such sentences% >o!ever, such assertions appear ;uite often in mathematics and !e !ant to do inferencing on those assertions% 0lso the pattern involved in the follo!ing logical e;uivalences can not be

captured b4 the propositional logic8 ./ot all birds fl4. is e;uivalent to .Some birds don<t fl4.% ./ot all integers are even. is e;uivalent to .Some integers are not even.% ./ot all cars are expensive. is e;uivalent to .Some cars are not expensive., %%% % 3ach of those propositions is treated independentl4 of the others in propositional logic% For example, if P represents ./ot all birds fl4. and \$ represents .Some integers are not even., then there is no mechanism in propositional logic to find out tha P is e;uivalent to \$% >ence to be used in inferencing, each of these e;uivalences must be listed individuall4 rather than dealing !ith a general formula that covers all these e;uivalences collectivel4 and instantiating it as the4 become necessar4, if onl4 propositional logic is used% Thus !e need more po!erful logic to deal !ith these and other problems% The predicate logic is one of such logic and it addresses these issues among others% Subjects to be Learned

predicate

Contents To cope with deficiencies of propositional logic we introduce two new features: predicates and Fuantifiers. + predicate O is a template involving a verb that describes a property of objects, or a relationship among objects represented by the variables. 1or e,ample, the sentences !The car Tom is driving is blue!, !The sky is blue!, and !The cover of this book is blue! come from the template !is blue! by placing an appropriate noun;noun phrase in front of it. The phrase .is blue. is a predicate and it describes the property of being blue. Predicates are often given a name. 1or e,ample any of !is2blue!, !(lue! or !(! can be used to represent the predicate !is blue! among others. f we adopt ( as the name for the predicate !is2blue!, sentences that assert an object is blue can be represented as !(5,9!, where , represents an arbitrary object. (5,9 reads as !, is blue!. Similarly the sentences !Pohn gives the book to 6ary!, !Pim gives a loaf of bread to

Tom!, and !Pane give a lecture to 6ary! are obtained by substituting an appropriate object for variables x, y, and z in the sentence !x givesy to z!. The template !... gives ... to ...! is a predicate and it describes a relationship among three objects. This predicate can be represented by #ive5 ,, y, z 9 or #5 ,, y, z 9, for e,ample. /ote: The sentence !Pohn gives the book to 6ary! can also be represented by another predicate such as !gives a book to!. Thus if we use (5 ,, y 9 to denote this predicate, !Pohn gives the book to 6ary! becomes (5 Pohn, 6ary 9. n that case, the other sentences, !Pim gives a loaf of bread to Tom!, and !Pane give a lecture to 6ary!, must be e,pressed with other predicates. Test Your Understanding of Predicate ndicate which of the following statements are correct and which are not.

Subjects to be Learned

universe universal Fuantifier e,istential Fuantifier free variable bound variable scope of Fuantifier order of Fuantifiers

Contents + predicate with variables is not a proposition. 1or e,ample, the statement x > 1 with variable x over the universe of real numbers is neither true nor false since we donDt know what x is. t can be true or false depending on the value of x. 1or x > 1 to be a proposition either we substitute a specific number for x or change it to something like !There is a number x for which x > 1 holds!, or !1or every number x, x > 1 holds!. 6ore generally, a predicate with variables 5 atomic formula9 can be made a proposition by applying one of the following two operations to each of its variables:

C. assign a value to the variable \$. Fuantify the variable using a ;uantifier 5see below9. 1or e,ample, x > 1 becomes 3 > 1 if 3 is assigned to x, and it becomes a true statement, hence a proposition. n general, a Fuantification is performed on formulas of predicate logic 5called !ff9, such as # \$ % or P(#), by using Fuantifiers on variables. -ote, however, that the Fuantification in general produces another wff from a wff. t does -.T always produce a proposition from a wff 5See From !ff to Proposition for more on this9. There are two types of Fuantifiers: universal Fuantifier and e,istential Fuantifier. The universal ;uantifier turns, for e,ample, the statement x > 1 to !for every object x in the universe, x > 1!, which is e,pressed as ! x x > 1!. This new statement is true or false in the universe of discourse. 3ence it is a proposition. Similarly the existential ;uantifier turns, for e,ample, the statement x > 1 to !for some object x in the universe, x > 1!, which is e,pressed as ! x x > 1.! +gain, it is true or false in the universe of discourse, and hence it is a proposition. Universe of 1iscourse The universe of discourse, also called universe, is the set of objects of interest. The propositions in the predicate logic are statements on objects of a universe. The universe is thus the domain of the 5individual9 variables. t can be the set of real numbers, the set of integers, the set of all cars on a parking lot, the set of all students in a classroom etc. The universe is often left implicit in practice. (ut it should be obvious from the conte,t.

The Universal \$uantifier The e,pression: x P(x), denotes the universal ;uantification of the atomic formula P5,9. Translated into the 4nglish language, the e,pression is understood as: ! or all x! P(x) holds! or !for every x! P(x) holds!. is called the universal ;uantifier, and x means all the objects , in the universe. f this is followed by P(x) then the meaning is that P(x) is true for every object x in the universe. 1or e,ample, !+ll cars have wheels! could be transformed into the propositional form, x P(x), where: P(x) is the predicate denoting: # has !heels, and

## the universe of discourse is only populated by cars.

Universal \$uantifier and Connective 0/1 f all the elements in the universe of discourse can be listed then the universal Fuantification x P(x) is eFuivalent to the conjunction: P&#%') P&#(' P&#)' P&#n' .

%%%

1or e,ample, in the above e,ample of x P(x), if we knew that there were onl4 G cars in our universe of discourse ("1! "#! "3 and "\$) then we could also translate the statement as: P&c%' P&c(' P&c)' P&c*'

The 3xistential \$uantifier The e,pression: xP(x), denotes the existential ;uantification of P(x). Translated into the 4nglish language, the e,pression could also be understood as: !There e,ists an x such that P(x)! or !There is at least one x such that P(x)! is called the existential ;uantifier, and x means at least one object x in the universe. f this is followed by P(x) then the meaning is that P(x) is true for at least one object x of the universe. 1or e,ample, !%omeone loves yo&! could be transformed into the propositional form, x P(x), where: P(x) is the predicate meaning: # loves 4ou, The universe of discourse contains 5but is not limited to9 all living creatures.

3xistential \$uantifier and Connective &' f all the elements in the universe of discourse can be listed, then the e,istential Fuantification xP(x) is eFuivalent to the disjunction: P&#%' P&#(' P&#)' +++ P&#n'. 1or e,ample, in the above e,ample of x P(x), if we knew that there were onl4 & living creatures in our universe of discourse 5say: me, he, she, re, and fluff9, then we could also write the statement as: P&,e' P&he' P&she' P&re#' P&fluff' +n appearance of a variable in a !ff is said to be bound if either a specific value is assigned to it or it is Fuantified. f an appearance of a variable is not bound, it is called free. The e,tent of the application5effect9 of a Fuantifier, called the scope of the

Fuantifier, is indicated by sFuare brackets 6 7. f there are no sFuare brackets, then the scope is understood to be the smallest !ff following the Fuantification. 1or e,ample, in # P(#- y), the variable # is bound while y is free. n # 6 y P(#y) Q(#- y) 7 , # and the y in P(#- y) are bound, while y in Q(#- y) is free, because the scope of y is P(#- y). The scope of # is 6 y P(#- y) Q(#- y) 7 % &rder of 0pplication of \$uantifiers When more than one variables are Fuantified in a wff such as y # P( #- y ), they are applied from the inside, that is, the one closest to the atomic formula is applied first. Thus y # P( #- y ) reads y 6 # P( #- y ) 7 ,and we say for some y, P( #- y ) holds for every #. The positions of the same type of Fuantifiers can be switched without affecting the truth value as long as there are no Fuantifiers of the other type between the ones to be interchanged. 1or e,ample # y . P&#- y - .' is eFuivalent to y # . P&#- y - .', . y # P&#- y - .', etc. t is the same for the universal Fuantifier. 3owever, the positions of different types of Fuantifiers can not be switched. 1or e,ample # y P& #- y ' is not eFuivalent to y # P& #- y '% 1or let P& #y ' represent # ? y for the set of numbers as the universe, for e,ample. Then # y P& #- y ' reads !for every number #, there is a number ythat is greater than #!, which is true, while y # P& #- y ' reads !there is a number y that is greater than any number!, which is not true. Test Your Understanding of \$uantification ndicate which of the following statements are correct and which are not. Subjects to be Learned

## Translating 4nglish sentences to wff

Contents 4nglish sentences appearing in logical reasoning can be e,pressed as a wff. This makes the e,pressions compact and precise. t thus eliminates possibilities of misinterpretation of sentences. The use of symbolic logic also makes reasoning formal

and mechanical, contributing to the simplification of the reasoning and making it less prone to errors. Transcribing 4nglish sentences into wffs is sometimes a non?trivial task. n this course we are concerned with the transcription using given predicate symbols and the universe. To transcribe a proposition stated in 4nglish using a given set of predicate symbols, first restate in 4nglish the proposition using the predicates, connectives, and Fuantifiers. Then replace the 4nglish phrases with the corresponding symbols. 4,ample: #iven the sentence !-ot every integer is even!, the predicate ! '(x)! meaning x is even, and that the universe is the set of integers, first restate it as ! t is not the case that every integer is even! or ! t is not the case that for every object x in the universe, x is even.! Then !it is not the case! can be represented by the connective ! !, !every object , in the universe! by ! x!, and !x is even! by '(x). Thus altogether wff becomes x '(x). This given sentence can also be interpreted as !Some integers are not even!. Then it can be restated as !1or some object x in the universe, x is not integer!. Then it becomes x '(x). 6ore e,amples: + few more sentences with corresponding wffs are given below. The universe is assumed to be the set of integers, '(x) represents x is even, and ((x), x is odd. !Some integers are even and some are odd! can be translated as x '(x) x ((x) !-o integer is even! can go to x '(x) ! f an integer is not even, then it is odd! becomes x ) '(x) ((x)* !\$ is even! is '(#) 6ore difficult translation: n these translations, properties and relationships are mentioned for certain type of elements in the universe such as relationships between integers in the universe of numbers rather than the universe of integers. n such a case the element type is specified as a precondition using if2then construct.

4,amples: n the e,amples that follow the universe is the set of numbers including real numbers, and comple, numbers. +(x)! '(x) and ((x) representing !x is an integer!, !x is even!, and !x is odd!, respectively. !+ll integers are even! is transcribed as x ) +(x) '(x)* t is first restated as !1or every object in the universe 5meaning for every numnber in this case9 if it is integer, then it is even!. 3ere we are interested in not any arbitrary object5number9 but a specific type of objects, that is integers. (ut if we write x it means !for any object in the universe!. So we must say !1or any object, if it is integer ..! to narrow it down. !Some integers are odd! can be restated as !There are objects that are integers and odd!, which is e,pressed as x ) +(x) '(x)* 1or another interpretation of this sentence see a note !+ number is even only if it is integer! becomes x ) '(x) +(x)* !.nly integers are even! is eFuivalent to ! f it is even, then it is integer!. Thus it is translated to x ) '(x) +(x)*

Test Your Understanding of Translation ndicate which of the following statements are correct and which are not.

Subjects to be Learned

## nference rules of predicate logic o universal instantiation

o

universal generalization

o o

## inferencing in predicate logic

Contents Predicate logic is more powerful than propositional logic. t allows one to reason about properties and relationships of individual objects. n predicate logic, one can use some additional inference rules, which are discussed below, as well as those for propositional logic such as the e;uivalences, implications and inference rules . The following four rules describe when and how the universal and e,istential Fuantifiers can be added to or deleted from an assertion. '. Universal Instantiation8
, P5,9 P5c9

where " is some arbitrary element of the universe. #o to Universal Instantiation for further e,planations and e,amples.
(.

Universal @eneraliAation8
P5c9 , P5,9

where P(") holds for every element c of the universe of discourse. #o to Universal @eneraliAation for further e,planations and e,amples.
).

3xistential Instantiation8
, P5,9 P5c9

where " is some element of the universe of discourse. t is not arbitrary but must be one for which P5c9 is true. #o to 3xistential Instantiation for further e,planations and e,amples.
*.

3xistential @eneraliAation8
P5c9 , P5,9

where " is an element of the universe. #o to 3xistential @eneraliAation for further e,planations and e,amples.

3xample8 +s an e,ample of inference using these rules, let us consider the following reasoning: 0 chec- is void if it has not been cashed for BC da4s% This chec- has not been cashed for BC da4s% Therefore this chec- is void% You can not cash a chec- !hich is void% Therefore 4ou can not cash this chec-% e no! have a chec- !hich can not be cashed% This can be put into symbolic form using the following predicates assuming the universe is the set of all objects: (#)8 # is a check. T(#)8 # has been cashed within EL days. /(#)8 # is void. S(#)8 # can be cashed. This0chec1 represents a specific object in the universe which corresponds to !this check!. # 6 6 (#) T(#) 7 /(#) 7 999999999999999999999999999999999999999999999999999

T( This0chec1 ) 99999999999999999999999999999999999 /( This0chec1 ) # 6 6 (#) / (# ) 7 S(#) 7 99999999999999999999999999999999999999999999999 S( This0chec1 ) 3ere the reasoning proceeds as follows: 1rom # 6 6 (#) 6 6 ( This0chec1 ) T(#) 7 /(#) 7 by Nniversal nstantiation T( This0chec1 ) 7 /( This0chec1 ) 7

Since This2check is a check and T( This0chec1 ) , 6 ( This0chec1 ) T( This0chec1 ) 7 holds. 3ence 6 6 ( This0chec1 ) T( This0chec1 ) 7 /( This0chec1 ) 7 6 ( This0chec1 ) T( This0chec1 ) 7 999999999999999999999999999999999999999999999999999999999 /( This0chec1 ) by 6odus Ponens. Then from # 6 6 (#) /(#) 7 S(#) 7 by Nniversal nstantiation, 6 6 ( This0chec1 ) /( This0chec1 ) 7 S( This0chec1 ) 7 Since /( This0chec1 ) , and ( This0chec1 ), 6 6 ( This0chec1 ) /( This0chec1 ) 7 S( This0chec1 ) 7 6 ( This0chec1 ) /( This0chec1 ) 7 9999999999999999999999999999999999999999999999999999 S( This0chec1 ) by 6odus Ponens. Then by 4,istential #eneralization # S(#) %