Вы находитесь на странице: 1из 23

The Propositional

UNIT 2 THE PROPOSITIONAL LOGIC Logic

Structure Page Nos.

2.0 Introduction 21
2.1 Objectives 23
2.2 Logical Study of Valid and Sound Arguments 23
2.3 Non-Logical Operators 25
2.4 Syntax of Propositional Logic 26
2.5 Semantics/Meaning in Propositional Logic 27
2.6 Interpretations of Formulas 29
2.7 Validity and Inconsistency of Propositions 30
2.8 Equivalent forms in the Prepositional Logic (PL) 32
2.9 Normal Forms 33
2.10 Logical Deduction 35
2.11 Applications 37
2.12 Summary 38
2.13 Solutions/Answers 38
2.14 Further/Readings 43

2.0 INTRODUCTION

Symbolic logic may be thought of as a formal language for representing facts about
objects and relationships between objects of a problem domain alongwith a precise
inferencing mechanism for reasoning and deduction. An inferencing mechanism
derives the knowledge, which is not explicitly/directly available in the knowledge
base, but can be logically inferred from what is given in the knowledge base.

The reason why the subject-matter of the study is called Symbolic Logic is that
symbols are used to denote facts about objects of the domain and relationships
between these objects. Then the symbolic representations and not the original facts
and relationships are manipulated in order to make conclusions or to solve problems.

Also, we mentioned that a Symbolic Logic, apart from having other characteristics, is
a formal language. As a formal language, there must be clearly stated unambiguous
rules for defining various constituents or constructs, viz. alphabet set, words, phrases,
sentences etc. of the language and also for associating meaning to each of these
constituents.

The study of Symbolic Logic is significant, specially, for academic pursuits, in view
of the fact that it is not only descriptive (i.e., it tells how the human beings reason)
but it is also normative (i.e., it tells how the human beings should reason).

In this unit, we shall first study the simplest form of symbolic logic, viz, the
Propositional Logic (PL). In the next unit, we consider a more general form of logic
called the First-Order Predicate Logic (FOPL). Subsequently, we shall consider other
symbolic systems including Fuzzy systems and some Non-monotonic systems.

In the propositional logic, we are interested in declarative sentences, i.e., sentences


that can be either true or false, but not both. Any such declarative sentence is called a
proposition or a statement. For example

(i) The proposition: “The sun rises in the west,” is False,


(ii) The proposition: “Sugar is sweet,” is True, and
21
Introduction to A.I (iii) The truth of the proposition: “Ram has a Ph. D degree.” depends upon whether
Ram is actually a Ph. D or not.
Though, at present, it may not be known whether the statement is True or False,
yet it is sure that the sentence is either True or False and not both True and False
simultaneously.

For a given declarative sentence, its being „True‟ or „False‟ is called its Truth-value.
Thus, truth-value of (i) above is False and that of (ii) is True.

On the other hand, none of the following sentences can be assigned a truth-value, and
hence none of these, is a statement or a proposition:

(i) Who was the first Prime Minister of India? (Interrogative sentence)
(ii) Please, give me that book. (Imperative sentence)
(iii) Ram must exercise regularly. (Imperative, rather Deontic)
(iv) Hurrah! We have won the trophy. (Exclamatory sentence)

In propositional logic, as mentioned earlier also, symbols are used to denote


propositions. For instance, we may denote the propositions discussed above as
follows:

P : The sun rises in the west,


Q : Sugar is sweet,
R : Ram has a Ph.D. degree.

The symbols, such as P, Q, and R, that are used to denote propositions, are called
atomic formulas, or atoms. As discussed earlier, in this case, the truth-value of P is
False, the truth-value of Q is True and the truth-value of R, though not known yet, is
exactly one of „True‟ or „False‟, depending on whether Ram is actually a Ph. D or
not.

At this stage, it may be noted that once symbols are used in place of given statements
in, say, English, then the propositional system, and, in general, a symbolic system is
aware only of symbolic representations, and the associated truth values. The system
operate only on these representations. And, except for possible final translation, is not
aware of the original statements, generally given in some natural language, say,
English.

We can build, from atoms, more complex propositions, sometimes called compound
propositions, by using logical connectives.

Examples of such propositions are:

(i) Sun rises in the east and the sky is clear, and
(ii) If it is hot then it shall rain.

The logical connectives in the above two propositions are “and” and “if…then”. In the
propositional logic, five logical operators or connectives, viz., ~ (not),  (and), 
(or),  (if… then), and  (if and only if), are used. These five logical connectives can
be used to build compound propositions from given atomic formulas. More generally,
they can be used to construct more complicated compound propositions from
compound propositions by applying the connectives repeatedly. For example, if each
of the letters P, Q, C is used as a symbol for the corresponding statement, as follows:

P: The wind speed is high.


Q: Temperature is low.
C: One feels comfortable.
22
then the sentence: The Propositional
“If the wind speed is high and the temperature is low, then one does not feel Logic
comfortable”
may be represented by the formula (( P  Q )  (~ C)). Thus, a compound
proposition can express a complex idea. In the propositional logic, an expression that
represents a proposition, such as P, or a compound proposition, such as ((P  Q)  (~
C)), is called a well-formed formula.

2.1 OBJECTIVES

After going through this unit, you should be able to:


 tell about what is Logic, Symbolic Logic, and Propositional Logic (PL); further,
about why we study each of these; and about some detailed subject matter of
each of these;
 tell the difference between a Proposition/Statement, which forms the basis of PL,
and a sentence in a natural language;
 explain the difference between a logical operator and a non-logical operator; any
symbolic logic uses only logical operators;
 explain the concept of arguments in a logical system and further should be able to
explain mutual differences between a (i) valid argument (ii) sound argument
(iii) invalid argument, and (iv) unsound argument;
 differentiate between an expression that is a well-formed formula wff of PL and
an expression which is not a wff.;
 find the truth-value, or meaning, of a wff of PL and should be able to explain
how the truth value of a wff is obtained from the truth values of atomic wffs.
 explain the difference between various types of wffs, viz, valid wff; consistent
wff, invalid wff and inconsistent wff;
 explain about the various tools, like truth table, logical deduction and reduction
to normal forms that are used to establish validity/invalidity of arguments, and
further should be able to use these tools for the purpose, and
 use the tools and techniques of PL in solving problems that can be solved within
a PL system.

2.2 LOGICAL STUDY OF VALID AND SOUND


ARGUMENTS

Logic is the analysis and appraisal of arguments.

An argument is a set of statements consisting of a finite number of premises, i.e.,


assumed statements and a conclusion.

Valid Argument: A valid argument is one in which it would be contradictory for the
premises to be true but the conclusion false.

In logical studies we are interested in valid arguments.

Example of Valid Argument

(i) If you overslept, you will be late


(ii) You are not late.
you did not oversleep.
Example of Invalid argument
23
Introduction to A.I (i) If you overslept, you will be late
(ii) You did not oversleep
you are not late

(This argument is invalid, because despite not having overslept, one may be late
because of some other engagements or lazyness.)

Another Invalid Argument

(i) If we are close to the top of Mt. Everest then we have magnificent view.
(ii) We are having a magnificent view.
Therefore,
(iii) We are the near the top of Mt. Everest.

(This argument is invalid, because, we may have a magnificent view even if we are not
close to the top of Mt. Everest. The two given statements do not falsify this claim)

How to establish logical validity/invalidity of an argument

We have already discussed invalidity of some arguments, but invalidity above was
based on our intuition. However, intuition may also lead us to incorrect conclusion.
To be sure about the validity of our argument, we need some formal method. In
Section 1.5, we discuss how a Truth table (a formal tool) can be used to establish the
validity/invalidity of an argument.

Sound Argument

We may note that, in the case of a valid argument, it is not required that the
premises/axioms or assumed statements must be True. The assumptions may not be
True, and still the argument may be valid. For example, the following argument is
valid, but its premises and conclusion both are false:

Premise 1: If moon is made of green cheese


Then 2 + 2 = 5
Premise 2: Moon is made of green cheese
(False premise)
From Premise 1 and Premise 2, by applying Modus Ponens, we conclude through
valid argument that 2 + 2 = 5 (which is False).

However, in order to solve problems of everyday life, we need generally to restrict to


only true premises and valid arguments. Then such an argument is called sound
argument.

Sound Argument: is an argument that is valid and has true premises.

(i) If you are reading this, then


you are not illiterate
(ii) You are reading this (true premise)
You are not illiterate (sound conclusion)

Example of valid but not sound argument with correct conclusion.

(i) If moon is made of green cheese then 2 + 2 = 4


(ii) Moon is made of green cheese (False premise)
To conclude 2 + 2 = 4 (correct) makes the argument a Valid Argument

24
Example of Invalid Argument The Propositional
Logic
I (i) If you overslept, you are late.
(ii) you are late.
Therefore, you overslept.
II (i) If you are in Delhi, you are in India.
You are in India.
Therefore, you are in Delhi (invalid argument, though conclusion may be True)

2.3 NON-LOGICAL OPERATORS

One of reason why special symbols:


  ~  
are used in symbolic logic in stead of the corresponding natural languages words:
and, or, not, if…. Then, if and only if, is that the words may have different
meaning in different contexts. For example, the use of the word and in one sentences
has different connotation or meaning from the use in others in the following:

(i) Ram and Mohan are good hockey players.

(the statement can be equivalently broken into two statements:


(i) Ram is a good hockey player (ii) Mohan is a good hockey player)

(ii) Ram and Mohan are good friends.

(though the word and joins two words Ram & Mohan, but can not be equivalently
broken into two statements viz. (i) Ram is a friend (ii) Mohan is a friend)

(iii) Mohan drove a car to reach home, met an accident and got slightly injured.

(Here, the use of the word ‘and’ is not in a logical sense, but, it is in temporal sense of
‘and then’ because statement (iii) has different sense from the statement given in (iv)
below)

(iv) Mohan met an accident, got slightly injured and drove a car to reach home.

Thus from the above statements, it can be seen that the natural language word and
may have many senses, both logical and non-logical. Similarly, the words since,
hence and because are frequently used in arguments to establish some facts. But as
shown from the following two arguments, their use in logical arguments is risky in
the sense that some of the arguments involving any of these words may lead to
incorrect conclusions:

Argument (1): Using the word because, we get correct conclusion from
True statements.
Let

P: Dr. Man Mohan Singh was Prime Minister of


India in the year 2006 (True statement)

Q: Congress party and its allies commanded majority in Indian Parliament in the year
2006 (True statement)

Then the following statement:


P because Q (True statement/conclusion)
25
Introduction to A.I Thus, by using the connective because we get a correct/True conclusion from two
True statements viz. P and Q.

Argument ( 2)

In the following using the word, because, we get incorrect/false conclusion from
True statements

Let

P: Dr. Man Mohan Singh was Prime Minister of


India in the year 2006 (True statement)

R: Chirapoonji, a town in north-east India, received maximum average rainfall in the


world during 1901-2000. (True statement)

However to say
P because R, i.e., to say
Dr. Man Mohan Singe was Prime Minster of India in 2006, because Chirapoonji, a
town in north-east India, received maximum average rainfall in the world during
1901-2000.
is at least incorrect, if not ludicrous.

Thus from two True statements, P and R and by using connective „because‟, in this
case, the conclusion is incorrect.

Thus, by using connective because, in one argument we get a correct conclusion from
two True statements and, on the other hand, we get an incorrect conclusion from True
statements.

2.4 SYNTAX OF PROPOSITIONAL LOGIC

A Well-formed formula, or wff or formula in short, in the propositional logic is


defined recursively as follows:

1. An atom is a wff.
2. If A is a wff, then (~A) is a wff.
3. If A and B are wffs, then each of (A  B), (A  B), (A  B), and (A  B) is a
wff.
4. Any wff is obtained only by applying the above rules.

From the above recursive definition of a wff it is not difficult to see that expression:
(( P  ( Q  ( ~ R)))  S) is a wff; because , to begin with, each of P, Q , ( ~ R) and
S, by definitions is a wff. Then, by recursive application, the expression: (Q  ( ~ R))
is a wff. Again, by another recursive application, the expression: (P  (Q  ( ~ R)))
is a wff. And, finally the expression given initially is a wff.

Further, it is easy to see that according to the recursive definition of a wff, each of the
expressions: (P  (Q  )) and (P ( Q  R )) is not a wff.

Some pairs of parentheses may be dropped, for simplification. For example,


A  B and A  B respectively may be used in stead of the given wffs ( A  B) and (A
 B), respectively. We can omit the use of parentheses by assigning priorities in
increasing order to the connectives as follows:
26 , , , , ~.
Thus, „‟ has least priority and „~‟ has highest priority. Further, if in an expression, The Propositional
there are no parentheses and two connectives between three atomic formulas are used, Logic
then the operator with higher priority will be applied first and the other operator will
be applied later.

For example: Let us be given the wff P  Q  ~ R without parenthesis. Then among
the operators appearing in wff, the operator „~‟ has highest priority. Therefore, ~ R is
replaced by (~R). The equivalent expression becomes P  Q  (~ R). Next, out of the
two operators viz „‟ and „‟, the operators „‟ has higher priority. Therefore, by
applying parentheses appropriately, the new expression becomes P  (Q  (~ R)).
Finally, only one operator is left. Hence the fully parenthesized expression becomes (P
 (Q  (~ R)))

2.5 SEMANTICS/MEANING IN PROPOSITIONAL


LOGIC

Next, we define the rules of finding the truth value or meaning of a wff, when truth
values of the atoms appearing in the wff are known or given.

1. The wff ~ A is True when A is False, and ~ A is False when A is true. The wff
~ A is called the negation of A.
2. The wff (A  B) is True if A and B are both True; otherwise, the wff A  B is
False. The wff (A  B) is called the conjunction of A and B.
3. The wff (A  B) is true if at least one of A and B is True; otherwise, (A  B) is
False. (A  B) is called the disjunction of A and B.
4. The wff (A  B) is False if A is True and B is False; otherwise, (A  B) is True.
The wff (A  B) is read as “If A, then B,” or “A implies B.” The symbol „‟ is
called implication.
5. The wff (A  B) is True whenever A and B have the same truth values;
otherwise (A  B) is False. The wff (A  B) is read as “A if and only if B.”
Table 1.5
A B ~A (A  B) (A  B) (A  B) (A  B)
(i) T T F T T T T
(ii) T F F F T F F
(iii) F T T F T T F
(iv) F F T F F T T

The above relations can be summarized by Table 1.5 given below.

The table may be read as follows:


Let the symbol T stand for True and the symbol F stand for False. Then, Row (i) is
interpreted as: if we assign T (i.e. True) to A and T to B then the truth values of (~ A),
(A  B), (A  B), (A  B) and (A  B) are respectively F, T, T, T, T.
Further row (iii), for example, is interpreted as:, if we assign truth-value F (False) to
A and T (True) to B then truth values of (~ A), (A  B), (A  B), ( A  B) and ( A 
B) are respectively T, F, T, T, F.

This table, shall be used to evaluate the truth values of a wff in terms of the truth
values of the atoms occurring in the formula.

Now, we discuss the issue, raised in Section 1.2, of how to check validity/invalidity of
an argument through formal means.

27
Introduction to A.I Validity through Truth-Table.

(i) If I overslept, then I am late, i.e., symbolically


SL
(ii) I am not late, i.e., symbolically
~ L
To conclude
(iii) I did not oversleep, i.e., symbolically
~S

To establish the validity/Invalidity of the argument, consider the Truth-Table

S L SL ~L ~S
F F T T T
F T T F T
T F F T F
T T T F F

There is only one row, viz., first row, in which both the premises viz. S  L and ~ L
are True. But in this case the conclusion represented by ~ S is also True. Hence, the
conclusion is valid.

Invalidity through Truth-Table

(i) If I overslept, then I am late


SL
(ii) I did not oversleep, i.e.,
~S
To conclude
(iii) I would not be late, i.e.,
~ L (invalid conclusion)

S L (S  L) ~ S ~L

F F T T T
F T T T F
T F F F T
T T T F F

The invalidity of the argument is established, because, for validity last column must
contain True in those rows for which all axioms/premises are True. But in the second
row both S  L and ~ S are True but ~ L is False

Ex. 1 Express the following statements in Propositional Logic.


a) If he campaigns hard, he will be elected.
b) If the humidity is high, it will rain either today or tomorrow.
c) Cancer will not be cured unless its cause is determined and a new drug for
cancer is found.
d) It requires courage and skills to climb a mountain.

Ex. 2: Let
P : He needs a doctor, Q : He needs a lawyer,
R : He has an accident, S : He is sick,
U : He is injured.

28
State the following formulas in English. The Propositional
Logic
a) (S  P)  (R  Q) b) P  (S  U)
c) (P  Q)  R d) (P  Q)  (S  U)

2.6 INTERPRETATIONS OF FORMULAS

In order to find the truth value of a given formula G, the truth values for the atoms of
the formula are either given or assumed. The set of initially given/assumed values of
all the atomic formulas occurring in a formula say G, is called an interpretation of
the formula G. Suppose that A and B are two atoms and that the truth values of A and
B are T and F respectively. Then, according to third row of Table 1.5, when A is F
and B is T we find that the truth values of (~A), (A  B),
(A  B), (A  B), and (A  B) are T, F, T, T and F, respectively. By developing a
Truth-table of a(ny) formula, its truth value can be evaluated in terms of its
interpretation, i.e., in terms of the truth values associated with the constituent atoms.

Example

Consider the formula

G : ((A  B)  (R  (~ S))).

(Please note that the string, in this case G, before the symbol ‘:’, is the name of the
formula which is the name of the string of symbols after ‘:’. Thus, G is the name of the
formula ((A B) (R  (~ S))).

The atoms in this formula are A, B, R and S. Suppose the truth values of A, B, R, and
S are given as T, F, T and T, respectively. Then (in the following and elsewhere also,
if there is no possibility of confusion, we use T for ‘True’ and F for ‘False’.)
 (A  B) is F since B is F;
 (~S) is F since S is T;
 (R  (~ S)) is F since R is T and (~S) is F; and hence,
 (A  B)  (R  (~S)) is T since (A  B) is F (and (R  (~S)) is F, which
does not matter).
Note: In view of the fact that when ( A  B) is F, the truth-value of
(A  B)  Any Formula
must be T and, hence, we need not compute the value of (R  (~ S)).
Therefore, the formula G is T if A, B, R, and S are assigned truth values T, F, T and T,
respectively.

The assignment of the truth values T, F, T, T to A, B, R, S, respectively, is called an


interpretation of the formula G. Since, each one of A, B, R, and S can be assigned
one of the two values, viz., either T or F, there are 2 4 = 16 possible interpretations of
the formula G. In Table 1.6, we give the truth values of the formula G under all these
16 interpretations.

The above procedure may be repeated to find truth value of any formula from any
interpretation, i.e., from any assignment to the atomic formulas occurring in the given
formula.

29
Introduction to A.I
Table 1.6 Truth Table of (A  B  (R  ( ~ S)

A B R S ~S (A  B) (R  (~S)) (A  B)  (R
 ( ~ S)
T T T T F T F F
T T T F T T T T
T T F T F T T T
T T F F T T F F
T F T T F F F T
T F T F T F T T
T F F T F F T T
T F F F T F F T
F T T T F F F T
F T T F T F T T
F T F T F F T T
F T F F T F F T
F F T T F F F T
F F T F T F T T
F F F T F F T T
F F F F T F F T

A table, such as given above, that displays the truth values of a formula G for all
possible assignments of truth values to atoms occurring in G is called a Truth table
of G.

NOTATION: If A1,….An are all the atoms in a formula, it may be more convenient to
represent an interpretation by a set (m1,….mn), where mi is either Ai or ~Ai. mi is
written as Ai if T is assigned to Ai. But mi is written as ~ Ai if F is assigned to Ai.

For example, the set {A, ~B, ~R,S} represents an interpretation of a formula in which
A, B, R, and S are the only atoms and which are, respectively, assigned T, F, F, and T.
We will use the notation throughout.

Ex. 3: Construct a truth table for the formula.


P: (~ A  B)  (~ (A  ~ B))

2.7 VALIDITY AND INCONSISTENCY OF


PROPOSITIONS

It may noted that in Section 1.2, we discussed the concept of valid Argument. Here,
we study formulas or propositions. Next, we shall consider wff that are true under
all possible interpretations and wff that are false under all possible interpretations.

Example

Let us consider the wff

G : (((A  B)  A)  B).

The formula G has 22 = 4 possible interpretations in view of the fact it has two atoms
viz A and B. It can be easily seen from the following table that the wff G is True
under all its interpretations. Such as a wff which is True under all interpretation is
called a valid formula (or a tautology).

30
Truth Table of (((A B)  A)  B) The Propositional
A B (A B) (A B)  A ((A  B)  A)  B Logic
T T T T T
T F F F T
F T T F T
F F T F T

Consider another formula

G : ((A  B)  (A  ~ B))

The truth table of the formula G given below shows that G is False under all its
interpretations. Such a formula which is False under all interpretations is called an
inconsistent formula (or a contradiction).

Truth Table of (A B)  (A  ~ B)


A B ~B (A B) (A  ~ B) ((A B)  (A  ~ B)
T T F T F F
T F T F T F
F T F T F F
F F T T F F

Next, we formally define the concepts discussed above.

Definition: A formula is said to be valid if and only if it is true under all its
interpretations. A formula is said to be invalid if and only if it is not true under at
least one interpretation. A valid formula is also called a Tautology. A formula is
invalid if there is at least one interpretation for which the formula has a truth value
False.

Definition: A formula is said to be inconsistent (or unsatisfiable) if and only if it is


False under all its interpretations. A formula is said to be consistent or satisfiable if
and only if it is not inconsistent. In other words, a formula is consistent if there is at
least one interpretation for which the formula has a truth value true.

From the definitions given above, it is easily seen that

(i) A formula is valid if and only if its negation is inconsistent.


(ii) A formula is invalid if and only if there is at least one interpretation under
which the formula is false.
(iii) A formula is consistent if and only if there is at least one interpretation under
which the formula is true.
(iv) If a formula is valid, then it is consistent, but not vice versa. (example given
below)
(v) If a formula is inconsistent, then it is invalid, but not vice versa. (example given
below)

Definition: If a formula P is True under an interpretation I, then we say that I


satisfied P, or P is satisfied by I. If a formula P is False under an interpretation I,
then we say that I falsifies P or P is falsified by I.

As for an example, the formula (A  (~B)) is satisfied by the interpretation {A, ~ B}


i.e, by taking A as T and B as F, but is falsified by the interpretation {A, B} i.e., when
A is taken as T and B is taken as T. An interpretation I that satisfies a formula P, is
called a model of the formula F.

31
Introduction to A.I Examples:
(i) A Valid Formula:

(a) Even True is a wff which is always True and, hence, True is a valid formula.
(b) G1: A  (~A) is True for all its interpretations. As G1 has only one atom viz. A,
terefore, it has only two interpretations. Let one interpretation of G1 be : A is
True. But then G1 assumes the value (True  (~ True)) = True. The other
interpretation of G1 is : A is False. Then G1 assumes the value (False  ~ False) =
True.

(ii) Consistent (True for at least one interpretation) but not valid Formula (i.e. is
invalid, i.e., False for at least one interpretation):

(a) The simplest example of such a formula is the formula G2: A. Then, for the
assignment A as True, G2 is True. Therefore G2 is consistent. On the other
hand, the interpretation of G2 with A as False, makes G2 false. Therefore, G2:
A is not valid.

(b) Both G3 : A  B and G4 : A  B are consistent but not valid. Both G3 and G4
are True under the assignment A as True and B as True. On the other hand,
both are False under the interpretation A as False and B as False.

(iii) Invalid (False for at least one interpretation) but not inconsistent (not False
for all interpretations): Any one of the examples in (ii) above

(iv) Inconsistent formula (i.e., which is false for all interpretations)

(a) Even „False‟ is a wff; which is always False, and hence is inconsistent.
(b) G5 : A  (~A) is False, for all interpretations of G5. Actually, there are only
two interpretations of G5. One is : A is True. The other is : A is False. In both
cases G5 is False.

It will be shown later that the proof of the validity or inconsistency of a formula is a
very important problem. In the propositional logic, since the number of interpretations
of a formula is finite, one can always decide whether or not a formula in the
propositional logic is valid (inconsistent) by exhaustively examining all of its possible
interpretations.

Ex. 4: For each of the following formulas, determine whether it is valid, inconsistent,
consistent or some combination of these.

(i) E: ~ (~A)  B
(ii) G: (A  B)  (~ B  ~ A)
(iii) H: (A  ~ A)  (A  B )  ( ~ A)
(iv) J: (A  B)  (~ A)  ( B  ~ B)

2.8 EQUIVALENT FORMS IN THE


PROPOSITIONAL LOGIC (PL)

Definition: Logically Equivalent Formulas: Two formulas G1 and G2 are said to be


(logically) equivalent if for each interpretation i.e., truth assignment to all the atoms
that occur in either G1 or G2; the truth values of G1 and G2 are identical. In other
words, for each interpretation, G1 is True if and only if G2 is True. And, for each
interpretation, G1 is False if and only if G2 is False.
32
As will be clear later, it is often necessary to transform a formula from one form to The Propositional
another, especially to a normal form. This is accomplished by replacing a formula in Logic
the given formula by a formula equivalent to it and repeating this process until the
desired form is obtained.

Example

We can verify that the formula E: ~ (A  B) is equivalent the formula G: to A  ~ B


by examining the following truth table. The corresponding values in the last two
columns are identical.

Table Joint Truth table of ~ (A  B) and (A  ~ B)


A B ~B (A  B) ~(A  B) A~B
T T F T F F
T F T F T T
F T F T F F
F F T T F F

Solutions of problems using symbolic logic can be simplified, if we can simplify


involved formulas by some equivalent simpler formulas given in table below. These
equivalences can be verified by using truth tables.

Table of Equivalences of PL
(1.1) E  G = (E  G)  (G  E)
(1.2) EG=~EG
(1.3)(a) E  G = G  E; (b) E  G = G  E
(1.4)(a) (E  G)  H = E  (G  H); (b) (E  G)  H = E  (G  H)
(1.5)(a) E  (G  H) = (E  G)  (E  H); (b) E  (G  H) = (E  G)  (E  H)
(1.6)(a) E  False = E; (b) E  True = E
(1.7)(a) E  True = True (b) E  False = False
(1.8)(a) E  ~ E = True; (b) E  E = E
(1.9) ~ (~ E) = E
(1.10)(a) ~ (E  G) = ~ E  ~ G; (b) ~ (E  G) = ~ E  ~ G

In the table given above, True denotes the fact that the wff is True under all
interpretations and False denotes the wff that is False under all interpretations.

Laws (1.3a), (1.3b) are often, called commutative laws; (1.4a), (1.4b) associative
laws; (1.5a), (1.5b), distributive laws: and (1.10a), (1.10b), De Morgan’s laws.

2.9 NORMAL FORMS

Some Definitions: A clause is a disjunction of literals. For example, (E  ~ F  ~ G)


is a clause. But (E  ~ F  ~ G) is not a clause. A literal is either an atom, say A, or
its negation, say ~ A.

Definition: A formula E is said to be in a Conjunctive Normal Form (CNF) if and


only if E has the form E : E1  …. En, n  1, where each of E1,…., En is a
disjunction of literals.

Definition: A formula E is said to be in Disjunctive Normal Form (DNF) if and only


if E has the form E: E1  E2 ….En, where each Ei is a conjunction of literals.

Examples: Let A, B and C be atoms. Then F: ( ~ A  B )  (A  ~ B  ~ C) is a


formula in a disjunctive normal form. 33
Introduction to A.I Example: Again G: (~ A  B)  (A  ~ B  ~ C) is a formula in Conjunctive Normal
Form, because it is a conjunction of the two disjunctions of literals viz of (~ A  B)
and (A  ~ B  ~ C)

Example: Each of the following is neither in CNF nor in DNF

(i) (~ A  B)  (A  ~ B  C)
(ii) ( A  B)  ( ~ B  ~ A)

Using table of equivalent formulas given above, any valid Propositional Logic
formula can be transformed into CNF as well as DNF.

The steps for conversion to DNF are as follows

Step 1: Use the equivalences to remove the logical operators „‟ and „‟:

(i) E  G = (E  g)  (G  E)
(ii) E  G = ~ E  G

Step 2 Remove ~‟s, if occur consecutively more than once, using

(iii) ~ (~E) = E

(iv) Use De Morgan‟s laws to take „~‟ nearest to atoms

(v) ~(E  G) = ~ E  ~ G
(vi) ~(E  G) = ~ E  ~ G

Step 3 Use the distributive laws repeatedly

(vii) E  (G  H) = (E  G)  (E  H)
(viii) E  (G  H) = (E  G)  (E  H)

Example

Obtain a disjunctive normal form for the formula ~ (A  (~ B  C)).

Consider A  (~B  C) = ~ A  (~B  C) (Using (E F) = (~ E  F))


Hence, ~ (A  (~ B  C)) = ~ (~ A  (~B  C))
= ~ (~ A)  (~ (~ B  C)) (Using ~ ( E  F) =
~ E  ~ F)
= A  (B  (~ C)) (Using ~ (~ E) = E and
~ (E  F ) = ~ E  ~ F

= (A  B)  (A  (~ C)) (Using E  (F  G) =
(E  F)  (E  G))

However, if we are to obtain CNF of ~ A ( (~ B  C)), in the last but one step, we
obtain
~ (A  (~ B  C)) = A  (B  ~ C), which is in CNF, because, each of A and
( B  ~ C) is a disjunct.

Example: Obtain conjunctive Normal Form (CNF) for the formula: D  (A 


(B  C))

34
Consider The Propositional
D  (A (B  C)) (using E  F = ~ E  F for the inner implication) Logic
= D  (~ A  (B  C)) (using E  F = ~ E  F for the outer implication)
= ~ D  (~ A  (B  C))
= ( ~ D  ~ A)  (B  C) (using Associative law for disjunction)
= (( ~ D  ~ A  B)  (~ D  ~ A  C)

The last line denotes the conjunctive Normal Form of D (A  (B  C))


(using distributivity of  over )

Note: If we stop at the last but one stop, then we obtain (~ D  ~ A)  (B  C) = ~ D


 ~ A  (B  C) is a Disjunctive Normal Form for the given formula: D  (A  (B
 C))

Ex. 5: Transform the following into disjunctive normal forms.

(i) ~ (A  ~ B)  (S  T) (ii) (A  B)  R

Ex. 6: Transform the following into conjunctive normal forms.


(i) (A  B)  R

(ii) (~A  B)  (A  ~ B)

Ex. 7: Verify each of the following pairs of equivalent formulas by transforming


formulas on both sides of the sign = into the same normal form.

(i) (A B)  (A  B) = (~ A  B)  (B  A)
(ii) A  B  (~A  ~ B) = ~ A  ~ B  (A  B)

2.10 LOGICAL DEDUCTION

Definition: A formula G is said to be a logical consequence of given formulas E1,…,


En (or G is logical derivation of E1,….E2) if and only for any interpretation I in
which E1  E2  … En is true, for the interpretation I, G is also true. The proposition
E1, E2…,En are called axioms/premises of G.

Next, we state without proof two very useful theorems for establishing logical
derivations:

Theorem 1: Given formulas E1,…, En and a formula G, G is a logical derivation of


E1,….,En if and only if the formula ((E1  ….En)  G) is valid, i.e., True for all
interpretations of the formula.

Theorem 2: Given formulas E1,…,En and a formula G, G is a logical consequence or


derivation of E1,…En if only if the formula (E1  ….. En  ~ G) is inconsistent, i.e.,
False for all interpretations of the formula.

The above two theorems are very useful. They show that proving a particular
formula as a logical consequence of a finite set of formulas is equivalent to
proving that a certain single but related formula is valid or inconsistent.

Note: Significance of the above two theorems lies in the fact that logical consequence
relates two formulas, where as validity/inconsistency is only about one formula. Also,
there are a number of well-known methods, including truth-table method, for
35
Introduction to A.I establishing inconsistency/validity of a formula. Thus, formula G logically follows
from a given set of formulas, we check validity of single formula. And, for checking
validity of a single formula, we already have some methods including Truth-table
method.

Definition: If the formula G is a logical consequence of the formula E1,….En, then the
single formula ((E1  …. En)  G) is called a theorem, and G is also called the
conclusion of the theorem.

There are at least three alternative methods of establishing formula G as a logical


consequence of given formulas E1, E2, ….En.

According to one of these methods, through truth table or otherwise, it should be


established that for any interpretation for which each of E 1, ….En, is true then for that
interpretation G must be true.

According to second method, using Theorem 1, we should show that the formula:
(E1  E2  ….. En)  G
is valid, i.e., True for each of its interpretations. Again validity can be shown either
through a truth table or otherwise.

The last of the three methods uses Theorem 2. According to this method, in order to
show, G as a logical consequence of E1, E2,…En, it should be established that the
formula (E1  E2  ….. En  ~ G) is inconsistent, i.e., is False under all its
interpretations. Next, we apply these methods through an example.

Example: We are given the formulas

E1 : (A  B), E2 : ~B , G : ~ A

We are required to show that G is a logical consequence of E1 and E2.

Method 1: From the following Table, it is clear that whenever E1: A  B and
E2: ~ B both are simultaneously True, (which is true only in the last row of the table)
then G: ~ A is also True. Hence, the proof.

A B AB ~B ~A
T T T F F
T F F T F
F T T F T
F F T T T

Method 2: We prove the result by showing the validity of E1  E2  G, i.e., of ((A 


B)  ~ B)  ~ A by transforming it into a conjunctive normal form.

(A  B)  ~ B)  ~ A = ~ (( A  B)  ~ B)  ~ A (using E  F = (~ E  F))
= ~ (( ~ A  B)  ~ B)  ~ A

= ~ ((~ A  ~ B)  (B  ~ B))  ~ A
= ~ ((~ A  ~ B)  False)  ~ A
= ~(( ~ A  ~ B))  ~ A (using De Morgan’s Laws)
= (A  B)  ~ A =
= (B  A)  ~ A
= B  (A  ~ A)
= B  True
36
= True (always) The Propositional
Thus, ((A  B)  B)  ~ A is valid. Logic

Ex. 8: Using Truth Table show that G is a logical consequence of E1 and E2


where E1 : (A  B), E2 : ~B , G : ~ A, by establishing validity of the formula (E 1  E2
 G).
Ex. 9: Use (i) the truth table technique (ii) reduction to DNF/CNF to show that
(A  B)  ~ B  A is inconsistent which, in turn proves that ~ A is a logical
consequence of (A  B) and ~ B.

2.11 APPLICATIONS

Next, we discuss some of the applications of Propositional Logic.

Example

Suppose the stock prices go down if the interest rate goes up. Suppose also that most
people are unhappy when stock prices go down. Assume that the interest rate goes up.
Show that we can conclude that most people are unhappy.

To show the above conclusion, let us denote the statements are as follows:

A : Interest rate goes up,


S : Stock prices go down
U : Most people are unhappy

The problem has the following four statements:

1) If the interest rate goes up, stock prices go down.


2) If stock prices go down, most people are unhappy.
3) The interest rate goes up.
4) Most people are unhappy. (to conclude)

The above-mentioned statements are symbolised as,

(1) A S
(2) S U
(3) A
(4) U. (to conclude)

In order to establish the conclusion, we should show that (4) is logical consequence
of (1) , (2) and (3). For this purpose, we show that (4) is true whenever (1)  (2) 
(3) is true.

We transform ((A  S)  (S  U)  A) (representing (1)  (2)  (3)) into a normal


form:

((A S)  (S U)  A) = ((~A  S)  (~S  U)  A) (by using E F =


~ E  F)
= (A  (~A  S)  (~ S  U)) (by using E  F =
F  E, (to bring the
last clause A in the
beginning)

37
Introduction to A.I = (((A  ~A)  (A  S))  (~ S  U)) (by using associative
laws and then using
distributivity of
‘A ’ over the next
disjunct (~ A  S))
= ((False  (A  S))  (~ S  U)) (using False
 E = E)
= (A  S )  ( ~ S  U)
= (A  S  ~ S)  (A  S  U)
= (A  False)  (A  S  U) (using A  False =
False)
= False  (A  S  U)
=ASU
Therefore, if ((A S)  (S U )  A) is true, then (A  S  U) is true. Since
(A  S  U) is true then each of A, S, and U is true, we conclude that U is true. Hence,
U is a logical consequence of 1), 2) and 3) given above.

Ex. 10:Given that if the Parliament refuses to enact new laws, then the strike will not
be over unless it lasts more than one year and the president of the firm resigns, will
the strike not be over if the Parliament refuses to act and the strike just starts?

2.12 SUMMARY

In this unit, to begin with, we discuss what is Symbolic Logic and why it is it is
important to study it. The subject matter of symbolic logic consists of arguments,
where an argument consists of a number of statements — one of which is called
the conclusion and is supposed to be logically drawn from the others. Each one of the
other is called a premise, To be more specific, the subject of Symbolic Logic is the
study of how to develop tools and technique to draw correct conclusions from a given
set of premisses or to verify whether a conclusion is correct or not. A conclusion is
correct in the sense: Whenever all the premisses are True then conclusion is
necessarily True. An argument with correct conclusion is called a valid argument.
Next, a sound argument is defined as a valid argument in which premises also have to
be True.
(in some world).

In this unit, we study only a specific branch of symbolic logic, viz. Propositional
Logic (PL).

Next, we discuss how a statement, also called a well-formed formula (wff) and also a
Proposition, which is the basic unit of an argument in PL, is appropriately denoted
and how it is interpreted, i.e., how a wff is given meaning. The meaning of a wff in
PL is only in terms of True or False. The wffs are classified as valid, invalid,
consistent and inconsistent.
Then tools and techniques in the form of Truth-table, logical deduction, normal forms
etc are discussed to test these properties of wffs and also to test validity of arguments.
Finally a number of applications of these concepts, tools and techniques of PL are
used to solve problems that involve logical reasoning of PL systems.

2.13 SOLUTIONS/ANSWERS
Ex. 1
(a) Let H: He campaigns hard ; E: He will be elected
38 Then the statement becomes the formula:
HE The Propositional
(b) Let H: The Humidity is high, RTY: It will rain today Logic
RTW: It will rain tomorrow.
Then
H  RTY  RTW
(c) Let C: Cancer will be cured
D: Cancer‟s cause will be determined
F: A new drug for cancer will be found
Then the statement becomes the formula:
(~ C)  (D  F). This formula may also be written as:
CDF
(d) Let C: One has courage
S: One has skill
M: One climbs mountain
Then the statement becomes the formula:
MCS
Ex 2: (a) If he is sick then he needs a doctor, but, if he has an accident then he needs a
lawyer
(b) If One requires a doctor then one must be either sick or injured.
(c) If he needs both a doctor and a lawyer then he has an accident.
(d) One requires a doctor and also a lawyer if and only if one is sick and also
injured.

Ex. 3:
(i) Truth table of the formula: P: (~ A  B)  ( ~ (A  ~ B)) is as given below.

A B ~A ~B ~A  B A~B ~ (A  ~B) P
T T F F T F T T
T F F T F T F F
F T T F T F T T
F F T T T F T T

Ex. 4:
(i) Consistent but not valid, because, for For B as T and A as F, the formula
is T. But, for A as T and B as F the formula is F.
(ii) It can be easily that ~ B  ~ A has same truth-value as (A  B) for any
interpretation. Therefore, in stead of the given formula, we may consider
the formula
(A  B)  (A  B)
which can be further written as P  P, writing (A  B) as P. Even P 
can be written as P  P  P  (A  B), The last formula is F when F and
A is T. The formula is T when A is F and B is T. Hence, the formula is
neither valid nor inconsistent.
Therefore, the formula is consistent but not valid
(iii) For all truth assignments to A and B, L. H.S. of the formula is always T
and R. H.S. is always F. Hence the formula is inconsistent, i.e., always F
(iv) The L. H. S. of the given formula is F under all interpretations. Hence, the
formula is T under all interpretation. Therefore, the formula is valid.

Ex. 5: (i) Removing ‘’, we get


~ ( A  ~ B)  (~ S  T)
Taking ‘~’ inside we get
(~ A  B)  (~ S  T) (using De Morgan’s Law)
Using distributivity of  over  we get
(~ A  B  ~ S)  (~ A  B  T)
which is the required form
39
Introduction to A.I (ii) Removing outer  we get
~ (A  B )  R
Removing the other „‟ we get
~ (~ A  B)  R
Taking ~ inside, we get
(A  ~ B)  R,
which is the required form

Ex. 6:
(i) Using distributive law in the last formula of 5 (ii) above, we get
(A  R)  (~ B  R)
which is the required CNF

(ii) Using Left distributivity of  over  we get


(( ~ A  B)  A )  ( ~ A  B)  ~ B)
Using Right distributivity inside each pair of parenthese of  over  we get
(( ~ A  A)  (B  A)  (( ~ A  ~ B)  (B  ~ B))
Using ~ A  A = T = B  ~ B, we get
( T  ( B  A))  (( ~ A  ~ B)  T)
which is equivalent to
( B  A )  (( ~ A  ~ B) = (A  B)  (~ A  ~ B)
is the required CNF.

Ex. 7: (i) Consider L.H.S


Removing inner  on L. H.S., we get
(~ A  B)  (A  B)
removing the other „‟
= ~ ( ~ A  B)  (A  B)
Using De Morgan‟s Laws, we get
= (~ (~A)  (~ B))  (A  B)
= (A  ~ B)  (A  B) (i)
which is in DNF

For R.H.S, removing the two implications, we get


(~ (~ A )  B)  (~ B  A)
= (A  B)  (~ B  A)
(which is in CNF, but we require DNF)
Using Left distributivity of  over , we get
= (( A  B)  ( ~ B))  (( A  B)  A)
Using Right distributivity of  over , we get
= (( A  ~ B)  (B  ~ B))  ( ( A  A)  (B  A))
Using B  ~ B = F AA=A
And P  F = P we get
= (A  ~ B)  ( A  (B  A))
= (A  ~ B)  (A) = (A  ~ B)  (A  T) (ii)
= ( A  ~ B)  (A  (B  ~ B))
= (A  ~ B)  (A  ~ B)  (A  B)
Using P  P = P, we get
= (A  ~ B)  (A  B)

(ii) R.H.S Applying associative laws, we get


( ~ A  ~ B)  (A  B)
Using left distributivity of  over  we get
= (( ~ A  ~ B)  A)  ((~ A  ~ B)  B)
40 Again using associativity of  and using ~ A  A = F = ~ B  B we get
R.H. S. = F The Propositional
Consider L.H.S, applying associativity of , we get Logic
= (( A  B)  (~ A  ~ B )),
using left distributivity and commutativity of  we get
= (( A  B)  ~ A)  (( A  B)  ~ B)
Using associativity of  and using A  ~ A = F = B  ~ B
= (B  F)  ( A  F)
Using A  F = F = B  F
=F

Ex. 8: The following table shows that ((A  B)  ~ B)  ~ A is true in every


interpretation. Therefore ((A  B)  ~ B)  ~ A is valid and according to the First
theorem, ~ A is a logical consequence of (A  B) and ~ B.

Truth Table of ((A  B)  ~ B)  ~ A


A B AB ~B (AB)  ~ B ~A (AB)  ~ B)  ~ A
T T T F F F T
T F F T F F T
F T T F F T T
F F T T T T T

Ex. 9: (i) From the following table, ((A  B)  ~ B  A) being False for all
interpretations, is inconsistent.

Truth Table of (A  B)  ~ B  A
A B AB ~B (A  B)  ~ B  A
T T T F F
T F F T F
F T T F F
F F T T F

(ii) Prove the inconsistency of E1  E2  ~ G, i.e., of (A  B)  ~ B  A by


transforming, into a disjunctive normal form:

(A  B)  ~ B  A = (~ A  B)  ( ~ B  A )
= (~ A  ~ B  A)  (B  ~ B  A) (Distributive Law)
= (~ A  A  ~ B)  (F  A)
= False  False = False
Thus (A  B)  ~ B  A is inconsistent.

Ex. 10:
Let us symbolize the statements in the problem state of above as follows:
A: The Parliament refuses to act.
B: The strike is over.
R: The president of the firm resigns.
S: The strike lasts more than one year.

Then the facts and the question to be answered in the problem can be symbolized as:

E1: (A (~ B  (R  S))) represents the statement „If the congress refuses to enact
new laws, then the strike will not be over unless it lasts more than one year and the
president of the firm resigns.’

E2 : A, represents the statement „The congress refuses to act, by and’

41
Introduction to A.I E3: ~ S represent the statement „The strike just starts.’

E4: ~ B (to be concluded)

Ex. 10: We solve the problem by showing that the formula P: ((A  (~ B  (R  S)))
 A  ~ S)  ~ B is valid by two methods: (i) by reducing to CNF/DNF
(ii) by constructing truth-table of the formula.

Methods (i) Removing the two occurrences of „‟ , we get


P = ~ (( ~ A  (~ B  (R  S)))  A  ~ S)  ~ B
Using De Morgan‟s Laws, we get
= (~ ((~ A)  (~ B  (R  S)))  ~ A  ~ ~ S)  ~ B
= (A  ( ~ ~ B  ~ ( R  S)))  ~ A  S)  ~ B
= (A  (B  ~ ( R  S)))  ~ A  S)  ~ B
P = (A  (B  (~ R  ~ S)))  ~ A  S  ~ B ….. (i)

Consider the case R is assigned value F

Then the formula P becomes


(A  (B  (~ F  ~ S)))  (~ A  ~ B  S)
= ((A  B)  T)  (~ (A  B)  S)
= (A  B)  (~ (A  B)  S)
By denoting A  B by H we get P = H  (~ H  S) = T whether (A  B) is T or F

Consider the case when R is assigned T


Then the formula P given by (i) becomes
(A  (B  (~ T  ~ S)  (~ A  ~ B  S) (using De Morgan Laws)
= ((A  B)  ~ S)  (~ (A  B)  S)
= (( A  B)  ~ S)  (~ (A  B  ~ S))
Denoting (A  B  ~ S) by K we get
P=K~K=T
Hence P is valid. Hence, the proof.

Method (ii)
The solution of the problem lies in showing that ~ B logical follows from E 1, E2, and
E3. This is equivalent to showing that P: ((A  (~B  (R  S )))  A  ~ S)  ~ B is
a valid formula. The truth values of the above formula under all the interpretations are
shown in given table

A B R S ~B ~ B  (R  S)
T T T T F T
T T T F F F
T T F T F F
T T F F F F
T F T T T T
T F T F T T
T F F T T T
T F F F T T
F T T T F T
F T T F F F
F T F T F F
F T F F F F
F F T T T T
F F T F T T
F F F T T T
F F F F T T

42
A B R S E1 E2 E3 ~B ~ B  (R  E1 (E1  E2  E3) The Propositional
S) ~B Logic
T T T T T T F F T T T
T T T F F T T F F F T
T T F T F T F F F F T
T T F F F T T F F F T
T F T T T T F T T T T
T F T F T T T T T T T
T F F T T T F T T T T
T F F F T T T T T T T
F T T T T F F F T T T
F T T F T F T F F T T
F T F T T F F F F T T
F T F F T F T F F T T
F F T T T F F T T T T
F F T F T F T T T T T
F F F T T F F T T T T
F F F F T F T T T T T

Under all interpretations formula is True. Hence, the formula P a valid formula. ~ B is
a logical consequence of E1, E2 and E3. Hence, the “The strike will not be over” is a
valid conclusion.

2.14 FURTHER READINGS


(In the order from elementary to advanced)
1. McKay, Thomas J., Modern Formal Logic (Macmillan Publishing Company,
1989).
2. Gensler, Harry J. Symbolic Logic: Classical and Advanced Systems (Prentice
Hall, 1990).
3. Klenk, Virginia Understanding Symbolic Logic (Prentice Hall 1983)
4. Copi Irving M. & Cohen Carl, Introduction to Logic, IX edition, (Prentice Hall of
India, 2001).
5. Carroll, Lewis, Symbolic Logic & Game of Logic (Dover Publication, 1955).
6. Wells, D.G., Recreations in Logic (Dover Publications, 1979).
7. Suppes Patrick, Introduction to Logic (Affiliated East-West Press, 1957).
8. Getmanova, Alexandra, Logic (Progressive Publishers, Moscow, 1989).
9. Crossely, J.N. et al What is Mathematical Logic? (Dover Publications, 1972).
10. Mendelson, Elliott: Introduction to Mathematical Logic (Second Edition) (D.Van
Nostrand Company, 1979).

43

Вам также может понравиться