0% found this document useful (0 votes)
0 views

Notes on Module2

Logic is the study of reasoning methods, providing rules to determine the validity of arguments, with applications in fields like computer science and AI. Propositions are declarative sentences that can be true or false, while non-propositions include exclamatory and interrogative sentences. Logical connectives such as conjunction, disjunction, and negation are used to form complex propositions, which can be atomic or compounded.

Uploaded by

samarth soni
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Notes on Module2

Logic is the study of reasoning methods, providing rules to determine the validity of arguments, with applications in fields like computer science and AI. Propositions are declarative sentences that can be true or false, while non-propositions include exclamatory and interrogative sentences. Logical connectives such as conjunction, disjunction, and negation are used to form complex propositions, which can be atomic or compounded.

Uploaded by

samarth soni
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Unit-III

(LOGIC)

Introduction :-

Logic is the discipline that deals with the methods of reasoning.

Aims of logic are to provide rules by which we can determine whether a particular
reasoningor argument is valid. These logical rules are used to distinguish between valid and invalid
mathematical arguments.

Applications of logic are more in computer science. Logical rules are used in the design of
computer circuits, the construction of computer programs, the verification of the correctness of
programs ect.,
Applications of Logic: It is a dynamic subject. In one direction, Model Theory has increasingly
sophisticated applications to other parts of mathematics, and in another, Proof Theory,
Complexity Theory, and the study of Reasoning under Uncertainty are applied to Computer
Science, AI, and IT
Uses of Mathematical logic: It was devised to formalize precise facts and correct reasoning. Its
founders, Leibniz, Boole and Frege, hoped to use it for common sense facts and reasoning, not
realizing that the imprecision of concepts used in common sense language was often a
necessary feature and not always a bug.

Definition:- Proposition ( Statement)

A declarative sentence which is true or false, but not both, is called a proposition.

Propositions are denoted by smaller case letter like a, b c, p, q, r...

Examples:-

(1) Let 'p' be the sentence that "2+3=5", Clearly it is a declarative sentence and it is true.
Therefore 'p' is a proposition.

(2) Let 'q' be the sentence that "2+2=5", Clearly it is a declarative sentence and it is false.
Therefore 'q' is a proposition

(3) Let 'r' be the sentence that "Toronto is the capital of Canada", Clearly it is a declarative
sentence and it is false, Therefore 'r' is a proposition.

(4) Let 's' be the sentence that "Washing D.C is the capital of united states of America",
Clearly it is a declarative s sentence and it is true, Therefore 's' is a proposition.

(5) Let 't' be the sentence that "The integer 7 is a prime number", Clearly it is a declarative
sentence and it is true, Therefore 't' is a proposition.

(6)Let 'u' be the sentence that " The integer 9 is a prime number" , Clearly it is a declarative
sentence and it is false, Therefore 'u' is a proposition

(7) Let 'v' be the sentence that "Today is Sunday", Clearly it is a declarative sentence and it
may be true or false depends on day on which propositions is made or said. Therefore 'v' is
proposition.

(8) Let 'w' be the sentence that " Mr. Ramkumar is a Teacher", Clearly it is a declarative
sentence and it may be true or false . If he is originally a lawyer then the its is true, otherwise false.
(9) Let 'z' be the sentence that "1+1101=1110", Clearly it is a declarative sentence and it may
be false when 1 and 1101 are added using decimal number system, true when 1 and 1101 are added
using binary number system.

(10) let 'a' be the sentence that "Logic is a dull subject", Clearly it is a declarative sentence
and it may be true or false depends on the person who made this proposition.

Definition:- Not Proposition

The sentences which are exclamatory, interrogative or imperative in nature are not
proposition

Examples:-

(1) Let 'p' be the sentence that "what time is it?", Clearly it is not a declarative sentence,
therefore 'p' is not a proposition,

(2) Let 'q' be the sentence that "x+1=0", Clearly it is a declarative sentence , but it is neither
true nor false, Since the variable in this sentence have not been assigned values. Therefore 'q' is not
a proposition.

(3) Let 'r' be the sentence that "x+y=10", Clearly it is a declarative sentence, but it is neither
true nor false, since the variable in this sentence have not been assigned values. Therefore 'r' is not a
proposition.

(4) Let 's' be the sentence that "Take a cup of coffee", Clearly it is not a declarative sentence,
therefore 's' is not a proposition.

(5) let 't' be the sentence that "How beautiful is Rose?" , Clearly it is not a declarative
sentence, therefore 't' is not a proposition.

(6) Let 'u' be the sentence that "When will the construction be completed? ", Clearly it is not
a declarative sentence, therefore 'u' is not a proposition.

(7) Let 'v' be the sentence that "Obey the order" , Clearly it is a command, Therefore 'v' is
not a proposition.

(8) Let 'w' be the sentence that " What a notable work", Cleary it is an exclamation sentence,
therefore 'w' is not a proposition.

Note:-

(1) There only two possibilities that the proposition may be true or false. (nothing other than
this)

(2) Here the word sentence and statements are mean the same.

Definition:- "Truth Value of Proposition"

The truth value of the proposition are either true or false but not both.
Suppose if the proposition is true, then the truth value of proposition is TRUE, it is denoted
by 'T' or '1'

Suppose if the proposition is false, then the truth value of proposition is FALSE, it is denoted
by 'F' or '0'.

Examples:-

(1) Let 'p' be the sentence that "2+3=5", Clearly it is a declarative sentence and it is true.
Therefore 'p' is a proposition. ``The truth value of p is T

(2) Let 'q' be the sentence that "2+2=5", Clearly it is a declarative sentence and it is false.
Therefore 'q' is a proposition. The truth value of q is F

(3) Let 'r' be the sentence that "Toronto is the capital of Canada", Clearly it is a declarative
sentence and it is false, Therefore 'r' is a proposition. The truth value of r is F

(4) Let 's' be the sentence that "Washing D.C is the capital of united states of America",
Clearly it is a declarative s sentence and it is true, Therefore 's' is a proposition. The truth value of
s is T.

Definition :- Connectives

The logical operators are called connectives, there are three basic connectives namely
(i) Conjunction ,

u(ii) Disjunction
(iii) Negation
Definition:- "Conjunction "

Let p, q be the propositions, then joining two propositions p and q using ' and ' produces a
new proposition. It is denoted by p  q.

It has truth value T whenever both p and q have truth value T, the truth value F otherwise.

P q pq
T T T
F T F
T F F
F F F
Example:-

(1) Let p be the proposition that "Today is Sunday"

Let q be the proposition that " Tomorrow is Monday"

Therefore the conjunction of p, q is denoted by p  q and written by

"Today is Sunday and Tomorrow is Monday". (assume that statements are made consecutive days)
P q pq
T T T
F F F

(2) Let p be proposition that "Today is the last date to pay the fees"

Let q be proposition that "The final semester examination starts next week"

Therefore p  q is written by "Today is the last date to pay the fees and The final

semester examination starts next week".

P q pq
T T T
F F F
T F F
F T F

(3) Let p be proposition that "It is raining"

Let q be proposition that "A triangle has three sides"

Therefore p  q is written by " It is raining and A triangle has three sides".

P q pq
T T T
F T F

(4) Let p be proposition that "Today is sunday"

Let q be proposition that " Government officers are working"

Therefore p  q is written by "Today is sunday and Government officers are working"

P q pq
T T T
F F F
T F F
F T F

(5)Let p be proposition that "I will buy a TV set"

Let q be proposition that " I will buy a car"

Therefore p  q is written by "I will buy a Tv set and I will buy a car". i.e " I will buy a TV set and Car"
P q pq
T T T
F F F
T F F
F T F

(6) Let p be proposition that "Its raining"

Let q be proposition that " 7 is a prime number"

Therefore p  q is written by "Its raining and 7 is a prime number".

P q pq
T T T
F T F

(7) Let p be proposition that "Its raining"

Let q be proposition that " 9 is a prime number"

Therefore p  q is written by "Its raining and 9 is a prime number".

P Q pq
T F F
F F F

Definition:- "Disjunction "

Let p, q be the propositions, then joining two propositions p and q using ' or ' produces a

new proposition. It is denoted by p  q.

It has truth value F whenever both p and q have truth value F, the truth value T otherwise.

P q p q
T T T
F T T
T F T
F F F
Example:-

(1) Let p be the proposition that "Today is Sunday"

Let q be the proposition that " Tomorrow is Monday"

Therefore the conjunction of p, q is denoted by p  q and written by

"Today is Sunday or Tomorrow is Monday". (assume that statements are made consecutive days)
P q p q
T T T
F F F

(2) Let p be proposition that "Today is the last date to pay the fees"

Let q be proposition that "The final semester examination starts next week"

Therefore p  q is written by "Today is the last date to pay the fees or The final

semester examination starts next week".

P q p q
T T T
F F F
T F T
F T T

(3) Let p be proposition that "It is raining"

Let q be proposition that "A triangle has three sides"

Therefore p  q is written by " It is raining or A triangle has three sides".

P q p q
T T T
F T T

(4) Let p be proposition that "Today is sunday"

Let q be proposition that " Government officers are working"

Therefore p  q is written by "Today is sunday or Government officers are working"

P q p q
T T T
F F F
T F T
F T T

(5) Let p be proposition that "I will buy a TV set"

Let q be proposition that " I will buy a car"

Therefore p  q is written by "I will buy a Tv set or I will buy a car".


P q p q
T T T
F F F
T F T
F T T

(6) Let p be proposition that "Its raining"

Let q be proposition that " 7 is a prime number"

Therefore p  q is written by "Its raining or 7 is a prime number".

P q p q
T T T
F T T

(7) Let p be proposition that "Its raining"

Let q be proposition that " 9 is a prime number"

Therefore p  q is written by "Its raining or 9 is a prime number".

P Q p q
T F T
F F F

Definition:- Negation

A proposition p may be negated by preceding it by the word, "It is not true that p" (or "p is

not true", "It is not the case that p ") is called negation. It is denoted by p' or ~p or p or  p

we use the notation  p

P p
T F
F T

Example:-

(1) Let p be proposition that "Our school produced 100% result in the last year's final

examinations"

 p is written by "It is not true that our school produced 100% result in the last year's final

examinations" (OR) "Our school did not produced 100% result in the last year's final examinations".
P p
T F
F T

(2) Let q be proposition that "John is playing football",

 p is written by "It is not true that john is playing football" or "It is false that john is playing

football" or simply "John is not playing football"

P p
T F
F T

(3) Let p be proposition that "2+5>2"

 p is written by "It is not true that 2+5>2" or "2+5  2"

P p
T F

(4) Let p be proposition that "Today is Friday"

 p is written by "It is not true that today is Friday" or "Today is not Friday"
P p
T F

(5) Let p be proposition that "New Delhi is not in India"

 p is written by "It is not true that New Delhi is not in India " or " New Delhi is in India "

P p
F T

Definition:- "Atomic proposition"

The proposition which do not contain any of the logical operator or connectives are called

atomic proposition. It is also called primary or primitive proposition.

Examples:-

(1) Let 'p' be the sentence that "2+3=5", Clearly there is no logical operator in this
proposition, therefore 'p' is a atomic proposition.
(2) Let 'q' be the sentence that "2+2=5", Clearly there is no logical operator in this
proposition, therefore 'q' is a atomic proposition.

(3) Let 'r' be the sentence that "Toronto is the capital of Canada", Clearly there is no logical
operator in this proposition, therefore 'r' is a atomic proposition.

(4) Let 's' be the sentence that "Washing D.C is the capital of united states of America",
Clearly there is no logical operator in this proposition, therefore 's' is a atomic proposition.
Definition:- "Compounded Proposition"

Many mathematical proposition which can be constructed by combining one or more atomic

propositions using connectives are called compounded proposition.

Example:-

Let p, q, r, s, t be atomic propositions, the propositions

p  q  r, q  p  s, p  q, p  r  s, s  t ect., are compounded proposition.

Order of Precedence for Logical Connectives

we use parenthesis to specify the order in which logical operator in a compound proposition

are to be applied.

Example:-

( p  q)  (r) is the conjunction of ( p  q) and (r)

( p  q)  (r) is the disjunction of ( p  q) and (r)

To avoid the excessive number of parenthesis, we use order of precedence as follows

(i) The negation operator has precedence over all other logical operators.

i.e p  q means (p)  q but not ( p  q)

(ii) The conjunction operator has precedence over the disjunction operator.

i.e p  q  r means ( p  q)  r but not p  (q  r)

(iii) The conditional and bi-conditional operator have lower precedence than other operators.

Among them, conditional operator precedence over the bi-conditional operator.

Definition:- "Exclusive or"

Let p and q be two propositions. The exclusive or of p and q is denoted by p  q .

The truth value of p  q is true when exactly one of p and q is true, and is false otherwise.

p q p q
T T F
F T T
T F T
F F F
Definition:- " Implication " (conditional)

Let p and q be two propositions, the compounded proposition " if p, then q" is called

Conditional proposition or Implication. It is denoted by p -> q.

In this p is called hypothesis (antecedent or premise) and q is called conclusion

(consequence)

The truth value of p->q is false when q has the truth value 'F' and p has the truth value 'T'

otherwise p->q has the truth value 'T'

p q pq
T T T
F T T
T F F
F F T

Example:-

(1) Let p be proposition that "it is a sunday"

Let q be proposition that " we will go to the beach"

p->q be compounded proposition that " If it is a sunday then we will go to the beach"

p q pq
T T T
F T T
T F F
F F T
(2) Let p be proposition that "Today is Friday"

Let q be proposition that "2+3=5"

p->q be compounded proposition that " If today is Friday, then 2+3=5"


p q pq
T T T
F T T

(3) Let p be proposition that "3+8=10"

Let q be proposition that "Delhi is in India"

p->q be compounded proposition that " If 3+8=10, then Delhi is in India"


p q pq
F T T
F F T

(4) Let p be proposition that "2+3=5"

Let q be proposition that "8+3=10"

p->q be compounded proposition that " If 2+3, then 8+3=10"


p q pq
T F F
Definition:- " Bi-conditional "

Let p and q be two propositions, the compounded proposition " p if and only if q" is called

bi-conditional proposition. It is denoted by p  q.

In this p is called hypothesis (antecedent or premise) and q is called conclusion

( or consequence)

The truth value of p->q is 'True' when p and q has identical truth value , and in all other

cases the truth value is 'False'.

p q p q
T T T
F T F
T F F
F F T
Example:-

(1) Let p be proposition that "it is a sunday"

Let q be proposition that " we will go to the beach"

p  q be compounded proposition that " it is a sunday if and only if we will go to the


beach"

p q p q
T T T
F T F
T F F
F F T

(2) Let p be proposition that "Today is Friday"

Let q be proposition that "2+3=5"


p  q be compounded proposition that " today is Friday if and only if 2+3=5"
p q pq
T T T
F T F

(3) Let p be proposition that "3+8=10"

Let q be proposition that "Delhi is in India"

p  q be compounded proposition that " 3+8=10 if and only if Delhi is in India"

p q p q
F T F
F F T

(4) Let p be proposition that "2+3=5"

Let q be proposition that "8+2=10"

p  q be compounded proposition that " If 2+3=5, then 8+2=10"

p q p q
T T T

(5) Let p be proposition that "2+3=6"

Let q be proposition that "8+2=11"

p  q be compounded proposition that " If 2+3=6, then 8+2=11"

p q p q
F F T

Definition:- "Boolean Variable"

A variable is called a Boolean variable if its value is either true or false.

Note:-
A Boolean variable can be represented using a bit.

Note :-
Computer bit operation corresponding to the logical operator obtained by replacing true by

a one and false by zero. We use the notations OR, AND and XOR for the operators  ,  , and 
Truth table for Bit Operator OR, AND and XOR.

P q p q pq p q
1 1 1 1 0
1 0 1 0 1
0 1 1 0 1
0 0 0 0 0
Note:

If there are p1, p2,...pn (n-number of atomic propositions) in the given compounded

proposition, then there are 2n rows in the corresponding compounded proposition truth table.

Problem:-01

Construct the truth table for the compounded proposition (p  q)  (q  p)

Solution:-

Since there are two atomic proposition p and q in the given compounded proposition,

therefore there are 22 number of row in the corresponding compounded proposition

i.e TT, TF, FT, FF

Truth table for (p  q)  (q  p)


p q p q p  q q  p (p  q)  (q  p)
T T F F T T T
T F F T F T F
F T T F T F F
F F T T T T T

Problem:-02

Construct the truth table for the compounded proposition p  (q  r )

Solution:-

Since there are three atomic proposition p and q in the given compounded proposition,

therefore there are 23 number of row in the corresponding compounded proposition

i.e TTT, TTF, TFT, FTT, TFF, FTF, FFT, FFF


Truth table for p  (q  r )
p q r qr p  (q  r )
T T T T T
T T F F F
T F T T T
F T T T T
T F F T T
F T F F T
F F T T T
F F F T T

Problem:-03

Construct the truth table for the compounded proposition

( p  q)  (p  q)  ( p  q)  (p  q)

Solution:-

Since there are two atomic proposition p and q in the given compounded proposition,

therefore there are 22 number of row in the corresponding compounded proposition

i.e TT, TF, FT, FF

Truth table for ( p  q)  (p  q)  ( p  q)  (p  q)

p q p q pq p  q p  q p  q
T T F F T F F F
T F F T F F T F
F T T F F T F F
F F T T F F F T

( p  q)  (p  q) ( p  q)  (p  q) ( p  q)  (p  q)  ( p  q)  (p  q)


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

Definition:- "Tautology"

A compounded proposition that is always true, no matter what the truth values of the

proposition that occur in it, is called a tautology.


Note:-

Tautology is also called logically true or universally valid formula

Example:-

(1) Let p be atomic proposition, the negation of p is another atomic proposition, ie. p

Let us consider the compounded propositions p  p , Let us verify for tautology.

p p pvp
T F T
T F T
F T T
F T T

Since all the truth values of  p v p are true, therefore  p v p is a tautology.

(2) Let p be atomic proposition, the negation of p is another atomic proposition, ie. p

Let us consider the compounded propositions p  p , Let us verify for tautology.

p p p  p
T F T
T F T
F T T
F T T

Since all the truth values of p  p are true, therefore p  p is a tautology.

Definition:- "Contradiction"

A compounded proposition that is always false is called a contradiction.

Example:-

(1) Let p be atomic proposition, the negation of p is another atomic proposition, ie. p

Let us consider the compounded propositions p  p ,

Let us verify for tautology.

p p p  p
T F F
T F F
F T F
F T F
Since all the truth values of p  p are false, therefore p  p is a contradiction.

(2) Let p be atomic proposition, the negation of p is another atomic proposition, ie. p

Let us consider the compounded propositions p  p , Let us verify for tautology.

p p p  p
T F F
T F F
F T F
F T F

Since all the truth values of p  p are false, therefore p  p is a contradiction.

Definition:- "Contingency"

A compounded proposition which neither tautology nor contradiction are called

contingency.

Example:-

(1) Let p, q be atomic proposition, the negation of p and q are another atomic propositions,

ie. p and q

Let us consider the compounded propositions p  q , Let us verify for tautology.

p q p q p  q
T T F F F
T F F T F
F T T F F
F F T T T

Since all the truth values of p  q are false as well as true, therefore p  q is a

contingency.

(2) Let p, q be atomic proposition, the negation of p and q are another atomic propositions,

ie. p and q

Let us consider the compounded propositions ( p  q) , Let us verify for tautology.

p q pq ( p  q)
T T T T
T F F T
F T F T
F F F F
Since all the truth values of
contingency.

Definition:-

Let p, q be two compound compositions with 'n' number of variables are said to be

logically equivalent if p and q have same truth values for each one of 2n possible sets of truth

values assigned to p and q.

It is denoted by p  q (or p  q) , i.e p and q are logically equivalent.

Note:-

In other wards the compound proposition p and q are called logically equivalent if p  q is a

Tautology. We can use truth table to prove this result.

Problem:-01

Show that the compound propositions ( p  q) and p  q are logically equivalent.

Proof:-

Let us use truth table to prove that the given propositions are logically equivalent.

Since there only two variables p, q, therefore there 22 rows in the truth table,

i.e TT, TF, FT, FF

p q p q pq ( p  q) p  q
T T F F T F F
T F F T T F F
F T T F T F F
F F T T F T T

Since the last two column truth values are same, therefore the compound propositions

( p  q) and p  q are logically equivalent.

Note:- " Another way of proof"

To prove ( p  q) and p  q are logically equivalent, it is enough to prove that

( p  q)  (p  q) is a tautology.

Since there only two variables p, q, therefore there 22 rows in the truth table,

i.e TT, TF, FT, FF


p q p q pq ( p  q) p  q ( p  q) 
(p  q)
T T F F T F F T
T F F T T F F T
F T T F T F F T
F F T T F T T T

Since all the truth values of last column are True, therefore ( p  q)  (p  q) is a

tautology

Problem:-02

Show that the compounded propositions p  q and p  q are logically equivalent.

Proof:-

Let us use truth table to prove that the given propositions are logically equivalent.

Since there only two variables p, q, therefore there 22 rows in the truth table,

i.e TT, TF, FT, FF

P Q p q pq p  q
T T F F T T
T F F T F F
F T T F T T
F F T T T T

Since the last two column truth values are same, therefore the compound propositions

p  q and p  q are logically equivalent.

Note:- " Another way of proof"

To prove p  q and p  q are logically equivalent, it is enough to prove that

( p  q)  (p  q) is a tautology.

Since there only two variables p, q, therefore there 22 rows in the truth table,

i.e TT, TF, FT, FF

P Q p q pq p  q ( p  q) 
(p  q)
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
Since all the truth values of last column are True, therefore ( p  q)  (p  q) is a

tautology.

Definition:- "Laws of Logic"

A proposition in a compound proposition can be replaced by one that is equivalent to it

without changing the truth value of the compound proposition, by this way we can construct new

laws of logic as follows

Name of the Law Primal form Dual form


Sl.No.
Laws involving conjunction and disjunction
01 Idempotent Law p p  p p p  p
02 Identity Law p F  p p T  p
03 Dominant Law pT  T pF  F
04 Complement Law p  p  T p  p  F
05 Commutative Law pq q p pqq p
06 Associative Law ( p  q)  r  p  (q  r) ( p  q)  r  p  (q  r)
07 Distributive Law p  (q  r)  ( p  q)  ( p  r) p  (q  r)  ( p  q)  ( p  r)

08 Absorption Law p  ( p  q)  p p  ( p  q)  p
Laws involving Negation
09 De Morgan's Law ( p  q)  p  q ( p  q)  p  q

Sl.No. Laws of Conditions


01 p  q  p  q
02 p  q  q  p
03 p  q  p  q
04 p  q  ( p  q)
05 ( p  q)  p  q)
06 ( p  q)  ( p  r)  p  (q  r)
07 ( p  r)  (q  r)  p  q  r
08 ( p  q)  ( p  r)  p  (q  r)
09 ( p  r)  (q  r)  p  q  r

Sl.No. Laws of Bi- Conditions


01 p  q  ( p  q)  (q  p)
02 p  q  p  q
03 p  q  ( p  q)  (p  q)
04 ( p  q)  p  q
Problem:-01

Show that ( p  q)  (r  q)  ( p  r)  q , using laws of logic.

Proof:-

We use the laws of logic and replace the proposition by it equivalent proposition as follows

( p  q)  (r  q)  (p  q)  (r  q)  p  q  p  q Law of Conditions

( p  q)  (r  q)  (p  q)  (r  q)  r  q  r  q Law of Conditions

( p  q)  (r  q)  (p  r)  q (p  q)  (r  q)  (p  r)  q


Distributive Law

( p  q)  (r  q)  ( p  r)  q  ( p  q)  p  q De Morgan's Law

( p  q)  (r  q)  ( p  r)  q  ( p  r)  q  ( p  r)  q Law of Conditions

Hence the result proved.

Note-"Proof by truth table"

Let us use truth table to prove that the given propositions are logically equivalent.

Since there only two variables p, q and r, therefore there 23 rows in the truth table,

i.e TTT, TTF,TFT,FTT, TFF, FTF, FFT, FFF.

p q r pq rq ( p  r) ( p  q)  (r  q) ( p  r)  q
T T T T T T T T
T T F T T T T T
T F T F F T F F
F T T T T T T T
T F F F T T F F
F T F T T T T T
F F T T F T F F
F F F T T F T T

Since the last two column truth values are same, therefore the compounded proposition

( p  q)  (r  q) and ( p  r)  q are logically equivalent.

i.e ( p  q)  (r  q)  ( p  r)  q
Problem:-02

Show that (p  (q  r))  (q  r)  ( p  r)  r , using laws of logic.

Proof:-

We use the laws of logic and replace the proposition by it equivalent proposition as follows

(p  (q  r))  (q  r)  ( p  r)  ((p  q )  r)  ((q  r)  ( p  r))


(p  (q  r))  (p  q )  r Associative Law

(p  (q  r))  (q  r)  ( p  r)  ((( p  q ) )  r)  ((q  r)  ( p  r) )


(p  q)  ( p  q ) De Morgans Law

(p  (q  r))  (q  r)  ( p  r)  (( p  q )  r)  (( p  q)  r)


( p  q )  (q  p) Commutative Law

(p  (q  r))  (q  r)  ( p  r)  (( p  q )  ( p  q))  r


(( p  q )  r)  (( p  q)  r)  (( p  q )  ( p  q))  r Distributive Law

(p  (q  r))  (q  r)  ( p  r)  T  r (( p  q )  ( p  q))  T Complement Law

(p  (q  r))  (q  r)  ( p  r)  r  T T  r  r  T Commutative Law

(p  (q  r))  (q  r)  ( p  r)  r r  T  r Identity Law

Hence the result proved.

Note-"Proof by truth table"

Let us use truth table to prove that the given propositions are logically equivalent.

Since there only two variables p, q and r, therefore there 23 rows in the truth table,

i.e TTT, TTF,TFT,FTT, TFF, FTF, FFT, FFF.

p q r p q (q  r) p  (q  r) (q  r) ( p  r) (p  (q  r))


 (q  r)  ( p  r)
T T T F F F F T T T
T T F F F F F F F F
T F T F T T F F T T
F T T T F F F T F T
T F F F T F F F F F
F T F T F F F F F F
F F T T T T T F F T
F F F T T F F F F F
Since the third and last column truth values are same, therefore the compounded

proposition (p  (q  r))  (q  r)  ( p  r) and r are logically equivalent.

i.e (p  (q  r))  (q  r)  ( p  r)  r

Note:- "Proof of Tautology using laws of logic"

Suppose if we want to prove a given compounded proposition is Tautology using laws of

logic, it is enough to prove that the given compounded proposition is equivalent to T logically.

For example, if want to say ( p  (q  r))  (( p  q)  ( p  r)) is a tautology , it is

enough to prove ( p  (q  r))  (( p  q)  ( p  r))  T using logical laws

Problem:-01

Show that (( p  q)  (p  (q  r)))  (p  q)  (p  r) is a tautology. using

the laws of logic.

Proof:-
We use the laws of logic and replace the proposition by it equivalent proposition as follows

Since (q  r)  q  r De Morgan's Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  q)  (p  (q  r)))  (p  q)  (p  r)

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  q)  (p  (q  r)))  (p  q)  (p  r)

Since p  (q  r)  ( p  (q  r)) De Morgan's Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  q)  (( p  (q  r))))  (p  q)  (p  r)

Since (( p  (q  r)))  p  (q  r) Law of Negation

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  q)  ( p  (q  r)))  (p  q)  (p  r)

Since ( p  (q  r))  ( p  q)  ( p  r) Distributive Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  q)  ( p  q)  ( p  r))  (p  q)  (p  r)
Since ( p  q)  ( p  q)  p  q Idempotent Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  q)  ( p  r))  (p  q)  (p  r)

Since ( p  (q  r))  ( p  q)  ( p  r) Distributive Law

Since ( p  q)  p  q De Morgan's Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  (q  r))  ( p  q)  (p  r)

Since ( p  r)  p  r De Morgan's Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  (q  r))  ( p  q)  ( p  r)

Since ( p  q)  ( p  r)  (( p  q)  ( p  r)) De Morgan's Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)


 (( p  (q  r))  (( p  q)  ( p  r))

Since ( p  (q  r))  ( p  q)  ( p  r) Distributive Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)  (( p  (q  r))  ( p  (q  r))

Since ( p  (q  r))  ( p  (q  r))  T Complement Law

(( p  q)  (p  (q  r)))  (p  q)  (p  r)  T

Hence the result.

Definition:- "Tautologically imply"

A compound proposition 'p' is said to be tautologically imply (or simply imply) the

compound proposition 'q', if q is true whenever p is true.

It is denoted by p=>q, ie. p tautologically imply q

Note:-

In other words, p is said to be tautologically imply q if and only if p->q is a tautology.


Problem:-01

Prove the following implication p  (q  r)  ( p  q)  ( p  r)

Proof:-

Let us prove the implication by using truth table

Since there only two variables p, q and r, therefore there 23 rows in the truth table,

i.e TTT, TTF,TFT,FTT, TFF, FTF, FFT, FFF. It is enough to prove that

( p  (q  r))  (( p  q)  ( p  r)) is a tautology.

p q r qr pq pr p  ( p  q) ( p  (q  r))


(q  r)  ( p  r) 
(( p  q)  ( p  r))
T T T T T T T T T
T T F F T F F F T
T F T T F T T T T
F T T T T T T T T
T F F T F F T T T
F T F F T T T T T
F F T T T T T T T
F F F T T T T T T

Since all the truth values of the last column are true, therefore given implication

( p  (q  r))  (( p  q)  ( p  r)) is a tautology .

Hence p  (q  r)  ( p  q)  ( p  r) .

Problem:-02

Prove that (( p  q)  r) does not tautologically imply s


Proof:-

Let us prove the result by using truth table

Since there only two variables p, q, r and s, therefore there 24 rows in the truth table,

i.e TTTT, TTFT,TFTT,FTTT, TFFT, FTFT, FFTT, FFFT, TTTF, TTFF,TFTF,FTTF, TFFF, FTFF, FFTF, FFFF

It is enough to prove that (( p  q)  r)  s is not a tautology.


p q r s pq ( p  q)  r (( p  q)  r )  s
T T T T T T T
T T F T T F T
T F T T F T T
F T T T T T T
T F F T F T T
F T F T T F T
F F T T T T T
F F F T T F T
T T T F T T F
T T F F T F T
T F T F F T F
F T T F T T F
T F F F F T F
F T F F T F T
F F T F T T F
F F F F T F T

Since all the truth values of the last column are not true, therefore (( p  q)  r)  s is

not a tautology .

Hence (( p  q)  r) does not tautologically imply s.

Problem :-03

Prove the following implication without using truth table

( p  q)  ( p  r )  (q  r)  r

Proof:-

Let us use the laws of logic to prove the result.

It is enough to prove ( p  q)  ( p  r)  (q  r)  r is a tautology.

i.e It is enough to prove ( p  q)  ( p  r)  (q  r)  r  T

Since ( p  r)  (q  r)  ( p  q)  r Law of conditional

( p  q)  ( p  r)  (q  r)  r  ( p  q)  (( p  q)  r)  r

Since ( p  q)  r   ( p  q)  r Law of conditional

( p  q)  ( p  r)  (q  r)  r  ( p  q)  (( p  q)  r)  r
Since ( p  q)  (( p  q)  r)  ( p  q)  ( p  q)  ( p  q)  r Distributive Law

( p  q)  ( p  r)  (q  r)  r  ( p  q)  ( p  q)  ( p  q)  r  r

Since ( p  q)  ( p  q)  F Complement Law

( p  q)  ( p  r)  (q  r)  r  F  ( p  q)  r  r

Since ( p  q)  F  ( p  q) Identity Law

( p  q)  ( p  r)  (q  r)  r  ( p  q)  r  r

Since ( p  q)  r  r  (( p  q)  r )  r Law of Conditional

( p  q)  ( p  r)  (q  r)  r  (( p  q)  r)  r

Since ( p  q)  r  ( p  r)  (q  r ) Distributive Law

( p  q)  ( p  r)  (q  r)  r  (( p  r)  (q  r) )  r

Since (( p  r)  (q  r))  ( p  r)  (q  r ) De Morgan's Law

( p  q)  ( p  r)  (q  r)  r  (( p  r)  (q  r))  r

Since (( p  r)  (q  r ))  r  (( p  r)  r)  ((q  r)  r) Distributive Law

( p  q)  ( p  r)  (q  r)  r  (( p  r)  r)  ((q  r)  r)

Since ( p  r)  p  r & (q  r)  q  r De Morgan's Law

( p  q)  ( p  r)  (q  r)  r  (p  r  r)  (q  r  r)

Since r  r  T Complemet Law

( p  q)  ( p  r)  (q  r)  r  (p  T )  (q  T )

Since p  T  T & q  T  T Dominent Law

( p  q)  ( p  r)  (q  r)  r  (T )  (T )

Since T  T  T Dominent Law


( p  q)  ( p  r)  (q  r)  r  T

Hence the result.


Definition:- "Theory of Inference"
Inference theory is concerned with inferring of a conclusion from certain hypothesis (or
basic assumption or premises) by applying certain rules of inference (or principles of reasoning)
i.e A conclusion C is said to follow from a set of premises {H1, H2, ...... Hn} if
{H1  H 2  ......  H n }  C .
Note:-
{H1  H 2  ......  H n }  C means that if we know H1 is true, H2 is true, ....., and Hn is true,
then we can conclude that C is true.
Definition:- "Formal Proof"
When a conclusion is derived from a set of premises by using rules of inference, the
processes of such derivation is called a formal proof.
Definition:- "Argument"
The rules of inferences are only means used to draw a conclusion from a set of premises in a
finite sequence of steps, called argument.
Definition:-"Valid Conclusion"
Any conclusion which is arrived at by using rules of inference is called a valid conclusion. The
corresponding argument is called valid argument.
Note:-
(i) The actual truth value of the premises and conclusion do not play any part in the
determination of the validity of the argument.
(ii) However if the premises are believed to be true and if the proper rules of inference are
used, then the conclusion may be expected to be true.
Definition:- "Truth Table Technique"
The method of determining whether the conclusion C logically follows from the given set of
premises {H1, H2, ..... Hn} by constructing the relevant truth table is called Truth table technique.

Problem:-01
If H1: p H2: p  q , C: q, then verify whether the Conclusion C follow from the set of
premises {H1, H2}. Using truth table technique.
Solution:-
Let us use write the truth table as follows
Given premises H1: p H2: p  q

Given conclusion C: q
Since there are only two variables p and q , therefore there are 22 rows in the truth table.
i.e TT, TF, FT, FF
P q (C) p (H1) pq (H2)
T T F T
T F F T
F T T T
F F T F

Premises H1 and H2 both are true in third row, and case C is also true in third row. Therefore
the Conclusion C follows from the set of premises {H1,H2} . Hence we say that C is a valid conclusion.

Problem:-02
If H1: p  q H2: q, C: p, then verify whether the Conclusion C follow from the set of

premises {H1, H2}. Using truth table technique.


Solution:-
Let us use write the truth table as follows
Given premises H1: p  q H2: q,
Given conclusion C: p
Since there are only two variables p and q , therefore there are 22 rows in the truth table.
i.e TT, TF, FT, FF
P (C) Q (H2) pq (H1)
T T T
T F F
F T T
F F T

Premises H1 and H2 both are true in first and third row, and conclusion C true in first row but
false in third row.
Therefore the Conclusion C does not follows from the set of premises {H1,H2} .
Hence we say that the conclusion C is not valid conclusion.

Note:-
The truth table technique may becomes tedious, if the premises contain a large number of
variables.
Definition:- "Rules of Inference"
There are three rules of inferences which are called rule p, rule T and rule CP.

Rule P: A premises may be introduced at any step in the derivation

Rule C: We may introduce a formula S in a derivation if S is a tautology implied by any one or more
of the proceedings formulae in the derivation.

Rules of Inference
Rule in tautological form Name of the rule
pq p Simplification
pq q
p pq Addition
q pq
(( p)  (q))  p  q Conjunction

( p  ( p  q))  q Modus ponens

(q  ( p  q))  p Modus Tollens

(( p  q)  (q  r))  ( p  r) Hypothetical Syllogism

(( p  q)  p)  q Disjunctive Syllogism

(( p  q)  (p  r))  q  r Resolution

(( p  q)  ( p  r)  (q  r))  r Dilemma

( p  r)  (q  r)  p  q  r

Problem:-01
Demonstrate that S is a valid inference from the premises p  q, q  r, s  p, and r

Solution:-

Step no. Statement Reason


(1) q r Rule P,

(2) r Rule p,

(3) q Rule T, (1), (2), Disjunctive Syllogism (q  r)  r  q

(4) p  q Rule P,
(5) q  p Rule T, (4), ( p  q)  q  p  q  p

(6) p Rule T, (3) , (5), Modus ponens


q  (q  p)  q  q  p  F  p  p

(7) s  p Rule P,

(8) p  s Rule T, (7), (s  p)  p  s  p  s

(9) s Rule T, (6), (8), Modus ponens

p  (p  s)  p  p  s  (p  p)  s  F  s  s

Hence s is a valid conclusion from the premises p  q, q  r, s  p, and r

Problem:-02
Show that q, p  q  p
Solution:-

It is enough to show that p is a valid conclusion from the premises q, p  q

Step no. Statement Reason

(1) pq Rule P,

(2) q  p Rule T, (1), p  q  q  p

(3) q Rule P,

(4) p Rule T, (2), (3), Modus ponens


q  (q  p)  q  q  p  q  q  p  F  p  p

Hence p is a valid conclusion from the premises q, p  q .

Problem-03

Show that r v s is a valid conclusion from the premises c  d , c  d  h, h  a  b,


and a  b  r  s .

Solution:-

Step no. Statement Reason

(1) cd Rule P,

(2) c  d  h Rule P,
(3) h Rule T,(1), (2), Modus ponens

c  d  (c  d  h)  (c  d) (c  d)  h  F  h  h

(4) h  a  b, Rule P

(5) a  b Rule T, (3), (4), Modus ponens

h  ( h  a  b)  h   h  (a  b)  h  h  (a  b)  a  b

(6) a  b  r  s Rule P,

(7) rvs Rule T, (5), (6), Modus ponens

(a  b)  ( (a  b)  r  s)  (a  b)  (a  b)  (r  s)  r  s

Hence r v s is a valid conclusion from the premises c  d , c  d  h, h  a  b,


and a  b  r  s .

Problem-04

Show that {( p  q)  (r  s), (q  t)  (s  u), (t  u), p  r}  p .

Solution:-

Step no. Statement Reason

(1) ( p  q)  (r  s) Rule P

(2) pq Rule T, (1), Simplification, ( p  q)  (r  s)  p  q

(3) rs Rule T, (1), Simplification, ( p  q)  (r  s)  r  s

(4) (q  t)  (s  u) Rule P

(5) qt Rule T, (4), Simplification, (q  t )  (s  u)  q  t

(5) su Rule T, (4), Simplification, (q  t)  (s  u)  s  u

(6) pt Rule T, (2), (5), Hypothetical syllogism

(( p  q)  (q  t))  p  t

(7) r u Rule T, (3), (5), Hypothetical syllogism

((r  s)  (s  u))  r  u

(8) pr Rule P,


(9) pu Rule T, (8), (3), Hypothetical syllogism

(( p  r)  (r  u))  p  u

(10) u  p Rule T, (9), p  u  u  p

(11) t  p Rule T, (6), p  t  t  p

(12) (u  t)  p Rule T, (10), (11), Dilemma

(u  p)  (t  p)  ((u  t)  p)

(13) (u  t)  p Rule T, (12), De Morgan's Law (u  t)  u  t

(14) (t  u)  p Rule T, (13), Commutative Law u  t  t  u

(15) (t  u) Rule P,

(16) p Rule T, (15), (14), Modus ponens

(t  u)  ((t  u)  p)  (t  u)  (t  u)  p  p

Thus p is a valid conclusion derived from the set of premises

( p  q)  (r  s), (q  t )  (s  u), (t  u), p  r

Hence we proved {( p  q)  (r  s), (q  t)  (s  u), (t  u), p  r}  p .

Problem:- 05

Show that if p  q, q  r, ( p  r), and p  r, then r

Proof:-

It is enough to prove that { p  q, q  r, ( p  r), p  r}  r

Step no. Statement Reason

(1) pq Rule P

(2) qr Rule P

(3) pr Rule T, (1), (2), ( p  q)  (q  r)  ( p  r)

(4) p  r Rule T, (3), p  r  p  r

(5) pr Rule P

(6) ( p  p)  r Rule T, (4), (5), Distributive law


(p  r)  ( p  r)  (p  p)  r
(7) r Rule T, (6), Complement & Identity Law
( p  p)  r  F  r  r
Even though we derived r, we have not used the premises ( p  r)
(8) ( p  r) Rule P

(9) p  r Rule T, (8), De Morgan's Law ( p  r)  p  r

(10) r  (p  r) Rule T, (7), (8)

(11) (r  p)  (r  r) Rule T, (10), Distributive Law

(12) (r  p)  F Rule T, (11), Complement Law r  r  F

(13) (r  p) Rule T, (12), (r  p)  F  (r  p)

(14) r Rule T, (13), Simplification, r  p  r

Thus r is a valid conclusion derived from the set of premises

p  q, q  r, ( p  r), p  r

Hence we proved { p  q, q  r, ( p  r), p  r}  r

Rule CP:

If a formula 's' can be derived from another formula 'r' and a set of premises (p), then the
proposition ( r  s ) can be derived from the set of premises (p) alone.
i.e ( p  r)  s  p  (r  s)

Problem:-01

Derive p  (q  s) using the CP rule (if necessary) from the premises p  (q  r) and
q  (r  s)

Solution:-

We have to prove { p  (q  r), q  (r  s)}  p  (q  s) , using CP rule

Let us assume p as additional premises ,

Using p and other two given premises p  (q  r), q  (r  s) , we will derive

(q  s) . Then by CP rule, the required conclusion have been derived from the two given premises.
Step no. Statement Reason

(1) p Rule P

(2) p  (q  r) Rule P

(3) qr Rule T, (1), (2), Modus ponens

p  ( p  (q  r))  p  p  (q  r)  (q  r)

(4) q  r Rule T, (3), q  r  q  r

(5) q  (r  s) Rule P

(6) q  (r  s) Rule T, (5), q  (r  s)  q  (r  s)

(7) q  (r  (r  s)) Rule T, (4), (6), Distributive law

(q  r)  (q  (r  s))  (q  r)  (q)  (q  r)  (r  s)


 (q  r)  (q  q)  r  (r  s)
 (q  r)  (q)  r  (r  s) Idempotent Law
 (q  r)  (q  r)  (r  s)
 q  (r  (r  s)) Idempotent Law

(8) q  (s) Rule T, (7), modus ponens


r  (r  s)  r  r  s  T  s  s

(9) qs Rule T, (8), q  s  q  s

(10) p  (q  s) Rule CP, (9).

Thus p  (q  s) is a valid conclusion from the set of premises p  (q  r) and

q  (r  s) .

Definition:- "Inconsistent premises"

A set of premises {H1, H2, ... Hn} is said to be inconsistent if their conjunction implies a

contradiction. i.e H1 , H 2 ,.....H n  R  R for some R. where R  R  F

Definition:- "Consistent"

A set of premises is said to be consistent if it is not inconsistent.


Problem:-01

Prove that the premises p  q, q  r, s  r, and p  s is inconsistent

proof:-

To prove the given premises are inconsistent , we have derive a contradiction by using the

given premises.

Step no. Statement Reason

(1) pq Rule P

(2) q  r Rule P

(3) pr Rule T, (1), (2), Hypothetical syllogism

( p  q)  (q  r)  p  r

(4) s  r Rule P

(5) r  s Rule T, (4), s  r  r  s

(6) q  s Rule T, (2), (5) ), Hypothetical syllogism

(q  r )  (r  s)  q  s

(7) q  s Rule T, (6), q  s  q  s

(8) (q  s) Rule T, (7), De Morgans Law (q  s)  q  s

(9) qs Rule P

(10) F Rule T, (8), (9), Complement Law


(q  s)  (q  s)  F

Thus we have derived a contradiction using the given set of premises,

Hence the given set of premises are inconsistent.

Definition:- "Indirect Method of Proof"

In order to show that the conclusion C follow from the set of premises {H1, H2, .... Hn} by

Indirect method of proof, it is also called proof by contradiction or reduction and absurdum.
"Procedure of Indirect Method of proof"

Step:-01

We assume that C is false and include C as an additional premises

Step:-02

Let us prove that the new set of premises{H1, H2,....Hn, C } is inconsistent

Step:-03

So the assumption that C is true does not hold good, hence C is true whenever

{H1, H2,....Hn} is true, i.e the conclusion C follows from the set of premises {H1, H2, ....Hn}

Problem:-01

Use the indirect method to show that {r  q, r  s, s  q, p  q}  p

Proof:-

Let us assume p  p true include p as additional premises

Now we have to prove the premises {r  q, r  s, s  q, p  q, p} is inconsistent,

i,e we have to prove the conjunction of premises {r  q, r  s, s  q, p  q, p}

implies a contradiction (F).

Step no. Statement Reason

(1) p Rule P

(2) pq Rule P

(3) q Rule T, (1), (2), Modus ponens


p  ( p  q)  p  p  q  F  q  q

(4) r  q Rule P

(5) s  q Rule p

(6) r  s  q Rule T, (4), (5), Dilemma

(r  q)  (s  q)  (r  s  q)

(7) rs Rule P

(8) q Rule T, (7), (6), (r  s)  (r  s  q)  q


(9) q  q Rule T, (3), (8), Contradiction

(10) F Rule T, Complement Law q  q  F

Thus {r  q, r  s, s  q, p  q, p} implies a contradiction.

i.e Our assumption that p  p true is wrong.

Hence {r  q, r  s, s  q, p  q}  p

Problem:-02

Using indirect method of proof, derive p  s from the premises

p  (q  r), q  p, s  r, p

Proof:- 
Let us assume ( p  s)  (p  s)  p  s is true include p  q as additional

premises

Now we have to prove the premises { p  (q  r), q  p, s  r, p, p  q }is

inconsistent,

i,e we have to prove the conjunction of premises p  (q  r), q  p, s  r, p, p  q

implies a contradiction (F).

Step no. Statement Reason

(1) ps Rule P

(2) p  (q  r) Rule P

(3) p Rule p

(4) q r Rule T, (1), (2), modus ponens

p  ( p  (q  r))  p  (p  (q  r))


 p  p  (q  r)  F  (q  r)  (q  r)

(5) s Rule T, (1), Simplification

(6) s  r Rule P

(7) r Rule T, (5), (6), Modus ponens


(8) q Rule T, (4), (7),

(q  r)  r  q  r  r  q  F  q

(9) q  p Rule P

(10) p Rule T, (8), (9), Modus ponens,

q  (q  p)  q  (q  p)  (q  q)  p  F  p  p

(11) p  p Rule T, (3), (10)


(12) F Rule T, Complement Law p  p  F

Thus
{ p  (q  r), q  p, s  r, p, p  q } implies a contradiction.

i.e Our assumption that ( p  s)  (p  s)  p  s is true is wrong.

Hence { p  (q  r), q  p, s  r, p}  p  s

Definition:- "Predicate"

The sentences "x<9", neither true nor false, when the values of the variables are not

specified. The variable x is called subject of the sentence, and "<9" is refers to the property that the

subject can have, is called the predicate.

We can denote "x<9" by P(x), where P denote the predicate and x is a variable.

Definition:- "Propositional function"

A sentence of the form P(x1, x2, ... xn) is the value of the propositional function P at the n-

tuple (x1, x2, ... xn), and P is also called a predicate.

P(x) is called propositional function at x.

Definition:- "Predicate Calculus"

The logic based on the analysis of predicates in any sentence is called predicate calculus or

predicate logic.

Note:-

Once a value has been assigned to a variable x, then the sentence P(x) becomes a

proposition and has a truth values.

Example:-

(1) if P(x) denote the sentence "x<9" and

Suppose if x=5, then P(5) is true (T).

Suppose if x=10, then P(10) is False (F).

(2) If P(x,y) denote the sentence "x+y=5" and

Suppose if x=2 and y=3, then P(2,3) is true(T)

Suppose If x=0 and y=1, then P(0,1) is false(F)

(3) If P(x,y,z) denote the sentence "x+y=z" and


Suppose if x=1, y=2 and z=3, then P(1,2,3) is true (T)

Suppose if x=0, y=2 and z=3, then P(0,2,3) is false(F)


Definition:-"Quantification"

The way of changing propositional functions into propositions, called quantification.

There are two types of quantification, namely universal quantification and existential

quantification.

Definition:-" Universe of Discourse"

Many mathematical sentences assert that a property is true for all values of a variable in a

particular domain, such a domain is called the universe of discourse.

Definition:-"Universal Quantification"

The universal quantification of P(x) is a proposition that if P(x) is true for

all values of x in the universe of discourse. Universal quantification of P(x) is denoted by xP( x) .

It is also denoted by " for all x, P(X)" or "for every x, P(x)".

Example:-

Express the statement "Every students in class has studied calculus"

Let P(x) denote the sentence that "x has studied calculus", then the quantification

xP( x) where the set of all students is the universe of discourse.

I.e xP( x) is "Every students has studied calculus"

Note:-

When all the element in universe of discourse can be listed like x1, x2, ... xn, then the truth

value of the universal quantification is given by P(x1)  P(x2)  ....... P(xn).

i.e The truth value of P(x1)  P(x2)  ......  P(xn) is true if and only if P(x1), P(x2), .... P(xn) are

all true.

Problem:-01

What is the truth value of the statement xP( x) where P(x) is the sentence that "x2<10"

and universe of discourse consist of positive integer not exceeding 4?.

Solution:-

Given P(x) is a sentence that "x2<10", where the universe of discourse is set of all positive
integer not exceeding 4 . i.e {1,2,3,4}

xP( x) is the sentence that "for all x, x2<10", where x lies in {1,2,3,4}.

P(1) is true , since "12<10"

P(2) is true, since "22<10"

P(3) is true, since "32<10"

P(4)is false, since "42>10"

Therefore P(1)  P(2)  P(3)  P(4) is false

Hence the truth vale of xP( x) is false.

Problem :-02

Find the truth value of x, y, P( x, y) , where P(x,y) is the sentence that ""x+y=y+x", where

universe of discourse is the set of all real numbers x and y.

Solution:-

Let P(x,y) be the sentence that "x+y=y+x", then

x, y, P( x, y) is the sentence that "for all real number x and y, x+y=y+x"

Since P(x) is true for all real number x and y.

Therefore the truth value of x, y, P( x, y) is true

Problem:-03

If Q(x) be the sentence that "x<2" , then find the truth values xQ( x) where the set of all

real numbers is the universe of discourse.

Solution:-

i.e xQ( x) is "for all real number x, x<2"

since Q(3) is not less than 2.

Clearly Q(x) is not true for all real number.

Therefore the truth value of xQ( x) is false


Problem:-04

Let P(x) be the sentence that "x+1>x', find the quantification xP( x) where the set of all

real numbers is the universe of discourse .

Solution:-

i.e xP( x) is "for all real number x, x+1>x" ,

Since P(x) is true for all real number x, therefore the truth value of universal

quantification xP( x) is true (T).

Problem:-05

Let P(x,y) be the sentence that "x+y=y+x", then find the truth value of x, y, P( x, y)

Solution

x, y, P( x, y) is the sentence that "for all real number x and y, x+y=y+x"

Since P( x, y) is true for all real number x and y.

Therefore the truth value of x, y, P( x, y) is true

Definition:- "Existential Quantification "

The existential quantification of P(x) is the sentence that "There exist an element x in the

universe of discourse such that P(x) is true".

we denote the existential quantification by xP( x)

Note:-

The existential quantification is also expressed " There is an x such that P(x)" or "There is at

least one x such that P(x)" or "For some x, P(x)".

Problem:-01

Let P(x) denote the sentence that "x>3" . What is the truth value of the quantification

xP( x) , where the universe of discourse is the set of real numbers?

Solution:-

xP( x) is the sentence that "for some x, x>3"


Since P(x) is true when x=4, therefore the existential quantification of P(x) is true

i.e the truth value of xP( x) is true.

Problem:-02
Let Q(x) be the sentence that ""x=x+1" , What is the truth value of the quantification

xQ(x) where the universe of discourse is the set of real number?

Solution:-

xQ(x) is the sentence that "for some x, x=x+1"

Since Q(x) is false for all real number x, therefore the existential quantification of Q(x) is false

for all x. i.e the truth value of xQ(x) is false.

Note:-

When all the element in universe of discourse can be listed like x1, x2, ... xn, then the truth

value of the existential quantification is given by P(x1)  P(x2)  ......  P(xn).

i.e The truth value of P(x1)  P(x2)  ......  P(xn) is true if and only if at least one of P(x1),

P(x2), ....P(xn) is true.

Problem:-02

What is the truth value of the statement xP( x) where P(x) is the sentence that "x2<10"

and universe of discourse consist of positive integer not exceeding 4?.

Solution:-

Given P(x) is a sentence that "x2<10", where the universe of discourse is set of all positive

integer not exceeding 4 . i.e {1,2,3,4}

xP( x) is the sentence that "for some x, x2<10", where x lies in {1,2,3,4}.

P(1) is true , since "12<10"

P(2) is true, since "22<10"

P(3) is true, since "32<10"

P(4)is false, since "42>10"


Therefore P(1)  P(2)  P(3)  P(4) is True

Hence the truth vale of xP( x) is True.

Problem:-03

Let P(x,y) be the sentence that "x+y=y+x", what is the truth value of the quantification

x, y, P( x, y) ?, where the universe of discourse is the set of all real numbers.

Solution:-

x, y, P( x, y) is the sentence that " for all x and y, x+y=y+x"

Since P(x,y) is true for all real number x and y.

Therefore truth value of x, y, P( x, y) is true.

Problem:-04

Let Q(x,y) be the sentence that "x+y=0", what is the truth values of the quantifications

(i) y, x, Q(x, y) and (ii) x, y, Q(x, y)

Solution:-

Given Q(x,y) be the sentence that "x+y=0",

Solution of (i)

y, x, Q(x, y) be the sentence that " There is a real number y, for every real

number x such that x+y=0"

Suppose if y=1 and x= -1, then x+y=0 is true

Suppose if y=1 and x=0, then x+y=0 is not true.

i.e when y is chosen , there exist only one value of x such that x+y=0 is true, for all other

values of x , x+y=0 is false.

Therefore the truth value of y, x, Q(x, y) is false.

Solution of (ii)

x, y, Q(x, y) be the sentence that "For every real number x, there exist real number y

such that x+y=0"


Suppose if x=1, then there exist a real number y =-1 such that x+y=0.

i.e For every real number x, there exist a real number y=-x such that x+y=0 is true.

Therefore the truth value of x, y, Q(x, y) is True.

Problem:-05

Let Q(x,y,z) be the sentence that "x+y=z" . What are the truth values of sentences

(i) x, y, zQ(x, y,, z) and (ii) z, x, y, Q(x, y,, z)

Solution:-

Given Q(x,y,z) be the sentence that "x+y=z"

Solution of (i)

x, y, zQ(x, y,, z) is the sentence that "For every x, For every y, There exist a real

number z such that x+y=z"

suppose if x=1 and y=2, then there exist a real number z=3

i.e For every real number x and y , there exist at least one real number z such that x+y=z.

Therefore the truth value of x, y, zQ(x, y,, z) is True.

Solution of (ii)

z, x, y, Q(x, y,, z) is the sentence that " There exist a real

number z , For every x, For every y, such that x+y=z"

Suppose if z=1 and x =0, y=1, then x+y=z is true

Suppose if z=1 and x=1 , y=1, then x+y=z is false

i.e For a chosen number z, only one set of values of x and y satisfies x+y=z. The other values

of x and y does not satisfies x+y=z.

Therefore the truth value of z, x, y, Q(x, y,, z) is false.

Definition:- "Negation of a quantified expression"

Let P(x) be sentence , then

(i) xP(x)  xP( x)  P( x1 )  P( x2 )  ...... P( xn ) and


(ii) xP(x)  xP(x)  P(x1 )  P(x2 )  .......  P( xn )

Definition:- "Equivalence Formulae"

(i) Since p  p  T , similarly xP(x)  xP( x)  T

(ii) Since p  p , similarly P(x)  P(x)

(iii) Since p  q  q  p , similarly P(x)  Q( x, y)  Q(x, y)  P( x)

(iv) Since p  q  p  q , similarly P(x)  Q(x, y)  P(x, y)  Q(x, y)

Definition:- "Rules of Inference Theory of Predicate Calculus"

There are three basic rules P, T and CP in inference used in derivation of conclusion, This

rules can also be in predicate calculus.

Apart from the above rules of inference,

(i) If it becomes necessary to eliminate quantifiers during the course of derivation, we

require two rules of specification called US and ES rules.

(ii) If it becomes necessary to quantify the desired conclusion, we require two rules of

generalisation, called UG and EG rules.

Rule US (Universal Specification)

Universal specification is the rule of inference which states that one can conclude that P(c) is

true, if  x P(x) is true, where c is the arbitrary member(not a specified member) of the universe of

discourse.

This rule is also called universal instantiation.

Rule ES (Existential Specification)

Existential specification is the rule which allows us to conclude that P(c) is true, if  x, P(x) is

true, where c is not an arbitrary member of the universe of discourse, but one for which P(c) is true.

This rule is also called existential Instantiation.


Rule EG (Universal Generalisation)

Universal generalisation is the rule which states that  x P(x) is true, if P(c) is true when c is

an arbitrary member (not a specified member) of the universe of discourse.

Rule EG (Existential Generalisation)

Existential generalisation is the rule that is used to conclude that  x, P(x) is true when P(c)

is true, where c is particular member of the universe of discourse.

Example:-

Let us consider the following "Famous Socrates Argument" which is given by

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

Let us use the notation

H(x): x is a man , i.e all men means  x H(x)

M(x): x is a mortal, i.e all are mortal  x M(x)

s : Socrates, i,e Socrates is a man H(s), Socrates is a mortal means M(s).

The problem becomes  x(H(x)->M(x))  H(s)  M(s).

Proof of above :-

Step No. Statement Reason

01  x(H(x)->M(x)) Rule P

02 H(s)->M(s) Rule US, (1), x=s is a specific member

03 H(s) Rule P

04 M(s) Rule T, (4), (3), Modus Ponens

H (s)  H (s)  M (s)  H (s)  (H (s)  M (s))


 H (s)  H (s)  M (s)
 F  M (s)  M (s)

Thus the conclusion M(s) is derived from the given premises {  x(H(x)->M(x)),H(s)}

Hence we have proved  x(H(x)->M(x))  H(s)  M(s).


Problem:-02

Show that the premises "one student in this class knows how to write programs in JAVA"

and " Everyone who knows how to write programs in JAVA " and "Everyone who knows how to

write programs in JAVA can get a high -paying job" imply the conclusion that "some one in this class

can get a high paying job".

Solution:-

Let C(x) be the sentence that "x is in class"

Let J(x) be the sentence that "x knows JAVA"

Let H(x) be the sentence that "x can get a high paying job"

Therefore the given premises are " x(C(x)  J (x)) ", " x(J (x)  H (x)) "

and the conclusion is " x(C(x)  H (x)) "

We have prove that { x(C(x)  J (x)) , x(J (x)  H (x)) }  x(C(x)  H (x))

Let derive the conclusion as follow

Step No. Statement Reason

01 x(C(x)  J (x)) Rule P

02 C(a)  J (a) Rule ES, (1), 'a' is a particular student

03 C(a) Rule T, (02), Simplification p  q  p

04 J (a) Rule T.(02), Simplification p  q  q

05 x(J (x)  H (x)) Rule P

06 J (a)  H (a) Rule US, (05),

07 H (a) Rule T, (4), (6), Modus ponens, p  ( p  q)  q

08 C(a)  H (a) Rule T, (3), (7), Conjunction

09 x(C(x)  H (x)) Rule EG, (8)

Thus the conclusion x(C(x)  H (x)) is derived from the premises { x(C(x)  J (x)) ,
x(J (x)  H (x)) }. ( p  q)
are false
Hence we have proved { premises as well as
x(C(x)  J (x)) , x(J (x) true,
{x(P(x)  (Q( y)  R(x)), xP(x)}
 H (x)) }  x(C(x)  therefore
H (x)) ( p  q)
Hence we have proved {x(P(x)  (Q( y) 
Problem:-03
R(x)), xP(x)}  Q(y)  x(P(x)  R(x))

Prove that {x(P(x) 


(Q( y)  R(x)), xP(x)}
 Q(y)  x(P(x) 
R(x))

Proof:-

Given premises are


x(P(x)  (Q( y) 
R(x)), xP(x)

Conclusion is Q(y) 
x(P(x)  R(x))

Let us derive the conclusion


from the given premises as
follows

Step No. Statement Reason

(1) x(P(x)  (Q( y)  R(x)) Rule P

(2) P(z)  (Q( y)  R(z)) Rule US, (1) , z is a particular member

(3) xP(x) Rule P

(4) P(z) Rule ES, (3)

(5) Q( y)  R(z) Rule T, (4), (2), Modus ponens

p  ( p  q)  q

(6) Q( y) Rule T, (5) , Simplification p  q  p

(7) R(z) Rule T, (5), Simplification p  q  q

(8) P(z)  R(z) Rule T, (4), (7), Conjunction

(9) x(P(x)  R(x)) Rule EG, (8)

(10) Q( y)  x(P(x)  R(x)) Rule T, (6), (9), Conjunction

Thus the conclusion Q( y)


 x(P(x)  R(x)) is
derived from the given
TEXT BOOKS:
1. Discrete Mathematics , M.K. Venkataraman, The National Publishing Company
REFERENCES BOOKS:
1. Discrete Mathematical Structures with Applications to Computer Science J.P. Trembly
and Manohar, TataMcGraw-Hill Publications
2. Elements of Discrete Mathematics, Liu, Tata Mac Graw Hill,
3. Kolman B,Busby R.C.and Ross S., Discrete Mathematical Structures for Computer
Science, Fifth Edition, Prentice Hall of India, New Delhi, 2006.

You might also like