0% found this document useful (0 votes)
10 views18 pages

1. Propositions Logic and Predicates

The document provides an overview of propositional logic, including definitions, types of propositions, and logical connectives such as conjunction, disjunction, and negation. It explains how to construct truth tables and the applications of propositional logic in translating English sentences and designing logic circuits. Additionally, it discusses logical equivalence and the concept of contingency in propositions.

Uploaded by

saifuce1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views18 pages

1. Propositions Logic and Predicates

The document provides an overview of propositional logic, including definitions, types of propositions, and logical connectives such as conjunction, disjunction, and negation. It explains how to construct truth tables and the applications of propositional logic in translating English sentences and designing logic circuits. Additionally, it discusses logical equivalence and the concept of contingency in propositions.

Uploaded by

saifuce1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

1 Propositional logic and Predicates

Propositional Logic
Note:
Introduction: y Factual statements are part of the
It has a large amount of applications in “set of all English statements” which
mathematics. It is used to prove theorems. is used to conclude something. These
Every theorem consists of various statements factual statements in mathematical
which ultimately reach a conclusion. To logic are called proportional logic.
check the validation of these statements, y Factual statements are facts which
logic is required. Mathematical logic tells us have only two cases yes(true)/no(false)
whether the statement is valid or not. Now, y Any question, command exclamation,
the question that may arise is, from where vague reference will never be a
do all these statements come from? So, all proposition.
these statements come from a set of all
English statements.
1. Which of the following is/are not
proposition?
(A) x + 2 = 5
Factual statement
(B) He is tall
(C) Today is Monday
Set of all
English statement (D) Tomorrow will be rain
Fig. 1.1 Solution: (A), (B), (C), (D)

Definition
Rack Your Brain
Proposition: Proposition is a logical
statement which can be true or false but Is “Read this carefully” a proposition?
not both.
e.g: 1. 2 + 2 = 4 Atomic and compound proposition:
2. 'C' is a vowel The Propositional statement is of two types
1. Compound propositional statement
2. Atomic propositional statement

Breakable Non-breakable

Compound propositional Simple/atomic propositional


statement statement
Fig. 1.2

Propositional logic and Predicates 5


Statements that are constructed by Two propositional variables have 22 = 4 truth
combining one or more factual statements, combinations.
to form a new proposition is called a
compound proposition. f g
e.g: 1. 5 > 3: non-breakable, ∴ atomic
0 1
2. 5 ≥ 3: T
 his statement can be broken
into
1 0
a) 5 > 3
b) 5 = 3
1 1
∴Compound statement
Propositional variable: 0 0
A variable is used to represent the proposition.
3 propositions variables - 8 truth combinations
Simple proposition represented by p, q, r...
Compound proposition represented by P, Q, R...
Single propositions have 2 possible truth n propositions variables-2n truth combination
combinations.

p

T

Compound propositional
propositional sta
statemen
statement
tementt

Simple statement 1 Simple statement 2

Connectives
Fig. 1.3

A compound statement is breakable into Representation


simple statements while breaking it; it is y Conjunction / AND (∧)
breakable at the breaking point / weak point y Disjunction / OR (v)
called connectives. That weak point is called y Implication (→/⇒)
connectives. y Bi implication (⇔ /↔)

In mathematics, there are 4 types of


Note:
connectives:
There is 1 more type of connective called
“modifiers (negation)”.

6 Propositional logic and Predicates


Boolean logic:
p q p ∧q
1. Negation:
It is a unary operation and can be denoted
in the following ways: T T T
a) ¬p
b) ~ p T F F
c) p’
d) p F T F

Note: F F F

A unary operation is an operation which Table 2 The Truth Table for Conjunction of
can be implemented on single proposition. Proposition

Note:
Definition
In the truth table, we mention the cases.
Negation: Let p be a proposition. The As we all know, the compound statement
“negation of p”, denoted by ¬ p (also by is nothing but a group of some atomic/
p ), simple statements. We generate cases out
of these atomic statements to reach the
is the statement “It is not the case that
conclusion of the compound statement.
p”. The proposition p is read as “not p”.
The truth value of p is the opposite of
the truth value of p.
e.g: Let a proposition p = I am Michel.
The negation of p( p ) = I am not Michel. Rack Your Brain

p p Find the conjunction of the proposition


p & q where p is the proposition “It is
T F raining today”, and q is the proposition “I
will not go to the school”.
F T

Table 1 The Truth Table for the Negation of a 3. Disjunction:


Proposition
Disjunction is an “OR” case.
2. Conjunction: OR is of two types:
It is basically AND operator and is
a) Inclusive OR (∨)
represented by “∧”.
b) Exclusive OR (⊕)

Definition
Note:
Conjunction: Conjunction is similar to
In mathematics, we always use (v) inclusive
performing AND operation between two
OR, until and unless it is mentioned as ⊕
variables. Conjunction between two
proposition will be true only when both
the propositions are true otherwise it
will always be false.

Propositional logic and Predicates 7


Inclusive OR: Conditional statement/implication:
If any of the simple propositions are true, the
conclusion will be true and the conclusion
Definition
will be false otherwise.
Let f and g be two propositions, and
p q p∨q the conditional statement f→g is the
proposition, “if f then g”. The conditional
statement fg is false when f is true and g
T T T
is false, and true otherwise.
T F T f→g

F T T
hypothesis/ conclusion/
F F F
antecedent/ consequence
Table 3 Table for Disjunction Using Inclusive OR
premisea
For example,
“Students who have taken calculus or
computer science can take this class”.
p q p→q
With this statement, we mean that those
students who have taken either calculus or T T T
computer science can take the class also,
the students who have taken both can take T F F
the class.
F T T
Exclusive OR:
F F T
Using exclusive OR, we can reframe the
sentence as Table 5 The Truth Table for the Conditional
Statement p → q
“Students who have taken calculus or
computer science, but not both can take the Differents form of Implication (→):
class”.
p ® q can be written as:
y p implies q
q q p⊕q y if p then q
y if p, q
T T F y q if p
y q when p
T F T y q whenever p
y q unless p
F T T
y p only if q
F F F y a sufficient condition for q is p
y q whenever p
Table 4 Table for Disjunction Using Exclusive OR y q is necessary for p
y q follows from p

8 Propositional logic and Predicates


Rack Your Brain Rack Your Brain

Convert the given statement into Let p be the statement “Maria learns
propositional logic form discrete mathematics” and q be the
p: I stay statement “Maria will find a good
q: you go job”. Express the statement p → q as a
1. I stay if you go statement in English.
2. I stay only if you go
3. I stay unless you go Converse, contrapositive, and inverse:
4. you go when I stay These are different types of conditional
statements.
Let us consider an implication p → q
1. If you win, I will give you pizza.
y Contrapositive ~q → ~p
Solution: y Converse q → p
The statement can be interpreted as: if you y Inverse ~p → ~q
win the match, then I will give you pizza. Law of contrapositive:
Implication and its contrapositive are
Case 1: Let p be the proposition “ If you win”
equivalent
(hypotheses) and q be conclusion “I will give
you pizza”. p → q ≡~ q →~ p

Case 1 says p and q both are true, means “If Converse and Inverse are equivalent.
you win, I will give you pizza” which is true. q → p ≡ ~ p →~ q
∴ p → q = True.

Case 2: p = True = If you win


Rack Your Brain
q = False = I will not give you a pizza
which means, If you win, I will not give you What is the inverse of “The home team
pizza, which is false. wins whenever it is raining”.
∴p → q = False. Bi-conditionals:
Case 3: Similarly, In case 3 the conclusion It is represented by ( ↔ )
is “If you do not win, I will give you pizza” is
True. As this condition can not be interpreted Definition
from the given statement.
Let p and q be propositions. The biconditional
∴ p → q = True statement p ↔ q, is the proposition “p if and
only if q” or “p if q”. Biconditional statement
Case 4: Thus case says, “If you do not win, I
between two propositions will be true only
will not give you pizza” Which is true
when both the propositions have same
∴ p → q = True. values(True or false) in all the other cases it
will give false output.

Propositional logic and Predicates 9


conditional statements and negations. Now,
p q p ↔ q we can use all these connectives to forms
compound propositions with ‘n’ number of
T T T variables.

T F F Construct a truth table for: (p ∨ Ø q) → (p ∧ q)

F T F p q Øq p∨Øq p∧q (p∨Øq) → (p∧q)


F F T T T F T T T
Table 6 Truth Table for the Biconditional p ↔ q. T F T T F F
e.g., Let p be the statement “you can take F T F F F T
the flight” and q be the statement “you buy
F F T T F F
a ticket”. p ↔ q will be, “you can take the
flight if and only if you buy a ticket”. Table 8 Example for Truth Table for Compound
Propositions
Precedence of logical operator:
Generally, we use parenthesis to define the
precedence of a logical operator.
y Negation operator has the highest priority.
Rack Your Brain
For example, let us consider a proposition
Ø p ∧ q. This proposition will be considered How many rows appear in a truth table
as the conjunction of (Ø p) and q and not for the following compound statements
the negation of the conjunction of p and (A) p→Øp
q. (B) (p∨Ør)∧(q∨Ør)
y Conjunction operator’s precedence is
Generally, we use 1 to represent true and 0
greater than the disjunction operator’s
to represent false.
precedence.
y The conditional and biconditional operator A Boolean variable is a variable that has a
has the lowest precedence among all value of either 0 or 1.
operators.
p q p∨q p∧q p⊕q
Operator Precedence
0 0 0 0 0
Ø 1 0 1 1 0 1
1 0 1 0 1
∧ 2 1 1 1 1 0

∨ 3 Table 9 Table for Bit Operators: OR, AND and XOR

→ 4
↔ 5
Rack Your Brain
Table 7 Precedence of Logical Operators

Compound propositions: Find the bitwise OR, bitwise AND and


bitwise XOR for the following pair of
We have already studied connectives, i.e.,
strings 11110000, 10101010
conjunction, disjunction, conditional, bi-

10 Propositional logic and Predicates


Application of propositional logic:

Translation to
English Sentences
Boolean System
Searches Specifications

Applications of
Propositional Logic

Logic Puzzles Logic Circuits

Fig. 1.4

Mathematical logic has a vast number of in the hardware, we use basic circuits
applications. Some of them we have already called gates to form the combinational
mentioned. But we will limit our discussion circuit.
to only two applications i.e.
(A) AND gate: It takes two signals as input
(i) Translating English sentences
and produces (p ∧ q) signal as output.
(ii) Logic circuits
y Translating English sentences: p
English is very ambiguous; to resolve p q
v
q
that ambiguity, we translate these
sentences into compound statements. Fig. 1.5

y Example: (B) 
Or gate: It takes two signals as input and
Convert given sentence into a logical gives (p ∨ q) signal as output.
form:
p
“You can not ride the roller coaster if pv q
you are under 4 feet tall unless you are q
Fig. 1.6
older than 16 years old.”
y Solution: (C) Not gate/inverters:
Let p, q, r represent “You can ride the It takes p as input and produces ( p ) as
roller coaster,” “you are under 4 feet output.
tall”; and “you are older than 16 years
p p
old”.
Fig. 1.7
∴ The sentence can be translated to
(q ∧ Ø r) → p y Combinatorial circuit:
p q
y Logic circuits: Logic is also used to p
v

q
design hardware, which takes the input q
signal and produces output signals. As (p v q) v r
we use connectives negation etc., to
r
form compound statements, similarly, r
Fig. 1.8

Propositional logic and Predicates 11


Logically equivalent: Contingency:
y Two propositions are said to be logically Given proposition turns out to be either true or
equivalent if and only if they have same false, then that proposition is contingency.
truth table.
Example:
y Two propositions are said to be logically
(p Ù q) ® s
equivalent if p « Q is a tautology.
y The Equivalency of two propositions is
represented by (≡) p q s p Ù p ~s

Example 1: Show that p → q and Ø p ∨ q are


T T T F
logically equivalent.
T T F T

p q p→q Øp ∨ q

0 0 1 1 Note:
0 1 1 1 Contradiction is also known as fallacy or
invalid.
1 0 0 0
1 1 1 1 Satisfiable:
Table 1.10
A proposition that is either a tautology or a
Now, p → q and Ø p ∨ q are precisely same.
contingency is called satisfiable.
∴B oth boolean expressions are logically
Example:
equivalent.
(p  q  r)  s
Tautology:
If a given proposition turns out to be always
true, then it is called a tautology. q r s (p Ù q Ù r)→s
Example:
T T T F
pÚ~p
T T F T

p ~q p ∨ ~p Contingency so
satisfiable
T F F Proposition

F T T
Satisfiable Unsatisfiable

Contradiction / fallacy
Contradiction: Tautology
(valid)
Contingency
(some time true and (always false)
(Always true) some time false)
If a given proposition turns out to be always
Fig. 1.9
false, then that proposition is a contradiction.
Example:
pÙ~p
Rack Your Brain
p ~p p Ù ~p Choose the correct option:
1. All valids are satisfiable
T F F 2. All contingency are satisfiable
F T T 3. All satisfiable are contingency
4. None

12 Propositional logic and Predicates


2. Which of the following option/s are 3. The predicate statement ∀z[p(z) → (¬q(z)
satisfiable compound propositions? → p(z))] is:
(A) (p v ¬q) ∧ (¬p q) (¬p ¬q) (A) Satisfiable
(B) (p → q) ∧ (p ¬q) (¬p → q) (¬p → ¬q) (B) Tautology
(C) (p ↔ q) ∧ (¬p ↔ q) (C) Contradiction
(D) None of the above (D) None of these
Solution:
(A) = (p v ¬q) ∧ (¬p v q) ∧ (¬p v ¬q) Solution:
= (p + ¬q) (¬p + q) (¬p + ¬q) ∀z[p(z) → (¬q(z) → p(z))]
= (p . ¬p + p . q + ¬p . ¬q) (¬p + ¬q)
= (p . q + ¬p . ¬q) (¬p + ¬q) ≡ ¬z[¬p(z) v q(z) v p(z)]
= (¬p . ¬q + ¬p . ¬q) ≡ ¬∀z[T v q(z)]
= (¬p . ¬q)
≡ ¬T
As given preposition depend on the value
of ‘p’ and ‘q’ thus it can be true or false ≡ F
therefore satisfiable.
(B) = (p → q) ∧ (p → ¬q) ∧ (¬p → q) ∧
(¬p → ¬q) Previous Years’ Questions
= (¬p + q) (¬p + ¬q) (p + q) (p + ¬q)
= ((p + q) (¬p + ¬q)) ((p + ¬q) (¬p + q)) Choose the correct choice regarding the
=0 following propositional logic assertion S:
Given preposition is contradiction thus not [GATE CSE 2021 Set-2]
satisfiable. S: ((P ∧ Q) → R) → ((P ∧ Q) → (Q → R))
(C) = (p ↔ q) ∧ (¬p ↔ q) (A) S is neither a tautology nor a
= (p ss® q) ∧ (q ® p) ∧ (¬p ® q) ∧ contradiction
(q ® ¬p) (B) S is a tautology
= ((¬p + q) (¬q + p)) ((p + q) (¬q + ¬p)) (C) S is a contradiction
=0 (D) 
The antecedent of S is logically
It is also not satisfiable. equivalent to the consequent of S.
Solution: (B), (D)

Applications of satisfiability:
Sudoku
Robotics Genetics Puzzles

Applications of
Satisfiability

Computer Integrated Software


Networking Circuit Testing
Design

Fig. 1.10

Propositional logic and Predicates 13


These laws help to make complicated-
looking boolean expressions simple.
Rack Your Brain “Bitty bought a butter, but the butter was
bitter, so bitty bought another butter to make
Which of the compound propositions are bitter butter, better butter.”
satisfiable. y As, the above statement seems a little
(A) (p v q v ¬ r) ∧ (p v ¬ q v ¬ s) ∧ (p v ¬ r complicated, but it can be made simpler
v ¬ s) ∧ (¬ p v ¬ q v ¬ s) ∧ (p v q v ¬ s) using English.
(B) (¬ p v ¬ q v r) ∧ (¬ p v q v ¬ s) ∧ (p v y Similarly, in mathematical logic,
¬ q v ¬ s) ∧ (¬ p v ¬ r v ¬ s) ∧ (p v q v complicated boolean expressions can be
¬ r) ∧ (p v ¬ r v ¬ s) made simpler with the laws stated above
Logical equivalence: in table 11.
Equivalences (laws): Equivalences involving implication:

T = Compound statement that is always true. f→s ≡ Øf∨ s


F = Compound statement that is always false.
f→s ≡ Øs → Øf
Equivalence Name f∨s ≡ Øf→ s
Ø (f → s) ≡ f∧ Øs
F∧T≡F
Identity laws (f → s) ∧ (f → r) ≡ f → (s ∧ r)
F∨F≡F
(f → r) ∧ (s → r) ≡ (f ∨ s) → r
F∨T≡T Domination (f → s) ∨ (f → r) ≡ f → (s ∨ r)
F∧F≡F laws (f → r) ∨ (s → r) ≡ (f ∨ s) → r
F∨F≡F Table 12 Logical Equivalences Involving Conditional
Idempotent
Statements
F∧F≡F laws

Double f↔s ≡ (f → s) ∧ (s → f)
Ø(ØF) ≡ F
negation law f↔s ≡ Øf↔ Øs
F∨s≡s∨F Commutative f↔s ≡ (f ∧ s) ∨ (Ø f ∨ Ø s)
F∧s≡s∧F laws Ø (f ↔ s) ≡ f↔ Øs

(F ∨ s) ∨ r ≡ F ∨ (s ∨ r) Table 13 Logical Equivalence Involving Biconditional


Associative Statements
(F ∧ s) ∧ r ≡ F ∧ (s ∧ r) laws
De Morgan’s laws:
F ∨ (s ∧ r) ≡ (F ∨ s) ∧ (s ∨ r) Distributive As we have already seen that De Morgan’s
F ∧ (s ∨ r) ≡ (F ∧ s) ∨ (s ∧ r) laws laws state:
y Ø (p ∧ q) ≡ Ø p ∨ Ø q
Ø(F ∧ s) ≡ ØF ∨ Øs De Morgan’s y Ø (p ∧ q) ≡ Ø p ∧ Ø q
Ø(F ∨ s) ≡ ØF ∧ Øs laws
Note:
F ∨ (F ∧ s) ≡ F Absorption
laws When using De Morgan’s laws, remember
F ∧ (F ∨ s) ≡ F
to change the logical connective after you
F ∨ Øs ≡ T Negation negate.
F ∧ Øs ≡ F laws It states that negation of conjunction/
Table 11 The Special Case of Boolean Algebra Identities
disjunction is formed by disjunction/

14 Propositional logic and Predicates


conjunction of negation of the component Rule of
propositions. Name Tautology
Inference

4. 
Use De Morgan’s law to express the p
negation of “Maya will go to fare or Abdul Addition p → (p ∨ q)
∴p ∨ q
will go to fare”.
p
Solution:
q ([p] ∧ [q])
⇒ Let p = Maya will go to fare Conjunction
∴p ∧ q → (p ∧ q)
q = Abdul will go to fare
Can be represented by p ∨ q
Now, the negation of p ∨ q = Ø (p ∨ q) p∧q
Simplification (p ∧ q) → p
According to De Morgan’s law Ø (p ∨ q) = Ø ∴p
p ∧ Øq
Which states that Maya will not go to fare p→q
and Abdul will not go to the fare. Modus p (p ∧ [P →
ponens q]) → q
∴q
5. Use De-Morgan’s law, to show Ø (p ∨ ( Ø p
∧ q)) and Ø p ∧ Ø q are logical equivalent. p→q
Solution: ([p → q) ∧
Hypothetical q→r
(q → r]) →
Ø (p ∨ (Ø p ∧ q)) [using De Morgan law] syllogism ∴p →r (p → r)
Ø p ∧ Ø (Ø p ∧ q)
p∨q
Ø p ∧ [Ø (Ø p) ∨ Ø q] Disjunctive ¬p ([p ∨ q) Ø
Ø P ∧ (p ∨ Ø q) [Using distributive law] syllogism p] → q
∴q
(Ø p ∧ p) ∨ (Ø p ∧ Ø q)
p→q (Ø q ∧ [p
F ∨ (Ø p ∧ Ø q) ( Ø p ∧ p ≡ F) Modus ¬q → q]) →
tollens
Ø p ∧ Øq [using commutative law of ∴ ¬p Øp
disjunction]
p∨q ([p ∨ q) ∧
Hence, proved, Ø (p ∨ (Ø p ∧ q)) is logically
Resolution ¬p ∨ r (Ø p ∨ r])
equivalent to Ø p ∧ Ø q.
∴q∨ r → (q ∨ r)
The general form of an argument: (Inference)
The process of deriving the conclusion based Table 14 Rules of Inference
on assumption is called an argument.
The conjunction of premises implies a 6. “If Vinay comes to the ceremony, Atul
conclusion. will not come to the ceremony. If Atul
(p1 Ù p2 Ù ...pn) ® q doesn’t come to the ceremony, Siddhu
An inference which is tautology called valid will come to the ceremony.”
inference otherwise invalid inference. Solution:
Rule of inference: Let the propositions be as follows:
Any valid inference is the rule of inference. p: Vinay comes to the ceremony.

Propositional logic and Predicates 15


q: Atul does not come to the ceremony. y No subset of the given set is functionally
complete.
r: Siddhu comes to the ceremony.
For example:
∴p→ q
q→r y {∧, ∨, Ø} is not minimally functionally
∴p→ r complete.
y {∧, Ø}, {∨, Ø} are minimally functionally
This argument is a hypothetical syllogism.
complete.
Functional completeness: If any boolean
E.g., with ↑ we can generate “NOT”, "AND",
function can be expressed using a given
set of boolean functions, then that set of and "OR".
boolean functions is functionally complete.
Note:
For example, The set {∧, ∨, Ø} is clearly
{↑} and {↓} are smallest functionally
functionally complete.
complete sets.

Note:
Normal forms: The method of reducing a
With n variable, 2( ) boolean functions
2n
given formula to an equivalent form is called
can be represented. ‘normal form’.
There are two types of standard normal
y The set {∧, Ø} is said to be functionally forms:
complete or minimal functionally
complete set. 1. PDNF (Principal disjunctive normal form)
y The set {∨, Ø} is also functionally complete. 2. PCNF (Principal conjuctive normal form)
Considering m for minterm and M for
y The set {∧, ∨} is not functionally complete
maxterm.
as we can not generate “not” with the of
“AND” and "OR".
Note:
Note: Number of terms in PDNF + Number of
A set is said to be functionally complete terms in PCNF = 2n
if we can derive a set which is already
functionally complete. After solving the boolean function.
If the conclusion is ‘1’ then it’ll be considered
Minimally functionally complete set: A set is in minterms maxterm otherwise.
said to be minimally functionally complete PDNF: Disjunction of min terms
if:
PCNF: Conjunction of max terms
y It is functionally complete
0 = False
E.g., p ↔ (q ® r’)  
 1 = True 

p q r q → r' p ↔ (q → r') Min Terms Max Terms

0 0 0 1 0 m0 M0 = p ∨ q ∨ r

0 0 1 1 0 m1 M1 = p ∨ q ∨ r'

0 1 0 1 0 m2 M2 = p ∨ q' ∨ r

16 Propositional logic and Predicates


0 1 1 0 1 m3 = p' ∧ q ∧ r M3

1 0 0 1 1 m4 = p ∧ q' ∧ r' M4

1 0 1 1 1 m5 = p ∧ q' ∧ r' M5

1 1 0 1 1 m6 = p ∧ q ∧ r' M6

1 1 1 0 0 m7 M7 = p' ∨ q' ∨ r'


Table 15

Predicates and Quantifies


The meaning of the English statement may
Rack Your Brain
not always be possible to express in the
form of propositional logic.
Let p(x) denotes the statement “x ≤ 4”.
For e.g., “Every computer science student in What are these truth values?
the university is intelligent.” (A) p(0)
Now, with the help of propositional logic, we (B) p(4)
in no way can prove Sanya is intelligent. (C) p(6)

Where Sanya is one of the computer science


students at the university. Pre conditions and post conditions:

Place where propositional logic can not work, Statements that describe valid input are
predicate logic comes into the picture. To known as pre-conditions, and the condition
understand predicate logic, let’s first learn that the output should satisfy when the
about predicate properly. program has run is called post-conditions.

Predicates: Quantifiers:
Consider statement, “ x is greater than 5". Quantification is a way to create a proposition
from a propositional function.
y The subject part: Variable itself
y The predicate part: Is greater than 5
so we can denote this statement as P(x), Note:
where P is the predicate part and x is variable. The area of logic that deals with predicate
When the value is assigned to the variable and quantifiers is called predicate logic.
predicate is converted to propositional logic.

Universal Quantification Existential Quantification

Fig. 1.11

Propositional logic and Predicates 17


Universal quantifier: The uniqueness quantifier:
There is one more type of quantifier called
y It tells us the predicate is true for every
“uniqueness quantifier” denoted by ∃ ! or ∃1 .
element under consideration.
y To understand universal quantifier; first The notation ∃ ! xP(x) or ∃1xP(x) states, “There
we need to understand the term domain of exists a unique x such that P(x) is true”.
discourse/universe of discourse/domain:
When all the values of a variable in a Note:
particular domain are true, then a property The truth value of xP(x) depends on the
is called true, that particular domain is domain.
called the domain of discourse/universe
of discourse/domain. Logical equivalences involving quantifiers:
These types of statements are expressed Standard definition:
using universal quantification.
Definition
Definition
If two statements have same truth
These universal Quantification of P(x) is table, then both statements are logically
the statement. equivalent that two statements S and T
“P(x) for all values of x in the domain” involving predicates and quantifiers are
The notation ∀xP(x), denotes the universal logically equivalent.
Quantification of P(x). Here ∀x is called
the universal Quantifier. We read ∀xP(x) 7. Consider the following statements:
as “for all xP(x)” or “for every xP(x)”. An I. p q p q is logically equivalent.
element for which P(x) is false is called a II. p q (p q) (p q) is logically equivalent.
counter example of ∀xP(x). Which of the following options are
correct?
Quantifiers (A) Only I is true.
Statement When True When False (B) Only II is true.
(C) Both are true.
P(x) is true for There is an
∀xP(x) every x. x for which (D) None of the above.
P(x) is false.
Solution: (C)
There is an x I.
P(x) is false
∃xP(x) for which P(x)
for every x. p q p®q
is true.
Table 16 0 0 1
Existential quantifier: 0 1 1
y By existential quantifier we know that 1 0 0
there is atleast one value for which 1 1 1
predicate is true. Table 1.17
y In existential quantification, a proposition is p q ¬p ¬p Ú q
formed that is true if and only if P(x) is true
0 0 1 1
for at least one value of x in the domain.
0 1 1 1
Note: 1 0 0 0
Truth value of xP(x) depends on the domain. 1 1 0 1
Table 1.18

18 Propositional logic and Predicates


Now, p → q and ¬p Ú q are precisely the same. We can clearly see the column p ↔ q and
(p Ù q) Ú (¬p Ù ¬q) have same values, which
\ Both boolean expressions as logically
equivalent. means these two expressions are logically
equivalent.
II.
p q p«q
Note:
0 0 1
y The quantifiers ∀ and ∃ have a higher
0 1 0
precedence than all logical operators.
1 0 0 y When a quantifier is used on the
1 1 1 variable x, this occurrence of a variable
Table 1.19 is Bound.
p q ¬p ¬q (p Ù q) (¬p¬q) y The part of the logical expression to
0 0 1 1 1
which quantifier is applied is called
scope.
0 1 1 0 0
1 0 0 1 0
1 1 0 0 1
Table 1.20

De Morgan’s Laws for Quantifiers

Equivalent
Negation Why True Why False
Statement

For every x, P(x) is There is an x for which P(x) is


¬∃xP(x) ∀x¬P(x)
false. true.

There is an x for which


¬∀xP(x) ∃x¬P(x) P(x) is true for every x.
P(x) is false.
Table 1.21 De Morgan’s laws for Quantifiers

Aristotle form:
1. All p’s are Q’s x[p(x)  Q(x)]
2. Some p’s are Q’s x[p(x)  Q(x)] Rack Your Brain
3. Not all p’s are Q’s ~ x[p(x)  Q(x)]
x[p(x)  ~ Q(x)] Some real no’s are not rational.
 Some p’s are not Q’s
1. x[real(x) ∨ rational (x)]
4. No p’s are Q’s ~x[p(x)  Q(x)] 2. x(real(x)  rational (x)]
x[p(x)  ~ Q(x)] 3. ~x[real(x) ∧ ~rational (x)]
All p’s are not Q’s 4. x[rational(x)  real (x)]
Note:
 follow implication ()
 follow and (∨).

Propositional logic and Predicates 19


8. Match List I and List II There is someone : $y ∀x loves (x,y)
List I whom everyone
(A) Everyone loves Obama
There is someone : $y ∀x ¬loves (x,y)
(B) Everyone loves someone whom no one loves
(C) T
here is someone whom everyone
loves
(D) There is someone whom no one loves
Previous Years’ Questions
List II Choose the correct translation of given
1. loves (x, Obama) statement: [GATE IT 2013]
2. y loves (x,y) “None of my friends are perfect”.
3. y loves (x,y (A) x(F(x) p(x)) (B) x(F(x) p(x))
4. y loves (x,y) (C) x(F(x) p(x)) (D) x(F(x) p(x))
A B C D Solution: (D)
1. 1 2 3 4
Nested quantifiers:
2. 1 3 2 4
3. 1 4 3 2 We use quantifiers to express mathematical
statements such as “The sum of two positive
4. 1 2 4 3
integers is always positive".
Solution:
Everyone loves : xloves (x, Obama)
Note:
Obama
Be careful with the order of existential
Everyone loves : ∀x $y loves (x,y) and universal quantifier.
someone

Statement When True When False

∀x∀y P(x, y) P(x, y) is true for every pair x, y. There is a pair x, y for which P(x,
y) is false.
∀y∀x P(x, y)
∀x∃y P(x, y) For every x, there is a y for There is an x such that P(x, y) is
which P(x, y) is true. false for every y.
∃x ∀y P(x, y) There is an x for which P(x, y) For every x, there is a y for which
is true for every y. P(x, y) is false.
∃x∃y P(x, y) There is a pair x, y for which P(x, y) is false for every pair x, y.
P(x, y) is true.
∃y∃x P(x, y)
Table 1.22 Quantification of Two Variables

9. Translate the statement and y are colleagues. In other words, every


∀x(C(x)∨∃ y(C(y)∧F(x,y))) teacher in the college has a pentab or has a
In English, where P(x) is “x has a pentab”, colleague who has a pentab.
C(x,y) is “x and y are colleagues” and the
domain for both x and y consists of all 10. Which of the following options is the
the teachers in a college. correct expression in predicates and
Solution: quantifiers “A student must take at least
The statement says that for every teacher 60 hours course or at least 45 hours
x in the college, x has a pentab or there is course and write a master’s thesis, and
a teacher y such that y has a pentab and x receive a grade not lower than

20 Propositional logic and Predicates


‘B’ in all required courses, to receive Relation between two-place predicate:
master’s degree”.
(A) M  ((H(60) ∧ (H(45) ∧ T)) Ú∀yG(B,y) x y y x
(B) M  ((H(60) Ú (H(45) ∧ T)) Ú∀yG(B,y)
(C) M  ((H(60) ∧ (H(45) Ú T)) Ú∀yG(B,y)
x y y x
(D) M  ((H(60) ∧ (H(45) Ú T)) Ú∀yG(B,y)
Solution: (B)
M®((H(60)Ú(H(45)ÙT))Ú∀yG(B, y) y x x y
Where M is the proposition “The student
receiver master’s degree”.
y x x y
H(x) is “The student took at least x hours
course”.
T is the proposition “The student wrote a
From the above diagram, we can define the
thesis”.
following predicate property and many more
G(x, y) is “The person got grade x or higher in
according to direction.
Course G”.

1. x y p(x,y)  y x p(x,y)
Previous Years’ Questions
2. x y p(x,y)  x y p(x,y)
3. x y p(x,y)  y x p(x,y)
Which of the following is negation of:
4. x y p(x,y)  y x p(x,y)
[GATE CSE 2008]
[∀ x, α  (∃y, β  (∀u, ∃v, y))] 5. y x p(x,y)  x y p(x,y)
(A) [∃x, α  (∀y, β  (∃u, ∀v, y))] 6. x y p(x,y)  y x p(x,y)
(B) [∃ x, α  (∀y, β  (∃u, ∀v, ¬y))] 7. y x xp(x,y)  x y p(x,y)
(C) [∀x, ¬ α  (∃y, ¬ β  (∀u, ∃v, ¬y))] 8. y x p(x,y)  y x p(x,y)
(D) [∃x, α∧ (∀y, β ∧(∃u, ∀v, ¬y))] 9. y x p(x,y)  x y p(x,y)
Solution: (D) 10. y x p(x,y)  x y p(x,y)

Quantifiers property:
Previous Years’ Questions
1. x [p(x)  Q(x)]  x p(x)  x Q(x)
Consider the following formula and its 2. x[p(x)  Q(x)]  x p(x)  x Q(x)
two interpretations I1 and I2. 3. x p(x)  x Q(x)  x[p(x) Q(x)]
[GATE CSE 2003] 4. x[p(x)  Q(x)] x p(x)  x Q(x)
α: (∀x) [Px ↔ (∀y) [Qxy ↔ Qyy]]  (∀x) [¬ Px]
5. x[p(x)  Q]  x p(x)  Q
l1: Domain: The set of natural numbers.
6. x[p(x)  Q]  x p(x)  Q
Px ≡ xis a prime number
Qxy ≡ ydivides x 7. x[p(x)  Q] x p(x)  Q
l2: same as l1 except that px= x is a 8. x[p(x)  Q] x p(x)  Q
composite number. 9. x[pQ(x)] px Q(x)
Which of the following is true? 10. x[p  Q(x)] p x Q(x)
(A) l satisfies , l does not 11. x[p(x)  Q]  p(x)  Q
(B) l satisfies , l does not 12. x[p(x)  Q]  x p(x)  Q
(C) Neither l nor l satisfies
(D) Both l and l satisfies
Solution: (D)

Propositional logic and Predicates 21


Chapter Summary

y Propositional logic is a declarative statement which results in either true or false.


y There are two types of propositions:
○ Atomic proposition
○ Compound proposition
y Connectives: The weak point at which a compound statement is breakable is called
connective.
y There are four types of connectives:
○ Conjunction (∧)
○ Disjunction (∨/⊕)
○ Simple implication ()
○ Double implication (↔)
y AND gate: p p q v

y OR gate: p p vq
q

p
y NOT gate: p

y  is called as universal quantifier.


y  is called as existential quantifier.
y There are two types of argument:
○ Valid
○ Invalid
y A proposition is valid if each disjunctive clause in any CNF representation of proposition
contains a pair of complementary literals.
y PCNF and PDNF are unique.
y If a = b, then PDNF of a and b will be same, and PCNF will also be same.

22 Propositional logic and Predicates

You might also like