91
1.1. Introduction Today computers are used in almost all fields of human life. The programs prepared for a specific purpose are always logic based wherever the decision-making is involved. Keeping this in view we present some elementary aspects of logic related to the computer and information sciences. 1.2. Proposition and Logical Operations Sentences and Statements. We express our notions with the help of sentences. In mathematics or computer science we are not concerned with ambiguous sentences. The sentences which can be judged to be either true or false but not both are called statements. Definition. A sentence which can be judged as true or false but not both is called a statement. For example, the following are statements. 1. New Delhi is the capital of India. 2. 8 is greater than 100. In example 1 given above the sentence is judged to be true while in 2 it is false. Let us consider some more examples : 1. The lier says, "I always tell a lie." 2. Girls are pretty. 3. How are you ? 4. May God bless you ? In all the above examples sentences are not judged to be either true or false, as they do not declare the truth or falsehood. Thus these are not the statements. A statement is represented by a single letter called a statement letter. Generally p, q, r etc. are the letters which are used for the purpose. For example, if p is statement "New Delhi is the capital of India" then mathematically it means p = New Delhi is the capital of India.

1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

  • Upload
    voduong

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

1.1. Introduction

Today computers are used in almost all fields of human life. The programs prepared for a specific purpose are always logic based wherever the decision-making is involved. Keeping this in view we present some elementary aspects of logic related to the computer and information sciences.

1.2. Proposition and Logical OperationsSentences and Statements. We express our notions with the help of sentences. In mathematics or computer science we are not concerned with ambiguous sentences. The sentences which can be judged to be either true or false but not both are called statements.

Definition.A sentence which can be judged as true or false but not both is called a statement. For example, the following are statements.

1. New Delhi is the capital of India.2. 8 is greater than 100.

In example 1 given above the sentence is judged to be true while in 2 it is false.

Let us consider some more examples :1. The lier says, "I always tell a lie."2. Girls are pretty.3. How are you ?4. May God bless you ?

In all the above examples sentences are not judged to be either true or false, as they do not declare the truth or falsehood. Thus these are not the statements.

A statement is represented by a single letter called a statement letter. Generally p, q, r etc. are the letters which are used for the purpose. For example, if p is statement "New Delhi is the capital of India" then mathematically it means

p = New Delhi is the capital of India.

Aristotle established the following laws to keep the mathematical statements beyond any ambiguity.

1. Law of identity. According to this law any symbol used carries the same meaning in a reference from beginning to the end.

2. Law of the excluded middle. As per this law any statement should be true or false.

3. Law of non-contradiction. Any statement should not have likelihood of being true and false both together as per this law.

Page 2: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Compound Statements. A statement which is combination of two or more simple statements is called compound or composite statement. Logical combination 'and', 'or', 'not', 'if… then…', 'if and only if' are used to combine simple statements. These logical connectives are symbolically expressed as given in the following table.Table 1.1: Logical connectives and symbols used for the same 

  Open table as spreadsheet

Logical connectives Symbolsor ∨ called joinand ∧ called meetif… then… ⇒ read as impliesif and only if (iff) ⇔ read as implies and is implied bynot ~ read as negation

Kinds of Statements :1. Simple statement. A statement made up without any connective is said to be a

simple statement. For example following are the simple statements.I. This is my copy (Truth is expressed)

II. Mangoes can be had from a babul tree (Falsehood is expressed).2. Molecular statement. The statement made up by using a logical connective is

said to be molecular statement. For example following are the molecular statements :

i. Rajeev worked hard and (ii), Rajeev got success in the examination.

By using logical connective 'and' both the above simple statements are the component statements of the molecular statement.

Similarly the component statements of the molecular statement 'Dheeraj will read or he will play' are

ii. Dheeraj will readiii. He will play.

Here logical connective 'or' is used to have the molecular statement for the above two simple statements.

1.3. Truth FunctionAs already stated any statement is either true or false and therefore it has its unique truth-value T or F where T is the first letter of the word Truth and F is the first letter of the word False. The truth-value of the compound statements is defined on the basis of truth-value of its component statements. Thus the truth-value of any statement form is the function of the truth-values of its component statements whose range is {T, F}.

Truth Table. The meaning of different connectives and their usage can be well understood from the analysis of truth-values of the component statements. The truth-

Page 3: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

value in a compound statement depends only on the truth values of the statements being combined and on the types of connectives being used. The truth table are used to perform the analysis in a precise and well organised manner.

Elementary Operation of Logic. The methods of forming a compound statement from simple statements by using logical connectives are called elementary operations of logic. These are five in number on the basis of logical connectives.

1.4. Use of Logical Connectives

Statements can be combined or altered with the help of logical connectives. These connectives are expressed with the help of symbols in mathematical logic. More important of them are the following connectives :

I. Negation (~). The negation of a statement is formed by the use of word 'not'. Mathematically if p is a statement, then negation or denial of p is denoted by ~ p. For example if p stands for "New Delhi is the capital of India'. Then ~ p means "New Delhi is not the capital of India." The statement ~ p is true if p is false ; it is false if p is true. Symbolically the true or false statements are expressed with the help of tables known as truth tables. Following is the truth table for ~ p corresponding to the truth values of p.

 Open table as spreadsheet

p ~ pT FF T

II. Conjunction (∧). Any two statements p and q may be combined by the connective 'and' to form a new statement. This statement is known as the conjunction of the statements p and q and is p ∧ q where the symbol '∧' stands for 'and'. For example, if p denotes the statement 'I shall purchase a book' and q denotes the statement 'I shall purchase a pencil', then p ∧ q denotes "I shall purchase a book and a pencil".

The compound statement p ∧ q is true if and only if both the statements p and q are true and is false in every other case. The truth table for p ∧ q is as given below :

 Open table as spreadsheet

p q p ∧ qT T TF T FT F FF F F

Page 4: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

III. Disjunction (∨). Any two statements p and q may be combined by the connective 'or' to form a new statement known as disjunction of p and q and is denoted by p ∨ q. [The symbol ∨stands for 'or']. For example, if p stands for 'I shall purchase a book' and q stands for 'I shall purchase a pencil' then p ∨ q = I shall purchase a book or a pencil.

The statement p ∨ q is true if either p is true or q is true or both p and q are true and it is false if both p and q are false. The truth values of p ∨ q are shown in the following truth table.

 Open table as spreadsheet

p q p ∨ qT T TF T TT F TF F F

IV. Conditional (⇒). If p and q are statements then a statement of the form 'if p then q' is called conditional statement and is denoted by p ⇒ q. p ⇒ q is read as either

i. p implies q orii. p sufficient for q oriii. p only if q oriv. q is necessary for p.

Now let us consider the following example :

A father declared, 'If may son stands first, I shall buy a watch for him.' The part 'If my son stands first' is called the antecedent and 'I shall buy a watch for him' is called the consequent in the above conditional statement. If we denote antecedent by p and the consequent by q then conditional, is expressed by writing p ⇒ q. Now there are four possibilities, namely

v. The son stands first and his father buys a watch for him.vi. The son does not stand first and the father buys him a watch.vii. The son stands first but the father does not buy a watch for him.viii. The son does not stand first and the father does not buy him a watch.

It is clear that in all the four cases the father breaks his promise only in case (iii). Therefore, it is the case when the conditional is false. In all other cases it is true. Thus, if p is true and q is false then p ⇒ q is false otherwise it is true in all other cases. The truth table of p ⇒ q is given as follows :

 Open table as spreadsheet

p q p ⇒ qT T T

Page 5: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q p ⇒ qF T TT F FF F T

V. Biconditional (⇔). The statement of the type 'p if and only if q' or, simply, 'p iff q' is called a biconditional statement and is denoted by p ⇔ q. In the example given for conditional had the father promised "I shall buy a watch for my son if and only if he stands first", he would surely have meant that he would not buy a watch if his son would go against his promise and will make the condition a false statement. Thus the statement p ⇔ q is true if p and q have the same truth values and is false if they have the opposite truth values. The truth table for p ⇔ q is as given below :

 Open table as spreadsheet

P q p ⇔ qT T TF T FT F FF F T

1.5. Statement Construction or Statement FormThe compound statement made up by using logical connectives in finite number, is called a statement form or statement construction.

Suppose p, q and r are three simple statements then '(p ∧ q) ⇒ r' is a statement form which means that : 'p and q implies r'. The final connective in a statement construction is said to be the Principal connective. For example in above statement form the logical connective '⇒' used after p ∧ q is principal connective.

The statements on both sides of the principal connective are said to be Arguments. In above example (p ∧ q) and r are arguments of the principal connective '⇒'.

Note If we consider the statement form p ∧ (q ⇒ r) then the principal connective is '∧' and its arguments are p and (q ⇒ r).

Remark In a compound statement it is not necessary that its component statements be related to each other. The fact is that for a compound statement (rather any statement) its being true or false is essential. This indicates that there should be some relation (direct and indirect) between the component statements. In other words there should be some relation between component statements as then only we can call a statement construction as a statement. For example if

p = Jeevesh is playing q = The river Ganga comes from Himalaya,

Page 6: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

then p ∨ q = Jeevesh is playing or the river Ganga comes from Himalaya, is a compound statement but it is not a statement as it does not give any logical meaning for the want of relationship between two component statements.

Use of Brackets : In the compound statement in which finite number of connectives are used, the use of brackets is very important as the use of brackets changes the meaning of the statement. For example, consider the following representation.

i. (p ∨ q) ∧ r,ii. p ∨ (q ∧ r)

In these cases the first form is of conjunction while the other one is disjunction and therefore, they carry different meanings. Hence a rule for removing the brackets is established so that the meaning of the statement may not change on removing the brackets. For this purpose different rules are provided to different connectives as per table given below.

  Open table as spreadsheet

Connectives Order~ 1∧ 2∨ 3⇒ 4⇔ 5

Rule 1.

For the negation or repetition of negation, the bracket is not needed. For example ~ p carries the same meaning as (~ p) and ~ ~ p carries the same meaning as ~ (~ p) or (~ (~ p)).

Rule 2.

If the connectives used are of the same order then the brackets should be used from left so that the meaning is not changed. For example,

p ∧ q ∧ r ∧ s = ((p ∧ q) ∧ r) ∧ sRule 3.

If two connectives used are of the same order, then bracket should be removed for lower order connective. The bracket of higher order connective cannot be removed. For example

1. p ⇒ (q ∧ r) ≠ p ⇒ q ∧ r2. p ∧ (q ⇒ ~ r) ≠ p ∧ (q ⇒ r)

Here the order of connective '⇒' is higher than that of '∧'. Hence we cannot remove the bracket in this case. It is clear that

o p ∧ (q ⇒ r) ≠ p ∧ q ⇒ r3. (p ∨ q ⇔ r) ⇒ ~ q ∧ r = (( p ∨ q) ⇔ r) ⇒ (~ q ∧ r)

Page 7: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Here '⇒' is principle connective.4. ((p ∨ q) ⇒ ~ r) ∨ (~ q ∧ r) = ( p ∨ q ⇒ ~ r) ∨ (~ q ∧ r)

Here '∨' is principal connective. Since the order of connective on left is higher than that on right, therefore, bracket in (~ q ∧ r) may be removed.

Similarly the order of connective '∨' used on left is lower than the order of '⇒' and therefore bracket from (p ∨ q) has been removed. But in ( p ∨ q ⇒ ~ r) the bracket cannot be removed as the order of principal connective '⇒' is higher than the order of connective '∧'

5. (p ∧ (~ (~ q))) ⇔ ( q ⇒ ( r ∧ q)) = p ∧ ~ ~ q ⇔ (q ⇒ r ∧ q)

Illustrative Examples

Example 1.If p ≡ Dharmveer is a Doctor

q ≡ Jeevesh is an intelligent boy,

then write the following symbolically given statements in sentences.i. p ∧ rii. ~ p ∨ qiii. p ∨ ~ qiv. ~ p ∨ ~ qv. ~ (p ∧ q)vi. ~ p ⇔ qvii. p ⇒ ~ q

Solution.i. Dharamveer is a doctor and Jeevesh is an intelligent boy.ii. Dharmveer is not a doctor and Jeevesh is an intelligent boy.iii. Dharmveer is a doctor and Jeevesh is not an intelligent boy.iv. Dharmveer is not a doctor and Jeevesh is not an intelligent boy.v. This is not true that Dhramveer is a doctor and Jeevesh is an intelligent boy.vi. Dharmveer is not a doctor if and only if Jeevesh is intelligent boy.vii. If Dharmveer is a doctor then Jeevesh is not an intelligent boy.

Example 2.Express the following statements in symbolic forms :

i. Rajeev is an MCA student and he is a good player.ii. If he is diligent then he will be successful in the examination.iii. The ∆ABC is right angled at B if and only if AB2 + BC2 = AC2

iv. He will go to the college or will stay at home and will read.v. Though it is eight in the night but train is not late.vi. If Yachana does not complete her work well then even if she is niece of the

Director, she will lose her job.

Solution.

Page 8: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

i.

Let p ≡ Rajeev is an MCA studentq ≡ Rajeev is a good player

ii. then the required expression in symbolic form is p ∧ qiii.

Let p ≡ He is diligentq ≡ He will be successful in the examination

iv. then the required representation iso p ⇒ q

v.

Let p ≡ ∆ABC is right angled at Bq ≡ AB2 + BC2 = AC2

vi. then the required symbolic representation is p ⇒ qvii.

Let p ≡ He will go to the collegeq ≡ He will stay at homer ≡ He will read

viii. then the required representation is p ∨ (p ∧ r)ix.

Let p ≡ It is eight in the nightq ≡ The train is late

x. then the symbolic representation of the given statement iso p ∧ ~ q

xi.

Let p ≡ Yachana completes her work wellq ≡ She is niece of the directorr ≡ She will lose her job

xii. then the required symbolic representation is ~ p ∧ q ⇒ r

Exercise 1(A):

1.  Are the following sentences statements ?a. A parallelogram is a plane figureb. Shobhana is not ill

Page 9: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

c. Ganga is the name of an Indian mountaind. Sun is blacke. If Krishna failsf. Come immediatelyg. x + y ≥ 5h. {x : x2 = 4} = {2, - 2}i. 2x + 3y = 5j. Had he been the President of the committee.

2.  Write the following in the symbolic form :a. If the team does not reach or the weather is bad then there will be no

matchb. Neither he earns nor he allows his friend to workc. If you stand first you will get gold-medald. The necessary and sufficient condition for rains is that there should be

clouds in the sky.3.  Remove the brackets in the followings symbolic statements such that the

meaning is not changed.a. [(p ∧ q) ⇒ (~ r)] ∨ [(~ q ∧ r) ∧ q)]b. [p ∧ ~ (~ q)] ⇔ [q ⇒ (r ∨ q)]c. [p = (q ∨ r)] ⇔ [(~ p) ∧ q]

4.  If p ≡ It is two O'clock now, q ≡ Bus is late, then write down the statements represented by the following :

a. q ∨ ~ pb. p ∧ qc. p ∧ ~ qd. ~ (p ∧ q)e. ~ p ∧ ~ qf. ~ p ⇒ q

5.  Express the following in the symbolic forma. I can not read if I am tired or hungryb. One can go from Kalka to Shimla by train or if the weather is good, then

by Busc. To get the scholarship the necessary and sufficient condition is that the

student gets good marks.

Answers

1.  a. yesb. yesc. yesd. yese. Nof. Nog. yesh. yesi. yes

Page 10: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

j. No.2. 

3. 

4. 

5. 

1.6. Logically Equivalent StatementsTwo statements are said to be 'logically equivalent' if both have the identical truth values i.e., in each row of the truth table both statements must have same truth values. Logically equivalent statements are expressed by writing the symbol ≡ in between or sometimes by writing = if there is no confusion.

1.7. Tautology and Contradiction

Prime statement. A statement is said to be a prime statement if it does not contain any connectives.

Tautology. A statement is said to be tautology if its truth value is T irrespective of truth or falsity of its prime statements. A tautology is generally denoted by t.

Contradiction. A statement is said to be a contradiction if its truth value is F irrespective of the truth or falsity of its prime statement. A contradiction is generally denoted by f.

Remark It is obvious from above definitions that if a statement is a contradiction then its negation is a tautology and vice-versa.

The number of truth functions. There are four rows in the truth table of compound statement having two distinct component statements because any component statement may be either true (T) or false (F). Any truth value of a component can be chosen with any truth value of the other component. Then there are 2 × 2 = 22 = 4 rows. If there are three component statements then there shall be 2 × 2 × 2 = 23 = 8 rows in a truth table. In general, in the truth table of compound statements having n components, there should be 2n rows.

Illustrative Examples

Example 1.Prove that p ∨ ~ p is a tautology.

Solution. From the property of disjunction we know that the truth value of p ∨ ~ p is T as p and ~ p have opposite truth values. Hence p ∨ ~ p is a tautology.

Page 11: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Example 2.'If Ram is honest then he is rich or he is not rich,' Prove that this statement is a tautology.

Solution.Let, p ≡ Ram is honest

q ≡ Ram is rich

then the given statement is written symbolically as p ⇒ (q∨ ~ q)

The truth table for this is as follows :  Open table as spreadsheet

p q ~ q (q ∨ ~ q) p ⇒ (q ∨ ~ q)T T F T TT F T T TF T F T TF F T T T

Thus we see that for all possible truth values of component statements the compound statement 'p ⇒ (q∨ ~ q)' has always the truth value T. Hence it is a tautology.

Example 3.Prove that the statement ~ (p ∨ q) ⇔ (~ p∧ ~ q) is a tautology.

Solution. Let us prepare the following truth table  Open table as spreadsheet

p q p ∨ q ~ p ~ q ~ (p ∨ q)

(~ p ∧ ~ q) ~ (p ∨ q) ⇒ (~ p ∧ ~ q)

T T T F F F F TT F T F T F F TF T T T F F F TF F F T T T T T

The table shows that the given statement is a tautology because it has its value T for all its entries in the truth table.

Example 4.Prove that the statement (p ∨ q) ∧ (~ p∧ ~ q) is a contradiction.

Solution. The truth table of the given statement is as given below :  Open table as spreadsheet

Page 12: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q p ∨ q ~ p ~ q (~ p ∧ ~ q) (p ∨ q) ∧ (~ p ∧ ~ q)T T T F F F FT F T F T F FF T T T F F FF F F T T T F

The table shows that the given statement has its value F for all entries in the truth table. Hence it is a contradiction.

Example 5.Prove that p ⇒ q is equivalent to ~ p ∨ q, where p and q are statements.

Solution. We prepare the following truth table:  Open table as spreadsheet

p q p ⇒ q ~ p (~ p ∨ q)T T T F TT F F F FF T T T TF F T T T

In the above table columns 3 and 5 are identical, hence the two statements are equivalent.

1.8. Some Properties of Logical EquivalenceSuppose p, q, r, … are simple statements and P and Q are compound statements made up with the help of these statements then we write P (p, q, r, …) and Q (p, q, r, …) for P and Q respectively. If P and Q are logical equivalent then we write

i. If P(p, q, r, …) ≡ Q(p, q, r, …), then Q(p, q, r, …) ≡ P(p, q, r, …)ii. If P(p, q, r, …) ≡ Q(p, q, r, …), and Q(p, q, r, …) ≡ R(p, q, r, …), then P(p, q,

r, …) ≡ R(p, q, r, …)iii. If P(p, q, r, …) ≡ Q(p, q, r, …), then P(P1, P2, …) ≡ Q(P1, P2, …)

where P1, P2, … are other compound statements.

Thus if some other logical statements are substituted in place of logical equivalent variable, then the resulting logical statements continue to have logical equivalence.

1.9. Algebra of PropositionsBelow we give the important laws of algebra of propositions.

Page 13: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

1. Idempotent law. We know that in ordinary arithmetic 1 × 1 = 1 and 0 + 0 = 0 and hence 1 and 0 are called idempotent for multiplication and addition respectively. Likewise in mathematical logic any statement follows idempotent law i.e.,

i. p ∨ p andii. p ∧ p = p

2. Commutative law. Conjunction and disjunction obey commutative law. Thus we have

i. p ∨ q = q ∨ pii. p ∧ q = q ∧ p

3. Associative law. Conjunction and disjunction obey associative law i.e.,i. (p ∨ q) ∨ r = p ∨ (q ∨ r) andii. (p ∧ q) ∧ r = p ∧ (q ∧ r)

4. Distributive law. Conjunction is distributive over disjunction and vice-versa i.e.,i. p ∨ (q ∧ r) = (p ∨ q) ∧ (p ∨ r)ii. p ∧ (q ∨ r) = (p ∧ q) ∨ (p ∧ r)

5. Identity elements. Tautology (t) and contradiction (f) are the identity elements for conjunction and disjunction respectively. Thus

i. p ∧ t = p andii. p ∨ f = p

It is also obvious that p ∨ t = t and p ∧ f = f.6. Complement laws. There are complements in logic performing the function of

inverse in algebra. Negation of a statement follows the complement laws as given below :

i. p ∨ ~ p = tii. p ∧ ~ p = fiii. ~ t = fiv. ~ f = tv. ~ (~ p) = p

7. De Morgan's law. If p and q are two statements then the De Morgan's laws arei. ~ (p ∨ q) = ~ p ∧ ~ qii. ~ (p ∧ q) = ~ p ∨ ~ q.

1.10. ArgumentsAn argument is a statement asserting that as a result of a given set of propositions named as assumptions or premises there comes out another proposition q called the conclusion. Symbolically propositions are denoted by p1, p2,……, pn and argument is denoted by

p1, p2,……, pn ⊢ q

The symbol ⊢ is called a turnsile.

Note An argument with assumptions (or premises) p1, p2,……, pn and conclusion q is said to be valid iff the proposition

p1, ∧ p2, ∧ … ∧ pn ⇒ q

Page 14: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

is a tautology.

Illustrative Examples

Example 1.Test the validity of the argument, 'If my brother stands first in the class, I give him a watch. Either he stood first or I was out of station. I did not give my brother a watch this time. Therefore, I was out of station.'

Solution.Let p ≡ My brother stands first in the class

q ≡ I give him a watchr ≡ I was out of station

Here the assumptions (or premises) are p ⇒ q, p ∨ r, ~ q and the conclusion is r.

Assuming r to be false, let us examine the truth values of the three assumptions of the argument. Here was can give any values to p and q so the truth table is as given below :

  Open table as spreadsheet

p q r p ⇒ q p ∨ r ~ qT T F T T FT F F F T TF T F T F FF F F T F T

It is clear from the last three columns that in each row at least one of the assumptions is false, hence the argument is valid.

Example 2.Simplify the following

i. (p ∨ q) ∧ ~ pii. p ∨ (p ∧ q)iii. ~ (p ∨ q) ∨ (~ p ∧ q)Solution. (i)

(p ∨ q) ∧ ~ p ≡ ~ p ∧ (p ∨ q) (by commutative law)

    ≡ (~ p ∧ p) ∨ (~ p ∧ q)

(by distributive law)

    ≡ f ∨ (~ p ∧ q) (by complement law)

    ≡ (~ p ∧ q) (by identity law)

    ≡ ~ p ∧ q  

(ii) p ∨ (p ∧ q) ≡ (p ∧ t) ∨ (p ∧ q) [∵ p ∧ t ≡ p]

Page 15: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

    ≡ p ∧ (t ∨ q) [∵ p ∧ (t ∨ q) ≡ (p ∧ t) ∨ (p ∧ q)]

    ≡ p ∧ t [∵ t ∨ q ≡ t]

    ≡ p  

(iii) ~ (p ∨ q) ∨ (~ p 

∧ q)

≡ (~ p ∧ ~ q) ∨ (~ p ∧ q)

(by De Morgan's law)

    ≡ ~ p ∧ (~ q ∨ q) (by Distributive law)

    ≡ ~ p ∧ t [∵ ~ q ∨ q ≡ t]

    ≡ ~ p [∵ ~ p ∧ t ≡ ~ p]

Example 3.Find the number of different non-equivalent logical statements.

a. In two variables p and qb. In three variables p, q, and rc. In n variables p1, p2,…, pn.

Solution.a. In the truth table of P (p, q) there are 22 = 4 rows. There shall be T or F in each

row. Therefore there are (22)2 = 24 = 16 different non equivalent statements P(p, q).

b. There shall be 23 = 8 rows in the truth table of the statement P (p, q, r). There shall be T or F in each row, hence there are (23)2 = 26 = 64 different non-equivalent statements P(p, q, r).

c. Similarly there shall be 22n different non-equivalent statements P(p1, p2,…, pn) for n variables.

Example 4.Using the symbols ∧ and ~ in place of A and N, rewrite the following statements:

i. AApqr, Apq = p ∧ q and Np = ~ pii. ApAqr,iii. ANApAqpAANqrp.Solution. (i) AApqr = A(p ∧ q)r = (p ∧ q) ∧ r(ii) ApAqr = Ap(q ∧ r) = p ∧ (q ∧ r)(iii) ANApAqpAANqrp = ANApAqpAA (~ q)rp

    = ANApAqpA (~ q ∧ r)p

    = ANApAqp [(~ q ∧ r) ∧ p]

    = ANAp (q ∧ p) [(~ q ∧ r) ∧ p]

Page 16: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

    = AN [p ∧ (q ∧ p)] [(~ q ∧ r) ∧ p]

    = ~ [p ∧ (q ∧ p)] ∧ [(~ q ∧ r) ∧ p]

         

Example 5.If Apq implies p ∧ q and Np implies ~ p, then rewrite the following replacing ∧ and ~ by A and N respectively.

i. p ∧ ~ qii. ~ (p ∧ ~ q) ∧ (~ q ∧ ~ r)

Solution.i. p ∧ ~ q = p ∧ Nq = ApNqii. ~ (p ∧ ~ q) ∧ (~ q ∧ ~ r)

o = ~ (ApNq) ∧ (ANqNr)o = (NApNq) ∧ (ANqNr)o = ANApNqANqNr

Exercise 1(B):

1.  Construct the truth tables for the following :a. ~ p ∧ qb. ~ p ∧ ~ qc. (p ∧ q) ⇒ (p ∨ q)d. ~ (p ∧ q) ∨ ~ (q ⇔ p)

2.  Use the truth table to show thata. ~ (p ∨ q) = ~ p ∧ ~ qb. p ⇒ q = (~ q ⇒ ~ p)

3.  Find the whether the following statements are tautology or contradiction:a. p ∧ ⇒ pb. (p ∧ q) ∧ ~ (p ∨ q)c. (p ∧ q) ∧ ~ (p ∧ q)d. p ∨ ~ (p ∧ q)

4.  Test the validity of the following argument :"If it is a good scooter, then it is Kinetic Honda. It is Kinetic Honda, therefore, it is a good scooter"

5.  Make the truth table for the following statementsa. ~ (~ p ⇔ q)b. (p ∧ ~ q) ⇒ (~ p ∨ q)c. [p ∧ (~ q ⇒ p)] ∧ ~ [( p ⇔ ~ q) ⇒ (q ∨ ~ p)]

6.  Prove thata. p ⇒ ~ q ≡ q ⇒ ~ pb. [(p ⇒ q) ⇒ r] ≡ [(p ∧ ~ r) ⇒ ~ q]

7.  Find whether the following statements are tautology or contradiction:a. p ∨ q ⇒ p

Page 17: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

b. q ⇒ (p ⇒ q)8.  If Apq = p ∧ q and Np = ~ p, then rewrite the following statements

replacing ∧ and ~ by A and N respectively.a. (~ p ∧ q) ∧ ~ (~ p ∧ ~ q)b. (~ p ∧ ~ q) ∧ ~ [(p ∧ q) ∧ (~ q ∧ p)]

9.  Using the symbols ∧ and ~ in place of A and N rewrite the following statements:

a. ANApqNpb. AApNrAqNpc. ANANpNAqNrApNAqNr.

Answers

1. 

2. 

3.  a. Tautologyb. Contradictionc. Contradictiond. Tautology

4.  Invalid.5. 

6. 

7. 

8. 

9. 

1.11. Duality LawWe now consider formula which contains the connectives ∧, ∨ and ~. There is no loss of generality if we restrict the consideration to these connectives only since we shall see later that any formula containing any other connective can be replaced by an equivalent formula containing only these three connectives. Two formulae, F and F*, are said to be duals of each other if either one can be obtained from the other by replacing ∧ by ∨ and ∨ by ∧. The connectives ∧ and ∨ are also called duals of each other. If the formula F contains the specials variables T or F, then F*, its dual, is obtained by replacing T by F and F by T in addition to the abovementioned interchanges.

Page 18: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Illustrative Example

Example.Write the duals of

a. (P ∨ Q) ∧ R ;b. (P ∧ Q) ∨ T ;c. ~ (P ∨ Q) ∧ (P ∨ ~ (Q ∨ ~ S)).

Solution. The duals are :a. (P ∧ Q) ∨ R,b. (P ∨ Q) ∧ F,c. ~ (P ∧ Q) ∨ (P ∧ ~ (Q ∧ ~ S)).

The following theorem shows the equivalence of a formula and one that is obtained from its dual.

Theorem 1.Let F and F* be dual formulae and P1, P2,……, Pn be all the atomic variables that occur in F and F* i.e., we may write F as F (P1, P2,……, Pn) and F* as F* (P1, P2,……, Pn). Then by the use of De Morgan's laws

P ∧ Q ⇔ ~ (~ P ∨ ~ Q), P ∨ Q ⇔ ~ (~ P ∧ ~ Q),

we can show(1) 

Thus the negation of a formula is equivalent to its dual in which every variable is replaced by its negation. Consequently, we also have(2) 

Example.Verify equivalence (1) given above if F (P, Q, R) is ~ P ∧ ~ (Q ∨ R).

Solution. Here F* (P, Q, R) is ~ P ∨ ~ (Q ∧ R), and F* (~ P, ~ Q, ~ R) is ~ ~ P ∨ ~ (~ Q ∧ ~ R) ⇔ P ∨ (Q ∨ R).

Also ~ F (P, Q, R) is ~ (~ P ∧ ~ (~ Q ~ R) ⇔ P ∨ (Q ∨ R).

Hence the result.

We shall now prove an intersection theorem which states that if any two formulae are equivalent, then their duals are also equivalent with each other. In other words, if A ⇔ B, then A* ⇔ B*.

Page 19: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Theorem 2.Let P1, P2,……, Pn be all the atomic variables appearing in the formulae A and B. Given that A ⇔ B means "A ↔ B is a tautology". Then the following are also tautologies.

A (P1, P2,……, Pn) ↔ B (P1, P2,……, Pn) A (~ P1, ~ P2,……, ~ Pn) ↔ B (~ P1, ~ P2,……, ~ Pn)

Using (2) we get ~ A* (P1, ~ P2,……, ~ Pn) ↔ ~ B* (P1, P2,……, Pn)

Hence A* ⇔ B*. Thus we have for every pair of equivalent formulae an equivalent pair of formulae consisting of duals of the first pair.

Example.Show that

a. ~ (P ∧ Q) → (~ P ∨ Q) ⇔ (~ P ∨ Q)b. (P ∨ Q) ∧ (~ P ∧ (~ P ∧ Q)) ⇔ (~ P ∧ Q)

Solution.a. ~ (P ∧ Q) → (~ P ∨ (~ P ∨ Q))

⇔ (~ P ∧ Q) ∨ (~ P ∨ (~ P ∨ Q))⇔ (P ∧ Q) ∨ (~ P ∨ Q)⇔ (P ∧ Q) ∨ ~ P ∨ Q⇔ (P ∨ ~ P) ∧ (Q ∨ ~ P) ∨ Q⇔ (Q ∨ ~ P) ∨ Q ⇔ (Q ∨ ~ P) ⇔ ~ P ∨ Q

Writing the duals, we obtain by above theorem that (P ∨ Q) ∧ (~ P ∧ (~ P ∧ Q)) ⇔ ~ P ∧ Q

Exercise 1(C):

1.  If p ≡ He is rich, q ≡ He is happy, then write the following in the Statement forms :

a. p ∨ qb. q ⇒ pc. q ⇔ ~ pd. ~ ~ pe. p ∧ qf. ~ p ⇒ qg. (~ p ∧ q) = p

2.  Write the truth value of the following statementsa. 5 < 3 then - 3 < - 5.b. "It is not right that Shyam is intelligent and dishonest".c. "He is poor and sad".d. "It is not right that 3 + 3 = 6 or 4 + 5 = 9. "e. Shyam is poor and sad.

3.  In the following which are the statements ?

Page 20: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

a. Sun is a planet.b. This assertion is wrong.c. A lier says that he tells a lie always.d. The sun revolves around the earth.e. Bring that pen.f. 5 > 7.g. India is a democratic country.h. All roses are red.i. x2 + 3x = 5.j. Oh God ! help me.

4.  Fill up in the blanks with suitable connectives :i. The …… condition that ABCD is a square is that it is a rectangle.ii. The …… condition for a + b to be even, is that a is odd and b is odd.iii. The …… condition for ab to be odd, is that a is odd and b is odd.iv. The …… condition for x2 = 9 is that x = 3.

Choose the correct answers in the following :5.  If p and q are two statements then conditional contrapositive opposite

to p ⇒ q isi. q ⇒ pii. ~ q ⇒ ~ piii. ~ q ⇒ qiv. ~ p ⇒ ~ q

6.  If p and q are two statements then p ⇒ q will be false if :i. p is false and q is false,ii. p is false and q is true,iii. p is true and q is false,iv. p is false or q is false.

7.  If p is true and q is false the p ∨ q will be :a. True,b. False,c. Neither true nor falsed. None of these.

8.  Which is the logical statement in the following :a. Come here immediatelyb. x = y ≥ 7c. 2x + 3y = 9d. {x : x2 = 9} = {3, - 3}

9.  p ⇔ (~ p) isa. contradictionb. Tautologyc. Universald. logical equivalence.

10.  Condition is represented bya. ∧,b. ∨,

Page 21: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

c. ⇒d. ⇔

11.  A symbolic form of "Ramesh is a player and Mohan is not an intelligent boy" is ;

a. p ∧ ~ q,b. ~ p ∧ q,c. ~ p ⇒ q,d. p ⇔ ~ q

12.  The contrapositive of inverse of ~ p ⇒ q isa. q ⇒ ~ p,b. p ⇒ - p,c. - q ⇒ p,d. - p ⇒ - q.

13.  Which is the correct statement in the followinga. ~ (p ⇒ q) ≡ ~ p ⇒ - q,b. ~ (p ⇒ q) ≡ p Λ - q,c. ~ (p ⇒ q) ≡ p ⇒ - q,d. ~ (p ⇒ q) ≡ - p ⇒ q.

Answers

1.  a. He is rich or he is happyb. If he is happy than he is richc. He is happy if and only if he is not richd. He is riche. He is happy and richf. If he is not rich than he is happyg. He is not rich and is happy means he is rich

2. 

3.  a. yesb. yesc. Nod. yese. Nof. yesg. yesh. yesi. yesj. No.

4.  i. necessaryii. sufficientiii. sufficientiv. sufficient

5. 

Page 22: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

6. 

7. 

8. 

9. 

10. 

11. 

12. 

13. 

13.1 Basic Logic Operations

The following are the main logic operations in this chapter :i. p ∧ q, called as "conjunction of p and q" and read as "p and q".ii. p ∨ q, called as "disjunction of p and q" and read as "p or q".iii. ~ p, called as "negation of p" and read as "not p".iv. T, read as "True"v. F, read as "False".

13.2 StatementA statement is any collection of symbols or sounds which is either true or false, but not both. The truth or falsity of a statement is called its truth value.

For e.g., consider the followinga. Delhi is in Franceb. Where are you going ?c. 2 + 3 = 5

The expression (a) is a statement and it is a false statement.

The expression (b) is not a statement since it is neither true nor false.

The expression (c) is a true statement

13.3. Proposition(P.T.U., M.C.A. May 2007)

A proposition is a statement which is either true or false. It is a declarative sentence.

Page 23: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

For example : The following statements are all propositions :i. Jawahar Lal Nehru is the first prime minister of India.ii. It rained yesterday.iii. If x is an integer, then x2 is a + ve integer.

For example : The following statements are not propositions :i. Please report at 11 a.m. sharpii. What is your name ?iii. x2 = 13.

13.4. Propositional Variables

The lower case letters starting from p onwards are used to represent propositions e.g., p : India is in Asia q : 2 + 2 = 4.

Example.Classify the following statements as propositions or non-propositions.

i. The population of India goes upto 100 million in year 2000.ii. x + y = 30iii. Come hereiv. The Intel Pentium-III is a 64-bit computer.

Sol.i. Propositionii. Not a propositioniii. Not a propositioniv. Proposition.

13.5. Truth TableThe truth value of a proposition depends upon the truth values of its variables. Once the truth values of the variables are known, the truth value of the proposition is also known. The table to show this relationship is known as truth table. For e.g., consider the proposition ~ (p ∧ ~ q). The truth table for this proposition is given in Fig. 13.1.

  Open table as spreadsheet

p q ~ q p ∧ ~ q ~(p ∧ ~ q)T T F F TT F T T FF T F F TF F T F T

Figure 13.1

Page 24: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Illustrative Examples

Example 1.Construct the truth tables of:

i. p ∧ (~ q)ii. (p ∧ q) ∨ (q ∧ r) ∨ (r ∧ p)iii. (~ p) ∨ (~ q)iv. p ∨ q ∨ r.

Sol. The truth table for these propositions are as follows: (Fig. 13.2 to Fig. 13.5) (i)

  Open table as spreadsheet

p q ~ q p ∧ (~ q)T T F FT F T TF T F FF F T F

Figure 13.2

(ii)

  Open table as spreadsheet

p q r p ∧ q q ∧ r r ∧ p (p ∧ q) ∨ (q ∧ r) ∨ (r ∧ p)T T T T T T TT T F T F F TT F F F F F FT F T F F T TF T T F T F TF F T F F F FF T F F F F FF F F F F F F

Figure 13.3

(iii)

  Open table as spreadsheet

Page 25: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q ~ p ~ q (~ p) ∨ (~ q)T T F F FT F F T TF T T F TF F T T T

Figure 13.4

(iv)

  Open table as spreadsheet

p q r p ∨ q ∨ rT T T TT T F TT F F TT F T TF T T TF F T TF T F TF F F F

Figure 13.5

13.6. Combination of PropositionsWe can combine the propositions to produce new propositions. There are three fundamental and three derived connectors to combine the propositions. These are explained as follows one by one.

a. Fundamental Connectors1. Conjunction. It means ANDing of two statements. Assume p and q be

two propositions. Conjunction of p and q to be a proposition which is true when both p and q are true, otherwise false. It is denoted by p ∧ q. (Fig. 13.6)

Truth tables are used to determine the truth or falsity of the combined proposition.

2. Disjunction. It means ORing of two statements. Assume p and q be two propositions. Disjunction of p and q to be a proposition which is true when either one or both p and qare true and is false when both p and q are false. It is denoted by p ∨ q. (Fig. 13.7)

3. Negation. It means opposite of original statement. Assume p be a proposition. Negation of p to be a proposition which is true when p is false, and is false when p is true. It is denoted by ~ p. (Fig. 13.8)

Page 26: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

 Open table as spreadsheet

p q p ∧ qT T TT F FF T FF F F

Figure 13.6: Truth Table of p ∧ q.

 Open table as spreadsheet

p q p ∨ qT T TT F TF T TF F F

Figure 13.7: Truth Table of p ∨ q.

 Open table as spreadsheet

p ~ pT FF T

Figure 13.8: Truth Table of ~ p.

Example 2.Consider the following :

p : He is rich q : He is Generous.

Write the proposition which combines the proposition p and q using conjunction (∧), disjunction (∨), and negation (~).

Sol. Conjunction. He is rich and generous i.e., p ∧ q.

Disjunction. He is rich or generous i.e., p ∨ q.

Negation. He is not rich i.e., ~ p

He is not generous i.e., ~ q.

It is false that he is rich or generous i.e., ~ (p ∨ q).

Page 27: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

He is neither rich nor generous i.e., ~ p ∧ ~ q.

It is false that he is not rich i.e., ~ (~ p).

Example 3.Let p be "It is hot day" and q be "The temperature is 45°C". Write in simple sentences the meaning of following :

i. ~ pii. ~ (p ∨ q)iii. ~ (p ∧ q)iv. ~ (~p)v. p ∨ qvi. p ∧ qvii. ~ p ∧ ~ qviii. ~ (~ p ∨ ~ q).

Sol.i. It is not a hot day.ii. It is false that it is hot day or temperature is 45°C.iii. It is not true that it is hot day and temperature is 45°C.iv. It is false that it is not a hot day.v. It is hot day or temperature is 45°C.vi. It is hot day and temperature is 45°C.vii. It is neither a hot day nor temperature is 45°C.viii. It is false that it is not a hot day or temperature is not 45°C.

Example 4.Consider the following statements :

p : He is coward. q : He is lazy. r : He is rich.

Write the following compound statements in the symbolic form.i. He is either coward or poor.ii. He is neither coward nor lazy.iii. It is false that he is coward but not lazy.iv. He is coward or lazy but not rich.v. It is false that he is coward or lazy but not rich.vi. It is not true that he is not rich.vii. He is rich or else he is both coward and lazy.

Sol.i. p ∧ ~ rii. ~ p ∧ ~ qiii. ~ (p ∧ ~ q)iv. (p ∨ q) ∧ ~ rv. ~((p ∨ q) ∧ ~ r)

Page 28: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

vi. ~ (~ r)vii. r ∨ (p ∧ q).

b. Derived Connectors1. NAND. It means negation after ANDing of two statements.

Assume p and q be two propositions. Nanding of p and q to be a proposition which is false when both p and q are true, otherwise true. It is denoted by p ↑ q. (Fig. 13.9)

2. NOR or Joint Denial. It means negation after ORing of two statements. Assume p and q be two propositions. NOring of p and q to be a proposition which is true when both pand q are false, otherwise false. It is denoted by p ↓ q. (Fig. 13.5)

3. XOR. Assume p and q be two propositions. XORing of p and q is true or if p is true or if q is true but not both and vice versa. It is denoted by p ⊕ q. (Fig. 13.11)

 Open table as spreadsheet

p q p ↑ q

T T FT F TF T TF F T

Figure 13.9

 Open table as spreadsheet

p q p ↓ q

T T FT F FF T FF F T

Figure 13.10

 Open table as spreadsheet

p q p ⊕ qT T FT F TF T TF F F

Page 29: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Figure 13.11

Example 5.Generate the truth table for following :

i. A ⊕ B ⊕ Cii. A ↑ B ↑ C.

Sol. The -1 truth table for above formulas are as shown in Figs. 13.12 and 13.13. (i)

 Open table as spreadsheet

A B C A ⊕ B A⊕ B⊕ CT T T F TT T F F FT F T T FT F F T TF T T T FF T F T TF F T F TF F F F F

Figure 13.12

(ii) Truth table for (ii) is

 Open table as spreadsheet

A B C A ↑ B

A ↑ B ↑ C

T T T F TT T F F TT F T T FT F F T TF T T T FF T F T TF F T T FF F F T T

Figure 13.13

Page 30: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Example 6.Prove that X ⊕ Y ≅ (X ∧ ~ Y) ∨ (~ X ∧ Y).

Sol. Construct the truth table for both the propositions. (Fig. 13.14) Open table as spreadsheet

X Y X ⊕ Y ~ Y ~ X X ∧ ~Y ~ X ∧ Y (X ∧ ~Y)∨(~X ∧ Y)T T F F F F F FT F T T F T F TF T T F T F T TF F F T T F F F

Figure 13.14

As the truth table for both the proposition are same. X ⊕ Y ≅ (X ∧ ~ Y) ∨ (~ X ∧ Y). Hence proved.

Example 7.Show that (p ⊕ q) ∨ (p ↓ q) is equivalent to p ↑ q.

Sol. Construct the truth table for both the propositions.

Since, the values of (p ⊕ q) ∨ (p ↓ q) is same as p↑ q as in Fig. 13.15. Hence, they are equivalent.

 Open table as spreadsheet

p q (p ⊕ q) (p ↓ q)

(p ⊕ q) ∨ (p ↓ q)

p ↑ q

T T F F F FT F T F T TF T T F T TF F F T T T

Figure 13.15

Example 8.Show that (p ↑ q) ⊕ (p ↑ q) is equivalent to (p ∨ q) ∧ (p ↓ q).

Sol. Construct the truth table for both the propositions

Since, the values of (p ↑ q) ⊕ (p ↑ q) and (p ∨ q) ∧ (p ↓ q) are same as in Fig. 13.16. Hence, they are equivalent.

 Open table as spreadsheet

Page 31: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q p ↑ q

(p ↑ q) ⊕ (p ↑ q)

p ∨ q p ↓ q

(p ∨ q) ∧ (p ↓ q)

T T F F T F FT F T F T F FF T T F T F FF F T F F T F

Figure 13.16

c. Some Other Connectors1. Conditional. Statements of the form "If p then q" are called conditional

statements.

It is denoted as p → q and read as "p implies q" or "q is necessary for p" or "p is sufficient for q".

Conditional statement is true if both p and q are true or if p is false. It is false if p is true and q is false. The proposition p is called hypothesis and the proposition q is called conclusion. The truth table of conditional statement is (Fig. 13.17)

For example : The followings are conditional statements :2. If a = b and b = c, then a = c.3. If I will get money, then I will purchase computer.

 Open table as spreadsheet

p q p → qT T TT F FF T TF F T

Figure 13.17: Truth Table of p → q.

13.7. (a) Laws of the Algegbra of PropositionsI. Idempotent Laws

i. p ∨ p ≡ pii. p ∧ p ≡ p

II. Associative Lawsi. (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)ii. (p ∧ q) ∧ r ≡ p ∧ (q ∧ r)

III. Commutative Lawsi. p ∨ q ≡ q ∨ pii. p ∧ q ≡ q ∧ p

Page 32: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

IV. Distributive Lawsi. p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r)ii. p ∧ (q ∨ r) ≡ (p ∧ q) ∨ (p ∧ r)

V. Identity Lawsi. p ∨ f ≡ pii. p ∧ t ≡ piii. p ∨ t ≡ tiv. p ∧ f ≡ f

where t denotes the true value and f denotes the false value.VI. Complement Laws

i. p ∨ ~ p ≡ tii. p ∧ ~ p ≡ fiii. ~ ~ p ≡ piv. ~ t ≡ f, ~ f ≡ t

VII. De Morgan's Lawsi. ~ p(∨ q) ≡ ~ p ∧ ~ qii. ~ (p ∧ q) ≡ ~ p ∨ ~ q

Example 9.Show by using laws of algebra of propositions, the logical equivalence of

(p ∨ q) ∧ ~ p ≡ ~ p ∧ q.

Sol.(p ∨ q) ∧ ~ p ≡ ~ p ∧ (p ∨ q) | Commutative law

  ≡ (~ p ∧ p) ∨ (~ p ∧ q) | Distributive law

  ≡ f ∨ (~ p ∧ q) | Complement law

  ≡ ~ p ∧ q | Identity law

Example 10.Show that p ∨ (p ∧ q) ≡ p by using laws of algebra of propositions t

Sol.p ∨ (p ∧ q) ≡ (p ∧ t) ∨ (p ∧ q) | Identity law

  ≡ p ∧ (t ∨ q) | Distributive law

  ≡ p ∧ t | Identity law

  ≡ p | Identity law

Example 11.Use the laws of algebra of logic propositions, show that

~ (p ∨ q) ∨ (~ p ∧ q) ≡ ~ p.

Page 33: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Sol.~ (p ∨ q) ∨ (~ p ∧ q) ≡ (~ p ∧ ~ q) ∨ (~ p ∧ q) | De Morgan's law

  ≡ ~ p ∧ (~ q ∨ q) | Distributive law

  ≡ ~ p ∧ t | Complement law

  ≡ ~ p | Identity law.

13.7. (b) Variations in Conditional Statement

Contrapositive. The proposition ~ q → ~ p is called contrapositive of p → q.

Converse. The proposition q → p is called the converse of p → q.

Inverse. The proposition ~ p → ~ q is called the inverse of p → q.

Example 12.Show that p → q and its contrapositive ~ q → ~ p are logically equivalent.

Sol. Construct truth table for both the propositions. (as in Fig. 13.18)  Open table as spreadsheet

p q ~ p ~ q p → q ~ q → ~ pT T F FT F F TF T T FF F T T

Figure 13.18

As, the values in both cases are same, hence both propositions are equivalent.

Example 13.Show that proposition q → p and ~ p → ~ q is not equivalent to p → q.

Sol. Construct truth table for all the above propositions :

As the values of p → q in table is not equal to q → p and ~ p → ~ q as in Fig. 13.19. So both of them are not equal to p → q but they are themselves logically equivalent.

  Open table as spreadsheet

p q ~ p ~ q p → q q → p ~ p → ~ qT T F F T T TT F F T F T T

Page 34: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q ~ p ~ q p → q q → p ~ p → ~ qF T T F T F FF F T T T T T

Figure 13.19

Example 14.Prove that the following propositions are equivalent to p → q.

i. ~ (p ∧ ~ q)ii. ~ p ∨ qiii. ~ q → ~ p.

Sol. Construct the truth table for all the above propositions :

In the above table (Fig. 13.20) the values of p → q is equivalent to (i), (ii) and (iii), hence they are equivalent to p → q. Hence proved.

  Open table as spreadsheet

p q ~ p ~ q ~ p ∨ q ~ q → ~ p (p ∧ ~ q) ~ (p ∧ ~ q) p → qT T F F FT F F T TF T T F FF F T T F

Figure 13.20

2. Biconditional. Statements of the form "if and only if " are called biconditional statements.

It is denoted as p ↔ q and read as "p if and only if q". The proposition p ↔ q is true if p and q have the same truth values and is false if p and q do not have the same truth values. Fig. 13.21. The name of biconditional comes from the fact that p ↔ q is equivalent to (p → q) ∧ (q → p).

The truth table of p ↔ q is

For example :i. Two lines are parallel if and only if they have same slope.ii. You will pass the exam if and only if you will work hard.

  Open table as spreadsheet

Page 35: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q p ↔ qT T TT F FF T FF F T

Figure 13.21: Truth Table of p ↔ q.

Example 15.Prove that p ↔ q is equivalent to (p → q) ∧ (q → p).

Sol. Construct the truth tables of both propositions :

Since, the truth tables are same, hence they are logically equivalent. (Fig. 13.22 and Fig. 13.23). Hence proved.

  Open table as spreadsheet

p q p ↔ qT TT FF TF F

Figure 13.22

  Open table as spreadsheet

p q p → q q → p (p → q) ∧ (q → p)T T T TT F F TF T T FF F T T

Figure 13.23

13.8. Principle of DualityTwo formulas A1 and A2 are said to be duals of each other if either one can be obtained from the other by replacing ∧ (AND) by ∨ (OR) and ∨ (OR) by ∧ (AND). Also if the

Page 36: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

formula contains T (True) or F (False), then we replace T by F and F by T to obtain the dual.

Note 1. The two connectives ∧ and ∨ are called dual of each other.2. Like AND and OR, ↑ (NAND) and ↓ (NOR) are dual of each other.3. If any formula of proposition is valid, then its dual is also a valid

formula.

Example 16.Determine the dual of each of the following :

a. p ∧ (q ∧ r)b. ~ p ∨ ~ qc. (p ∧ ~ q) ∨ (~ p ∧ q)d. (p ↑ q) ↑ (p ↑ q)e. ((~ p ∨ q) ∧ (q ∧ ~ s)) ∨ (p ∨ F), here F means false.

Sol. To obtain the dual of all the above formulas, replace ∧ by ∨ and ∨ by ∧, and also replace T by F and F by T.

Also replace ↑ by ↓ and vice versa.a. p ∧ (q ∧ r) = p ∨ (q ∨ r)b. ~ p ∨ ~ q = ~ p ∧ ~ qc. (p ∧ ~ q) ∨ (~ p ∧ q) = (p ∨ ~ q) ∧ (~ p ∨ q)d. (p ↓ q) ↓ (p ↓ q)e. ((~ p ∨ q) ∧ (q ∧ ~ s)) ∨ (p ∨ F) = ((~ p ∧ q) ∨ (q ∨ ~ s)) ∧ (p ∧ T)

13.9. Logical Implication

A proposition P(p, q, …) is said to logically imply a proposition Q (p, q, ….), written as P(p, q, …) ⇒ Q(p, q, …) if Q(p, q, …) is true whenever P(p, q, …) is true.

Example 17.Show that p ↔ q logically implies p ↔ q.

Sol. Consider the truth tables of p ↔ q and p → q as in the following table. Fig. 13.24 p → q is true whenever p ↔ q is true. Hence p ↔ q logically implies p → q

  Open table as spreadsheet

p q p ↔ q p → qT T T TT F F FF T F TF F T T

Figure 13.24

Page 37: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Example 18.Show that p logically implies p ∨ q.

Sol. Consider the truth tables for p and p ∨ q as in Fig. 13.25 Now p ∨ q is true whenever p is true. Hence p logically implies p ∨ q.

  Open table as spreadsheet

p q p ∨ qT T TT F TF T TF F F

Figure 13.25

Example 19.Show that p ∧ q logically implies p ↔ q.

Sol. Consider the truth tables of p ∧ q and p ↔ q as in Fig. 13.26. Now p ↔ q is true whenever p ∧ q is true. Thus p ∧ q logically implies p ↔ q.

  Open table as spreadsheet

p q p ∧ q p ↔ qT T T TT F F FF T F FF F F T

Figure 13.26

Exmaple 20.Show that p ↔ ~ q does not logically imply p → q.

Sol. Construct the truth tables of p ↔ ~ q and p → q as in Fig. 13.27. Recall that p ↔ ~ q logically implies p → q if p → q is true whenever p ↔ ~ q is true. But p ↔ ~ q is true when p → q is false. Hence p ↔ ~ q does not logically imply p → q.

  Open table as spreadsheet

p q ~ q p ↔ ~ q p → qT T F F TT F T T FF T F T TF F T F T

Page 38: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Figure 13.27

13.10. Logically Equivalence of Propositions

Two propositions are said to be logically equivalent if they have exactly the same truth values under all circumstances. The table 1 contains the fundamental logical equivalent expressions :

Table 1

1. De Morgan's Lawso ~ (p ∧ q) ≅ p ∨ ~ qo ~ (p ∨ q) ≅ ~ p ∧ ~ q

2. Commutative Propertieso p ∨ q ≅ q ∨ p ; p ∧ q ≅ q ∧ p.

3. Associative Propertieso (p ∨ q) ∨ r ≅ p ∨ (q ∨ r)o (p ∧ q) ∧ r ≅ p ∧ (q ∧ r)

4. Distributive Propertieso p ∧ (q ∨ r) ≅ (p ∧ q) ∨ (p ∧ r)o p ∨ (q ∧ r) ≅ (p ∨ q) ∧ (p ∨ r)

5. Idempotent Lawso p ∨ p ≅ p and p ∧ p ≅ p

6. Complement Propertieso p ≅ ~ ~ p

7. Transpositiono (p → q) ≅ (~ q → ~ p)

8. Material Implicationo (p → q) ≅ (~ p ∨ q)

9. Material Equivalenceo (p ↔ q) ≅ [(p → q) ∧ (q → p)]o (p ↔ q) ≅ [(p → q) ∨ (~ p ∧ ~ q)]

10.Exportationo [(p ∧ q) → r] ≅ [p → (q → r)]

Example 21.Consider the following propositions

~ p ∨ ~ q and ~ (p ∧ q).

Are they equivalent ?

Sol. Construct the truth table for both (as in Fig. 13.28).  Open table as spreadsheet

Page 39: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q ~ p ~ q ~ p ∨ ~ q p ∧ q ~ (p ∧ q)T T F F TT F F T FF T T F FF F T T F

Figure 13.28

Since, the final values of both the propositions are same, hence the two propositions are equivalent.

Example 22.Show that the propositions ~(p ∧ q) and ~ p ∨ ~ q are logically equivalent.

Sol. Construct the truth tables of ~ (p ∧ q) and ~ p ∨ ~ q as in Fig. 13.29. Since the truth tables are the same, i.e., both propositions are false in the first case and true in the other three cases, the propositions ~ (p ∧ q) and ~ p ∨ ~ q are logically equivalent and we can write

~ (p ∧ q) ≡ ~ p ∨ ~ q  Open table as spreadsheet

p q p ∧ q ~ (p ∧ q)T T T FT F F TF T F TF F F T

(a)  Open table as spreadsheet

p q ~ p ~q ~ p ∨ ~ qT T F F FT F F T TF T T F TF F T T T

(b)

Figure 13.29

Example 23.Prove the associative law: (p ∧ q) ∧ r ≡ p ∧ (q ∧ r).

Page 40: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Sol. Construct the required truth tables as in Fig 13.30. Since the truth tables are identical, the propositions are equivalent.

 Figure 13.30

Example 24.Prove that disjunction distributes over conjunction; that is, prove the distributive law p ∨ (q ∧ r) ≡ (p ∨ q) ∧ (p ∨ r).

Sol. Construct the required truth tables as in Fig. 13.31. Since the truth tables are identical, the propositions are equivalent.

 Figure 13.31

13.11. Tautologies(P.T.U., M.C.A. May 2007)

A proposition P is a tautology if it is true under all circumstances. It means it contains only T in the final column of its truth table.

Example 25.Prove that the statement (p → q) ↔ (~ q → ~ p) is a tautology.

Sol. Make the truth table of above statement :

As the final column contains all T's, so it is a tautology. (Fig. 13.32) Open table as spreadsheet

p q p → q ~ q ~ p ~ q → ~ p (p → q) ↔ (~ q → ~ p)T T T F F T TT F F T F F TF T T F T T TF F T T T T T

Figure 13.32

Page 41: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Example 26.Prove that p ∨ p ↔ p is a tautology.

Sol. Construct the truth table of the given statement :

As the last column contains all T's, so it is a tautology. (Fig. 13.33) Open table as spreadsheet

p p ∨ p p ∨ p ↔ pT T TF F T

Figure 13.33

13.12. Contradiction(P.T.U., M.C.A. May 2007)

A statement that is always false is called a contradiction.

Example 27.Show that the statement p ∧ ~ p is a contradiction.

Sol. Construct the truth table of above statement.

Since, the last column contains all F's, so it is a contradiction. (Fig. 13.34) Open table as spreadsheet

p ~ p p ∧ ~ pT F FF T F

Figure 13.34

13.13. ContingencyA statement that can be either true or false depending on the truth values of its variables, is called a contingency.

Example 28.Prove that the statement (p → q) → (p ∧ q) is a contingency.

Sol. Construct the truth table of above statement.

As, the value of final column depends on the truth value of the variables, so it is a contingency. (Fig. 13.35)

 Open table as spreadsheet

Page 42: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q p → q p ∧ q (p → q) → (p ∧ q)T T T T TT F F F TF T T F FF F T F F

Figure 13.35

Example 29.From the following formulae, find out tautology, contingency and contradiction.

i. A ≅ A ∧ (A ∨ B)ii. (p ∧ ~ q) ∨ (~ p ∧ q)iii. ~ (p ∨ q) ∨ (~ p ∨ ~ q).

Sol.i. Construct the truth table for A → A ∧ (A ∨ B).

Since, the last column of the table contains all T's, hence it is a tautology. (Fig. 13.36)

ii. Construct the truth table for (p ∧ ~ q) ∨ (~ p ∧ q) as in Fig. 13.37.

Since, the value of the final column depends on the value of the different variables, hence it is a contingency.

iii. Construct the truth table of the proposition ~ (p ∨ q) ∨ (~ p ∨ ~ q) as in Fig. 13.38.

Since, the value of final column depends upon the value of different variables, hence it is a contingency.

 Open table as spreadsheet

A B A ∨ B A ∧ (A ∨ B) A → A ∧ (A ∨ B)T T T T TT F T T TF T T F TF F F F T

Figure 13.36

 Open table as spreadsheet

p q ~ p ~ q p ∧ ~ q ~ p ∧ q (p ∧ ~ q) ∨ (~ p ∧ q)T T F F F F FT F F T T F TF T T F F T T

Page 43: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q ~ p ~ q p ∧ ~ q ~ p ∧ q (p ∧ ~ q) ∨ (~ p ∧ q)F F T T F F F

Figure 13.37

 Open table as spreadsheet

p q ~ p ~ q p ∧ q ~ (p ∧ q) ~ p ∨ ~ q ~ (p ∨ q) ∨ (~ p ∨ ~ q)T T F F T F F FT F F T F T T TF T T F F T T TF F T T F T T T

Figure 13.38

Example 30.Verify that proposition p ∨ ~ (p ∧ q) is tautology.

Sol. Construct the truth table for above proposition. (Fig. 13.39)

Since, the last column contains all T' s, hence it is a tautology. Open table as spreadsheet

p q p ∧ q ~(p ∧ q) p ∨ ~ (p ∧ q)T T T F TT F F T TF T F T TF F F T T

Figure 13.39

Example 31.Determine whether the following is a tautology, contingency and a contradiction :

i. p → (p → q)ii. p → (q → p)iii. p ∧ ~ p.

Sol.i. Construct truth table for p → (p → q) as in Fig. 13.40.

Since, the value of last column depends on the value of different variables, hence it is a contingency.

ii. Construct truth table for p → (q → p) as in Fig. 13.41.

Since, the last column contains all T's, hence it is a tautology.

Page 44: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

iii. Construct truth table for p ∧ ~ p as in Fig. 13.42.

Since, the last column contain all F's, hence it is a contradiction. Open table as spreadsheet

p q p → q p → (p → q)T T T TT F F FF T T TF F T T

Figure 13.40

 Open table as spreadsheet

p q q → p p → (q → p)T T T TT F T TF T F TF F T T

Figure 13.41

 Open table as spreadsheet

p ~ p p ∧ ~ pT F FF T F

Figure 13.42

13.14. Functionally Complete Sets of ConnectivesWe have three basic and two conditional connectives i.e., ∧, ∨, ~ ⇒ and ⇔. If we have given any formula containing all these connectives, we can write an equivalent formula with certain proper subsets of these connectives.

A set of connectives is called functionally complete if every formula can be expresses on terms of an equivalent formula containing the connectives from this set.

Example 32.Write an equivalent formula for P ∧ (R ⇔ S) ∨ (S ⇔ P) which does not involve biconditional.

Sol. We know that

Page 45: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

(i) 

So, apply eqn. (i) to formula to obtain the formula equivalent to [P ∧ (R ⇔ S) ∨ (S ⇔ P)],

which does not involve biconditional. = [P ∧ ((R ⇒ S) ∧ (S ⇒ R)) ∨ ((S ⇒ P) ∧ (P ⇒ S))].

Example 33.Write an equivalent formula for R ∨ (S ⇔ T), which does not involve biconditional as well as conditional.

Sol. We know that(i) 

(ii) 

So, applying the eqn. (i) and (ii) on the above formula, we can obtain an equivalent formula, which does not involve biconditional as well as conditional.[R ∨ (S ⇔ T)] = [R ∨ ((S ⇒ T) ∨ (T ⇒ S))]

  = [R ∨ ((~ S ∨ T) ∨ (~ T ∨ S))].

Example 34.Show that {~, ∧} is functionally complete.

Sol. Take any formula which involve all the five connectives ∧, ∨, ~, ⇒ and ⇔. We can obtain an equivalence formula by first replacing biconditional and then replacing conditional and finally we can replace ∨.

AsP ⇔ Q = (P ⇒ Q) ∧ (Q ⇒ P)

  = (~ P ∨ Q) ∧ (~ Q ∨ P) = (~ (~~P ∧ ~ Q)) ∧ (~ (~ ~ Q ∧ ~ P))

Hence, {~, ∧} is functionally complete.

Similarly, we can show that (~, ∨} is functionally complete.

Example 35.Show that { ~, →} is functionally complete.

Sol. We know that P ⇒ Q ≅ ~ P ∨ Q.

So, we have

Page 46: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

P ∨ Q ≅ ~ P ⇒ Q.

Since, { ~, ∨} is functionally complete. Hence from above, {~, ⇒} is also functionally complete.

i.e., given any formula which involve all the five connectives, we can obtain an equivalence formula using {~, →} by first replacing biconditional and then replacing (∧) ANDing and finally replacing ∨.

Example 36.Express P ⇔ Q in terms of { ~, ∧} only.

Sol.(P ⇔ Q) = (P ⇒ Q) ∧ (Q ⇒ P) ∵ (P ⇔ Q) = (P ⇒ Q) ∧ (Q ⇒ P)

  = (~ P ∨ Q) ∧ (~ Q ∨ P) ∵ P ⇒ Q = ~ P ∨ Q

  = (~ (~ ~ P ∧ ~ Q)) ∧ (~ (~ ~ Q ∧ ~ P))

∵ P ∨ Q = ~ (~ P ∧ ~ Q).

Example 37.Express (P ∧ ~ Q) ∨ (~ P ∧ ~ Q) in terms of (~, ∨) only.

Sol. (P ∧ ~ Q) ∨ (~ P ∧ ~ Q) = (~ (~ P ∨ ~ ~ Q)) ∨ (~( ~ ~ P ∨ ~ ~ Q)) ∵ P ∧ Q = ~ (~ P ∨ ~ Q)

13.15. ArgumentAn argument is an assertion ; that a group of propositions called premises, yields another proposition, called the conclusion. Let P1, P2, P3,…, Pn is the group of propositions that yields the conclusion Q. Then, it is denoted as P1, P2, Pn,…, Pn ⊢ Q.

Conclusion. The conclusion of an argument is the proposition that is asserted on the basis of other proposition of the argument.

Premises. The propositions, which are assumed for accepting the conclusion, are called the premises of that argument.

a. Valid Argument

An argument is called valid argument if the conclusion is true whenever all the premises are true.

The argument is also valid if and only if the ANDing of the group of propositions implies conclusion is a tautology i.e., P (p1, p2, p3,…, pn) → Q is a tautology. Where P (p1, p2, p3,…, pn) is the group of propositions and Q is the conclusion.

Some common valid argument forms are given in Table 2.b. Falacy Argument

Page 47: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

An argument is called falacy or an invalid argument if it is not a valid argument.

Elementary Valid Argument Forms

Table 2

1. Modus ponens  p → q

  p

∴ q2. Modus tollens

  p → q

  ~ q

∴ ~ p3. Hypothetical syllogism

  p → q

  q → r

∴ p → r4. Disjunctive syllogism

  p ∨ q

  ~ p

∴ q5. Constructive dilemma

  (p → q) ∧ (r → s)

  p ∨ r

∴ q ∨ s6. Absorption

  p → q

∴ p → (p ∧ q)7. Simplification

  p ∧ q

∴ p8. Conjunction

Page 48: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

  p

  q

∴ p ∧ q9. Addition

  p

∴ p ∨ q.

Example 38.Show that the following rule is valid :

p ⊢ p ∨ q or p ∴ p ∨ q.

Sol. We can prove this rule from the truth table (Fig. 13.43)

 Figure 13.43

p is true in line 1 and 2 and p ∨ q is also true in line 1 and 2. Hence, argument is valid.

Example 39.Show that the rule modus ponens is valid.

p → q p

∴ q

Sol. The truth table of this rule is as follows : (Fig. 13.44)

 Figure 13.44

The p is the true in line 1 and 2 and p → q and p both are true in line 1 and p, p → q and q all are true in line 1. Hence, argument is valid.

Example 40.Show that the rule of hypothetical syllogism is valid

Page 49: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p → q q → r

∴ p → r.

Sol. The truth table of above rule is as in Fig. 13.45.

 Figure 13.45

p → q is true in lines 1, 2, 5, 6, 7, 8.

q → r is true in lines 1, 3, 4, 5, 7, 8.

Both p → q and q → r is true in lines 1, 5, 7, 8 p → r is also true in lines 1, 5, 7, 8. Hence, argument is valid.

Example 41.Show that the rule of Modus Tollens is valid

p → q ~ q ~ p.

Sol. The truth table of above propositions are (Fig. 13.46)

 Figure 13.46

p → q is true in line 1, 3 and 4. ~ q is true in line 2 and 4. Both p → q and ~ q are true in line 4. ~ p is also true in line 4. Hence, the argument is valid.

Example 42.Show that the rule of disjunctive syllogism is valid

p ∨ q ~ p

∴ q.

Page 50: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Sol. The truth table of above rule is as follows : (Fig. 13.47)

 Figure 13.47

p ∨ q is true in line 1, 2 and 3. ~ p is true in line 3. Both p ∨ q and ~ p is true in line 3. As q is also true in line 3. Hence, argument is valid.

Example 43.Show that the rule of simplification is valid

p ∧ q

∴ p.

Sol. The truth table of above argument is as follows : (Fig. 13.48)

 Figure 13.48

p ∧ q is true in line 1 and p is also true in line 1. Hence, the argument is valid.

Example 44.Show that the rule of conjunction is valid.

p q

∴ p ∧ q.

Sol. The argument is valid if p ∧ q → p ∧ q is a tautology. The truth table for the above proposition is as follows : (Fig. 13.49)

  Open table as spreadsheet

p q p ∧ q p ∧ q → p ∧ qT T TT F FF T F

Page 51: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

p q p ∧ q p ∧ q → p ∧ qF F F

Figure 13.49

As the proposition is a tautology. Hence, the argument is valid.

Example 45.Show that the rule of absorption is valid

p → q

∴ p → (p ∧ q).

Sol. We have to show that (p → q) → [p → (p ∧ q)] is tautology. The truth table of the above argument is as follows : (Fig. 13.50)

  Open table as spreadsheet

p q p ∧ q p → q p → (p ∧ q) (p → q) → [p → (p ∧ q)]T T T T TT F F F FF T F T TF F F T T

Figure 13.50

Since, the argument is a tautology. Hence, it is a valid argument.

13.16. Proof of ValidityWe can test the validity of any argument by constructing the truth tables. But as the no. of variable statements increases, the truth tables grow unwieldly. So, a more efficient method to test the validity of the argument is to deduce its conclusion from its premises by a sequence of elementary arguments each of which is known to be valid.

Example 46.Prove that the argument p → ~ q, r → q, r ⊢ ~ p is valid without using truth tables.

Page 52: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Sol.(i) p → ~ q (Given)(ii) r → q (Given)(iii) ~ q → ~ r Contrapositive of (ii)(iv) p → ~ r Hypothetical syllogism using (i) and (iii)(v) r → ~ p Contrapositive of (iv)(vi) r is true (Given)(vii) ~ p is true Modus ponens using (v) and (vi).

Example 47.Prove that the argument p → q, q → r, r → s, ~ s, p ∨ t ⊢ t is valid without using truth tables.

Sol.(i) p → q (Given)(ii) q → r (Given)(iii) r → s (Given)(vi) ~ s (Given)(v) p ∨ t (Given)(vi) p → r Hypothetical syllogism using (i) and (ii)(vii) p → s Hypothetical syllogism using (vi) and (iii)(viii) ~ p Modus tollens using (vii) and (iv)(ix) t Disjunctive syllogism using (v) and (viii).

Example 48.Prove that the argument p, q ⊢ (p ∨ r) ∧ q is valid without using truth tables.

Sol.(i) p (Given)(ii) p ∨ r Rule of addition using (i)(iii) q (Given)(iv) (p ∨ r) ∧ q Rule of conjunction using (ii) and (iii).

Example 49.Prove that the argument p → q, p ∧ r ⊢ q is valid without using truth table.

Sol.(i) p → q (Given)(ii) p ∧ r (Given)(iii) p Rule of simplification using (i)(iv) q Modus ponens using (i) and (iii).

Example 50.Prove that the argument (p → q) ∧ (r → s), (p ∨ r) ∧ (q ∨ r) ⊢ q ∨ s is valid

Page 53: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Sol.(i) (p → q) ∧ (r → s) (Given)(ii) (p ∨ r) ∧ (q ∨ r) (Given)(iii) (p ∨ r) Simplification using (iii)(iv) q ∨ s Constructive dilemma using (i) and (iii).

Example 51.Prove that the argument (p ∧ q) ∨ (r → s), t → r, ~ (p ∧ q) ⊢ t → s is valid without using truth tables.

Sol.(i) (p ∧ q) ∨ (r → s) (Given)(ii) t → r (Given)(iii) ~ (p ∧ q) (Given)(iv) r → s Disjunctive syllogism using (i) and (iii)(v) t → s Hypothetical syllogism using (ii) and (iii).

Example 52.Prove that the argument (p → q) ∧ (r → s), q → s, (q → s) → (p ∨ r) ⊢ q ∨ s is valid using deduction method.

Sol.(i) (p → q) ∧ (r → s) (Given)(ii) q → s (Given)(iii) (q → s) → (p ∨ r) (Given)(iv) p ∨ r Modus ponens using (iii) and (ii)(v) q ∨ s Constructive dilemma using (i) and (iv).

Example 53.Prove that the argument p → (q ∨ r), (s ∧ t) → q, (q ∨ r) → (s ∧ t) ⊢ p → q is valid without using truth table.

Sol.(i) p → (q ∨ r) (Given)(ii) (s ∧ t) → q (Given)(iii) (q ∨ r) → (s ∧ t) (Given)(iv) p → (s ∧ t) Hypothetical syllogism using (i) and (iii)(v) p → q Hypothetical syllogism using (ii) and (iv).

Example 54.Prove that the argument p ∨ (q → p), ~ p ∧ r ⊢ ~ q is valid without using truth tables.

Sol.(i) p ∨ (q → p) (Given)(ii) ~ p ∧ r (Given)

Page 54: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

(iii) ~ p Rule of simplification using (ii)(iv) q → p Disjunctive syllogism using (i) and (iii)(v) ~ q Modus tollens using (iv) and (iii).

Example 55.Test the validity of following argument. If I will select in IAS examination, then I will not be able to go to London. Since, I am going to London, I will not select in IAS examination.

Sol. Let p be "I will select in IAS examination" and q be "I am going to London". Then the above argument can be written in symbolic form as follows :

p → ~ q q

∴ ~ p

Construct the truth table for above argument (Fig. 13.51)

 Figure 13.51

p → ~ q is true in line 2, 3 and 4. q is true in line 1 and 4 and ~ p is true in line 3 and 4. Hence, all three are true in line 4. So it is a valid statement.

Example 56.Consider the following argument and determine whether it is valid.

Either I will get good marks or I will not graduate. If I did not graduate I will go to Canada. I get good marks. Thus, I would not go to Canada.

Sol. Let p be "I will get good marks" and q be "I will graduate" and r be "I will go to Canada". Thus, the above argument can be written in symbolic form as follows :

p ∨ ~ q ~ q → r p

∴ ~ r

The truth table of above proposition is (Fig. 13.52)

Page 55: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

 Figure 13.52

p ∨ ~ q is true in line 1, 2, 3, 4, 7, 8 and ~ q → r is true in line 1, 2, 4, 5, 6, 7 and p is true in line 1, 2, 3 and 4. ~ r is true in 2, 3, 6 and 8. All the above are true in line 2. Hence, the argument is valid.

Example 57.Determine the validity of the following argument without using truth tables.

Either I will pass the examination, or, I will not graduate. If I do not graduate, I will go to Canada. I failed : Thus, I will go to Canada.

Sol. Let p be "I will pass the examination" and q be "I will graduate" and t be "I will go to Canada". Thus the above argument, in symbolic form can be written as

p ∨ ~ q ~ q → t ~ p

∴ t

Thus to prove the validity of the argument, use the standard results as follows :(i) p ∨ ~ q (Given)(ii) ~ q → t (Given)(iii) ~ p (Given)(iv) ~ q Disjunctive syllogism using (i) and (iii)(v) t Modus ponens using (ii) and (iv)

Hence proved.

Example 58.Determine the validity of the following argument using deduction method.

If I study, then I will pass examination. If I do not go to picnic, then I will study. But I failed examination. Therefore, I went to picnic.

Sol. Let p be "I study" and q be "I will pass examination" and t be "I go to picnic". Then the above argument is written in symbolic form as follows :

p → q ~ t → p ~ p

Page 56: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

∴ t

Thus to prove the validity of the argument use the rules of inference.(i) p → q (Given)(ii) ~ t → p (Given)(iii) ~ p (Given)(iv) ~ ~ t Modus tollens using (ii) and (iii)(v) t Complement property using (iv)

Hence proved.

Example 59.Prove the validity of the following argument using truth tables as well as deduction method.

"If the market is free then there is no inflation. If there is no inflation then there are price controls. Since there are price controls, therefore, the market is free".

Sol. Let p be "The market is free" and q be "There is inflation" and r be "There are price controls". Then the above argument can be written in symbolic form as follows :

p → ~ q ~ q → r r

∴ p

Ist Method. By using truth tables

Construct the truth table of above argument (Fig. 13.53)

 Figure 13.53

p → ~ q is true in line 3, 4, 5, 6, 7 and 8 ~ q → r is true in line 1, 2, 4, 5, 6, 7 r is true in line 1, 4, 5, 7. All the above three are true in line 4 and 5. Also p is true in line 4. Hence the argument is valid.

IInd Method. Using deduction method(i) p → ~ q (Given)(ii) ~ q → r (Given)

Page 57: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

(iii) p → r Hypothetical syllogism using (i) and (ii)(iv) ~ p → ~ r Transposition using (iii)(v) r (Given)(vi) ~ ~ p Modus tollens using (iv) and (v)(vii) p Complement of (vi).

Module 1: Propositional and Predicate Logic

In this module, we discuss the following topics:

I. Propositional LogicII. Predicate Logic

I. Propositional Logic

A. Propositional Statements

Here is a set of sentences written in the English language. They concern the relationships of two evil spies, Bobby and Natalie, and two superheroes, Robert and Benton.

1. If Bobby and Natalie are tricky, then Roger will have to save Benton.2. Bobby or Natalie is tricky.3. Therefore, Roger will have to save Benton.

These three sentences represent a collection of facts from which we would attempt to discern whether Roger will save Benton. What do you think?

Of course the more interesting question is how you decided on your answer. Do you have a systematic way of establishing whether these sentences "make sense?" This is precisely where the study of propositional logic can help us. We start by first introducing the concept of a logical statement (a sentence which can be assigned a true or false value). Not every sentence is a logical statement, because not all sentences can be assigned a true or false value. For example, the sentence, "How do you feel?" cannot be assigned a true or false value.

Self-Assessment 1-1

Which of the following sentences are logical statements? Check your answer by clicking the Answer button.

 1. The sum of two even integers is an even integer.

2. If I don't study propositional logic at least ten hours a week then I will not do well on the exam.

3. The sum of x and y is equal to 10.

4. If interest rates go down then the stock market will

Page 58: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

go up.

5. She is a good student in mathematical logic.

B. Connectives

Once we have decided that we will be working with statements having binary values (two values), true (T) or false (F), we need a more precise way of writing our English statements. This is accomplished by reserving letters to represent simple statements. Each letter can then represent a generic statement with the value T or F. For specific applications we can also assign particular English statements to these letters.

We also introduce the special symbols called connectives at this point. For example, in the Benton and Roger argument above, the word "and" in the first sentence has a special meaning to us and would be directly translated to the symbol  , called theconjunctive connective. This connective has a precise mathematical definition that will be introduced below. There are five connectives that we will be working with. We can also assign truth-table values to the action of these operators. The connectives and their truth table values are given in table 1-1.

Table 1-1: Connectives

Connectives negation conjunction disjunction conditional biconditional

Common Terminology NOT AND OR IF, THEN IF AND ONLY IF

Symbolic Representation '

Statement Values Connective Truth-Table Values

A B A' A   B A   B A   B A   B

T T F T T T T

T F F F T F F

F T T F T T F

F F T F F T T

Table 1-1 shows us the output of these connectives for all possible values of the input statements. Note that the unary operator negation has only two possible input values, T or F (a unary operator acts on a single symbol or set of symbols). Thus the output for the negation of a statement initially assigned T would be F, and of course F would become T.

When two statement letters are involved, such as that for the conjunction A   B, then four combinations of T and F values are required, i.e., (A, B) = (T, T), (T, F), (F, T) and (F, F). How many combinations of the input statement letters would be required if three letter symbols (A, B, and C) were required to represent a more complex statement?

The negation connective is unary (i.e., acts on only one expression) and operates on the quantity immediately to its left. All the rest are binary connectives (work on two statements). Parentheses have the highest order of precedence, followed by the unary operator negation, then the conjunction and disjunction connectives, and finally the conditional and biconditional connective.

These connectives allow us to build complex statements using one or more simpler statements provided that all the statements are constructed as well-formed formulas (wffs).

The rules for wffs are as follows:

Any symbol statement represented by A, (A), or [A] is a wff. The negation of any wff is well formed; that is, if A is a wff, then A' is a wff. The conjunction of two wffs is a wff; that is, A   B is a wff. The disjunction of two wffs is a wff; that is, A   B is a wff. Given A and B are wffs, A   B is a wff.

Page 59: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Given A and B are wffs, A  B is a wff.

We are now in a position to represent the Roger and Benton statements in terms of propositional logic symbols.

To review, the statements are:

1. If Bobby and Natalie are tricky, then Roger will have to save Benton.2. Bobby or Natalie is tricky.3. Therefore, Roger will have to save Benton.

Let's see how we could convert the first statement to symbolic notation.

Figure 1-1: Steps to Convert Sentences to Symbolic Notation

The remaining statements are then simply represented by symbolic letters already used in the first statement and the disjunctive connective. Here is a complete translation of the three above statements for Benton and Roger into propositional symbols:

1. B   N   R2. B   N3. R

where the letters stand for the following statements:

B = Bobby is tricky.N = Natalie is tricky.R = Roger will have to save Benton.

We can also assign truth table values to these statements.

Page 60: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

C. Tautologies

Certain wffs are intrinsically true, that is, because of the structure of the statement all combinations of input values give the formula a true value. Such a statement is called a tautology. One of the simplest statements having this property is A   A'; that is, either A is T and A' is F or the opposite is true. A statement that is always false is called a contradiction.

 

Self-Assessment 1-2

Test yourself on the following formulas by filling in their truth table values (T or F) on your own. When you finish filling in each truth table press the CHECK button to see if you're correct, the CLEAR TABLE button to erase the content of the fields, or theSHOW ANSWERS button to see the correct answers.

Table 1-2: Tautology Practice 1

AB  A   (B A)

T T

T F

F T

F F

   

Table 1-3: Tautology Practice 2

A B  A' B' (A B)'

CHECK CLEAR TABLE

Page 61: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

T T

T F

F T

F F

   

Table 1-4: Tautology Practice 3

AA   A'

T

F

   

Table 1-5: Tautology Practice 4

A B C A B C

T T T

T T F

T F T

T F F

F T T

F T F

F F T

F F F

CHECK CLEAR TABLE SHOW ANSWERS

CHECK CLEAR TABLE SHOW ANSWERS

Page 62: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

   

There is another method for determining whether a statement is a tautology: using an algorithmic approach, or algorithmic method (a set of instructions that can mechanically be applied in a finite amount of time to solve a problem). Often algorithms are first written in pseudocode, that is, phrases or keywords that generally lay out the steps involved in solving a certain class of problems. Let's develop an algorithm to determine whether the complex statement, A   (B   A), is a tautology.

Here are the steps involved in determining if the statement A   (B   A) is a tautology.

First, assume A   (B   A) is not a tautology, that is, we assign the value F to it.

Since the conditional is F, then its premise must be T and the conclusion F; that is,

A (B A)

F

A = T (B   A) = F

repeat the following steps    for each statement already assigned a value,    assign truth values to each component in a consistent manneruntil all the symbolic letters have values

We are left at the end of this process with the following assignments:

 

if

 

any letter is assigned both T and F values and all the other assignments are consistent with the original assignment of F to the full statement, then we must give up the hypothesis that the full statement is F, and conclude that the original full statement is a tautology

(Note that A is assigned both T and F value in our example—an impossibility; therefore, this statement is T.)

else

 we find a way to make the original assignment F for the full statement with at least one consistent assignment of individual symbolic letters, then we conclude that the

CHECK CLEAR TABLE SHOW ANSWERS

Page 63: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

original full statement is not a tautology

end if

 

Self-Assessment 1-3

Try the algorithmic method on the following statements to establish whether they are tautologies. Check your answer by clicking the Answer button. 1. A (A B)'

2. B B'

3. (A (B C)) (A B)

4. (A B) (B C) (A C)

D. Valid Arguments

Let's finally answer the question posed at the beginning of this section about Roger. However, let's pose the question a little more generally: Given that the first two statements (we call these the premise statements) are T, is the last statement (orconclusion) T?

In general, a set of statements composed of one or more premises and a conclusion is called an argument. If the argumentmeets the conditions above (i.e., both premises and the conclusion are T) it is called a valid argument. However if there are any assignments to the set of premises where they are all T and the conclusion is F then the argument is not valid.

Another way of looking at this is to compose a conditional statement where the premise of the conditional is the conjunction of all the premise statements, and the conclusion of the conditional statement is simply the conclusion of the argument. If this statement is a tautology then the argument is valid. In symbolic form, the above argument would be composed as the following conditional statement,

(B   N   R)   (B   N)   R

You can check the validity of this original argument by testing whether this statement is a tautology. This is easily accomplished by constructing a truth table.

Truth Table for a Valid Argument

Page 64: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

If this statement is a tautology then the original argument is valid; if not, the original argument is invalid. Work this problem via the algorithmic method for establishing whether a statement is a tautology. You should arrive at the same conclusion.

Statements that have matching truth-table values for all possible input truth-table values of the symbolic letters are logically equivalent.

Here is a short set of logically equivalent (denoted by the symbol  ) statements.

Table 1-6: Logically Equivalent Statements

Equivalence Rules

Commutative rules (comm) A   B   B   A A   B   B   A

Associative rules (ass) (A   B)   C   A   (B   C)

(A   B)   C   A   (B   C)

DeMorgan's laws (DM) (A   B)'   A'   B' (A   B)'   A'   B'

Conditional implication (imp) (A   B)   A'   B

Double negation (dn) (A')'   A

These can be easily verified by constructing truth tables for each statement on either side of the biconditional connective and comparing their truth-table values. They can also be verified by noting that a biconditional statement constructed from two equivalent statements is a tautology.

A truth table to verify the logical equivalence of the statements (A   B) and A'   B is shown below.

Table 1-7: Truth Table of Logically Equivalent Statements

Page 65: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

A B A' A   B A'   B

T T F T T

T F F F F

F T T T T

F T T T T

Here are some important inference rules (standardized valid arguments used in propositional logic to prove other valid arguments).

Table 1-8: Inference Rules

Inference Rules

Modus ponens* (mp) A   B, A   B

Modus tollens* (mt) A   B, B'   A'

Conjunction (con) A, B    A   B

Simplification (sim) A   B   A, B

Addition (add) A    A   B

 - therefore 

* Modus ponens is Latin for "method of affirming," and modus tollens is Latin for "method of denying."

By the way, it is easy to prove mp by constructing the propositional wff (A   B)   A   B and establishing that it is a tautology. The remaining rules can be proven in a similar fashion.

Once we have a basic set of equivalence and inference rules, we can then establish additional arguments by using a formal proof method. We define a proof sequence as a set of wffs that are either given to us or follow from the application of existing equivalencies or inferences that lead to some wff. That is, every step in the proof sequence follows from one or more of the previous wffs and application of the equivalence or inference rules. Thus the derivation of the conclusion B by this method takes on the following conditional form:

A1   A2   A3   A4 …   An   B

This represents a formal proof of B from the wffs, collectively denoted by  . We can also say that   leads to a derivation of A   B by use of the deduction method (dm), provided that the equivalence below holds and we have first derived the statement to the left of the biconditional above.

(A1   A2   A3   A4 …   An   A   B)   (A1   A2   A3   A4 …   An)   (A   B)

(Note: This proof of the dm involves techniques that have not yet been introduced in this class.)

The deductive method is often written in the following form:

Page 66: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

The Deductive Method

Given  , a conjunction of propositional statements, 

if           A   B,then          (A   B).

Note that   may have no statements.

Proving the left-hand side of the biconditional above and applying the dm would constitute a formal proof of the statement A   B from the set of wffs,  . A formal proof method requires that we assume some statements, for example   and A, and derive B by using equivalence and inference rules already proven. For the proof to be creditable we must give a reason for each step in the derivation of B.

For example, a proof of the inference rule A   B, B   C   A   C (also called the rule of hypothetical syllogism, hs) by a formal proof methodology is given below.

Prove (A   B)   (B   C)   (A   C)

Proof:

Statement Justification

1. A hypothesis (hyp) [can also be labeled given or assumed]

2. A   B hyp

3. B   C hyp

4. B mp 1, 2 [by using mp and statements 1 and 2 we have A, A   B B]

5. C mp 3, 4

Therefore (A   B) (B   C) A   C from which we can write"(A   B) (B   C) (A   C) by dm."In this case, is (A   B) (B   C).

We conclude this section by stating that propositional logic is a decidable theory. That is, there exists a mechanical procedure or algorithm to determine whether each wff is a tautology. Furthermore, every wff that is a tautology can be shown to be a theorem in formal propositional logic.

A formal theory starts off by defining wffs and reserving a set of them to be the initial theorems. We also know this set of wffs as postulates. Then all the other theorems are proven using only these postulates and a small set of inference rules. Thus all the theorems of propositional logic are known by evaluation of their associated truth-table values.

Page 67: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

II. Predicate Logic

A. Quantifiers

Here is a classic logical argument.

All men are mortal.Socrates is a man.Therefore, Socrates is mortal.

Let's write this argument using propositional symbols. Each of the sentences is a statement because each can be assigned a T or F value. Note that none of the statements as written requires any of the connectives previously introduced in propositional logic. Therefore simply assign the first statement the letter A, the second B, and the concluding statement C.

The only problem is that this is not a valid argument form, as it is easy to invalidate. The formula A   B   C is not a tautology. However, we "know" that this is a valid argument! Why? Let's write the first statement in a slightly different form.

For all x, if x is a man then x is mortal.Socrates is a man.Therefore, Socrates is mortal.

Now the argument form is beginning to look more familiar (almost like mp); however, unlike in propositional logic, here we need to look at expressions that represent less than a complete sentence in order to fully understand this argument. First take a look at the expression, "x is a man." By itself these words constitute a sentence; however, according to propositional logic this is not a statement, because without a particular value assigned to the symbol x, we do not know whether this expression should be T or F.

In general, a sentence is made up of two major parts—a subject and a predicate. The predicate takes the action of the subject. In the sentence, "x is a man" the variable x represents the subject, and the expression, "is a man," is the predicate.

When we introduce variables into our sentences we must associate a collection of values from which to assign them. This collection is called the domain. Since this predicate is acting on only one subject, we call it a unary predicate and represent the sentence "x is a man" symbolically with P(x). An example of a binary predicate symbol might be L(x, y), representing the expression "x loves y."

Getting back to the problem at hand, we can take the sentence, "x is mortal" and represent it by the unary predicate symbol,Q(x). The expression, "for all " or "for any" has a special meaning for us, and we reserve the symbol  , called the universal quantifier to represent it. The universal quantifier never appears by itself but is always associated with some variable and enclosed by parentheses. Thus "For all x" is written symbolically as ( x), and the entire first sentence in our argument can be written ( x)[P(x)   Q(x)]. Notice that for the remaining sentences we can use the same predicates already introduced in the first sentence; however, the variable, x, is replaced by the constant, s, which stands for Socrates. Thus the entire argument in symbolic form is

( x)[P(x)   Q(x)]P(s)Q(s)

When we associate a specific domain, predicates, and constants to predicate logic symbols we call this an interpretation. In this instance the following interpretation has been made:

The domain is the set of all humans. The predicates P(x) ("x is human.") and Q(x) ("x is mortal.") have been assigned. The constant s has been assigned the value Socrates—a particular human in the domain.

Using the same statements we could make another interpretation; in fact, there are an infinite number of interpretations—our imagination being the only constraint. There is no specific correct answer but here's one possible answer.

( x)[P(x)   Q(x)]P(s)Q(s)

Page 68: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Let the domain be the set of all polygons; let P(x) represent "x is a square."; let Q(x) represent "x is a rectangle."; and let s be a specific polygon (in this case a square).

Another quantifier that we will work with is the existential quantifier, denoted by the symbol  .

It represents the expressions "for at least one" or "for some." Like the universal quantifier, it is always associated with a variable, as in the expression, "for at least one x", written ( x).

At this point we have introduced all the basic symbolic extensions to propositional logic to create predicate logic statements. Additional rules for constructing wffs to accommodate predicate nomenclature follow:

A predicate statement, for example A(x) is a wff. If A(x) is a wff then [A(x)] is a wff. If A(x) is a wff and x is a variable, then ( x)A(x). If A(x) is a wff and x is a variable, then (  x)A(x).

 

Self-Assessment 1-4

Which of the following predicate logic expressions are wffs? 1. ( x)P(x) ( x)P(x)

2. ( x)C(x) ( x)A(x) P(t)

3. B(x) ( x) ( x) B(x)

 

How do we assign truth values to the sentences in predicate logic? First we have to realize that unlike propositional logic statements that are wffs, wffs in predicate logic need not have the values T or F associated with them. Let' see why.

Take the universally quantified statement ( x)A(x)—it is assigned T if for all values in the domain associated with the variable xthe predicate A(x) is T. It is assigned F if at least one value assigned to x from the domain makes A(x) F.

For the existentially quantified statement ( x)A(x), we assign a value of T if at least one of the values assigned to x from the domain makes A(x) T. This statement is false only if all values of x make A(x) F.

Although A(x) may be a wff, we cannot assign a truth value to it. The variable x is called free in this case; that is, it is not in the scope of a quantifier or part of a quantifier. Since x is within the scope of the quantifier ( x) in the statement ( x)A(x), and is also part of the quantifier, we say that it is bound. Here is another predicate logic symbolic expression that cannot be assigned a T or F value.

In a particular interpretation, some values of y could make this predicate expression T and others could make it F. In general, only statements without free variables can be assigned a T or F value, but it is not always the case. 

Self-Assessment 1-5

Page 69: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

For each of the following statements identify which variables are free and which are bound. 1. ( x)[A(x, y) ( x)A(x)]

2. A(x) ( x)A(x)

 

B. Negation of Quantifiers

Consider the following statement:

Not all birds can fly.

This statement can be rewritten in "predicate English" as follows:

Not for all x, if x is a bird, then x can fly.

This can then be written with predicate symbols as follows:

[( x)(B(x)   F(x))]'

In the previous statement B(x) represents the predicate statement "x is a bird," and F(x) represents "x can fly." Another way of expressing the entire statement in predicate English is as follows:

There exists at least one x such that x is a bird and x cannot fly.

This statement can be expressed symbolically as ( x)[B(x)  (F(x))'].

Returning to our first statement, substitute A   B for its equivalent form A'   B, which converts the statement

[( x)(B(x)   F(x))]'

to

[( x)(B(x)'   F(x))]'.

Using DM (De Morgan's laws) we can rewrite this as [(( x)(B(x)   (F(x))')']'. Since these two expressions represent the same idea we can compare [(( x)(B(x)   (F(x))')']' to ( x)[B(x)   (F(x))'] to see that [( x)(C(x))']' is equivalent to (x)C(x), lettingC(x) represent B(x)   (F(x))' . Another way of saying this is

[( x)D(x)]' is equivalent to ( x)[D(x)]'.

In predicate English this is saying "Not for all x the relationship D(x)" is equivalent to "There exists at least one x such that not the relationship D(x)."

A similar rule applies to negating the existential quantifier:

[( x)D(x)]' is equivalent to ( x)[D(x)]'

Page 70: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

C. Multiply Quantified Statements

Consider the following English sentence:

Everybody loves somebody.

This can be rewritten as follows so that we can easily convert it to predicate logic symbols:

For all x, there exists at least one y such that x loves y.

In this form it is easy to see that the following associations can be made.

The resulting symbolic expression is ( x) ( y)L(x, y).

How would you write the following statement as a symbolic expression?

Somebody loves everybody. 

We can also form the negation of these multiply quantified statements. For example, what is the negation of the following statement?

For all x, there exists at least one y such that x loves y.

The process is best done symbolically and then rewritten in English. Start with the predicate expression:

( x) ( y)L(x, y)

Then attach a negation to the statement, that is [( x) ( x)L(x, y)]'.

Apply the rules for negation of a quantified statement—first to the universal quantifier, and then the existential quantifier. The steps follow.

[( x) ( y)L(x, y)]'   ( x) [( y)L(x, y)]'

( x) [( y)L(x, y)]'   ( x) ( y)[L(x, y)]'

In English we would express this as,

There exists at least one x such that for all y, not x loves y.

Here is a more familiar sentence with the same meaning:

Somebody does not love anybody.

Self-Assessment 1-6

Use negation rules to negate the following sentences:

Page 71: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

1. If an integer is divisible by 8, it is divisible by 2.

2. Every integer is either even or odd.

3. There is at least one prime number that is even.

 

Self-Assessment 1-7

Write the following sentences using predicate symbols, and then negate the statements.1. Whales are heavier than squid.

2. Nobody hates everybody.

D. Validity

A valid statement in predicate logic is T for all interpretations. This is similar to the concept of a tautology in propositional logic. However, unlike in propositional logic, there is no algorithm to determine whether a wff is valid, because the number of interpretations is infinite and the domain of any interpretation may be infinite.

Yet predicate logic is essentially an extension of propositional logic. This means that while establishing validity for any statement in predicate logic can be difficult, we can build on the statement forms in propositional logic that were shown to be tautologies. These forms represent valid predicate logic statements with the appropriate substitution, since it is the form of the statement and not the particular values we give to the letters that makes a statement a tautology.

Thus it is a simple process to consistently substitute any wff predicate expression into a propositional statement and maintain the truth value assigned the original statement. For example, the first statement below is a tautology in propositional logic, and the second statement is a valid statement in predicate logic. They both have the same intrinsic form that makes them T.

(A   B)   A'   B

[( x)A(x)   B(x)]   [( x)A(x)]'   B(x)

How could we write other valid predicate statements based on the tautology above?

Since we cannot create an algorithmic method to establish validity we will instead use the formal approach to derive new valid statements. This approach is based on previously valid statements and rules similar to those used in propositional logic. However the rules of inference need to be extended to include the quantifiers. A list of these new rules follows:

Table 1-9: Inference Rules

Inference Rule Restrictions for Using Rule

Universal instantiation (ui) ( x)A(x)   A(t) Provided t is free for x in A(x).

Existential instantiation (ei) ( x)A(x)   A(t) Used to introduce t in a derivation.

Page 72: 1.2. Proposition and Logical OperationsMath+Re…  · Web view18.04.2015 · New Delhi is the capital of India. 8 ... truth-value T or F where T is the first letter of the word Truth

Universal generalization (ug) A(x)   ( x)A(x) Provided A(x) has not been deduced from any hypothesis in which x is a free variable or by use of ei.

Existential generalization (eg) P(x)   ( x)A(x)

P(a)   ( x)A(x)

For the rule with P(a), x must not appear in P(a).

Using these new inference rules and the previous rules introduced in propositional logic we can validate our argument with Socrates.

( x)[P(x)   Q(x)]   P(s)   Q(s)

Proof:

Statement Justification

1. ( x)[P(x) Q(x)] hypothesis (hyp)

2. P(s) hyp

3. P(s) Q(s) ui using 1

4. Q(s) mp using 2, 3

Here is a derivation for the validity of the statement ( x)P(x)   ( x)P(x), using these rules. In plain English it simply says, "If the property P holds for all x then it holds for at least one x."

( x)P(x)   ( x)P(x)

Proof:

Statement Justification

1. ( x)P(x) hyp

2. P(a) ui using 1

3. ( x)P(x) eg using 2

 

Self-Assessment 1-8