Propositional and Predicate Logic: Group 1 Discrete Structures Computer Science
Propositional and Predicate Logic: Group 1 Discrete Structures Computer Science
Predicate logic
GROUP 1
Discrete Structures
Computer Science
Introduction to Team
• Abhilasha Gupta 09010
• Bhoomika Bisht 090101053
• Bini Joseph 090101054
• Haneef Khan -------------
• Igulu Kingsley Theophilus -------------
• Ishan Bhatt 090101086
• Parul Verma 090101123
• Priyanka Singh 090101130
• Sameeksha Sahai 090101148
• Sanchit Rana 090101150
• TIrupathi Balaji 0901011
Contents
PROPOSITIONAL LOGIC
What is Proposition?
• Also known as Statement.
• Declarative sentence that is either
TRUE or FALSE but not both.
Examples of Proposition
• The sun rises in the west. FALSE
• 2 + 4 =6. TRUE
• Compound Proposition
Cannot be further subdivided.
Atomic Proposition
• Consists of a single Propositional Variable or a
single Propositional Constant.
• Examples:
o (5, 6) (5, 6, 7)
o3+4=7
• Formed by the
o combination of two or more propositions by means of
logical operators
o Connectives of two or more propositions.
o By negating a single proposition.
Compound Proposition
• Examples:
o p : Paris is in France.
Compound
~p : Paris is not in France. Proposition
o p : Ram is healthy.
q : He has blue eyes.
p^q : Ram is healthy and has blue eyes. Proposition
Compound
Basic Logical Operations
Symbols Connective Nature of the Symbolic Negation
Used Word compound form
statement
~,¬,ı Not Negation ~p ~(~p) = p
NEGATION
p ~p
0 1
1 0
p and q
CONJUCTION
p q p^q
0 0 0
0 1 0
1 0 0
1 1 1
p or q
DISJUNCTION
p q pvq
0 0 0
0 1 1
1 0 1
1 1 1
If p, then q.
p -> q = p ^ (~q)
IMPLICATION
p q p -> q
0 0 1
0 1 1
1 0 0
1 1 1
p if and only if q.
p <-> q = [(p -> q) ^ (q -> p)] = [{p ^ (~q)} v {q ^ (~p)}]
EQUIVALENCE
p q p <-> q
0 0 1
0 1 0
1 0 0
1 1 1
If q, then p.
The converse of p -> q = p ^ (~q) is q -> p
CONVERSE
p q p -> q q -> p
0 0 1 1
0 1 1 0
1 0 0 1
1 1 1 1
If Not q, then Not p.
The inverse of p -> q = p ^ (~q) is (~q) -> (~p).
INVERSE
p q p -> q (~p) -> (~q)
0 0 1 1
0 1 1 0
1 0 0 1
1 1 1 1
If Not p, then Not q.
The inverse of p -> q = p ^ (~q) is (~p) -> (~q).
CONTRAPOSITIVE
p q p -> q (~q) -> (~p)
0 0 1 1
0 1 1 1
1 0 0 0
1 1 1 1
How to NEGATE a compound statement?
p^q
p -> q pvq
p <-> q p^q
TRUE or FALSE?
Compound propositions that is always TRUE for all
possible truth values of its variables.
Examples:-
TRUE
The professor is either a woman or man.
People either know your name or they TRUE
don’t.
CONTRADICTIONS
TRUE or FALSE?
Compound propositions that is always FALSE for all
possible truth values of its variables.
Examples:-
All men are good and all men are bad. FALSE
X is prime and x is an even number
FALSE
greater than 8.
Algebra of Propositions
• Identity
p ^ 1 <=> p
p ∨ 0 <=> p
• Domination
p ∨ 1 <=> 1
p ^ 0 <=> 0
• Idempotent
p ∨ p <=> p
p ^ p <=> p
• Double negation
~(~p) <=> p
• Commutative
p ∨ q <=> q ∨ p
p ^ q <=> q ^ p
• Associative
(p ∨ q) ∨ r <=> p ∨ (q ∨ r)
(p ^ q) ^ r <=> p ^ (q ^ r)
• Distributive
p ∨ (q ^ r) <=> (p ∨ q) ^ (p ∨ r)
p ^ (q ∨ r) <=> (p ^ q) ∨ (p ^ r)
• De Morgan
~( p ∨ q ) <=> ~p ^ ~q
( p ^ q ) <=> ~p ∨ ~q
• Other useful equivalences
p ∨ ~p <=> 1
p ^ ~p <=> 0
p → q <=> (~p ∨ q)
General rule for translation
Translations
Look for patterns corresponding to logical
connectives in the sentence and use them to define
elementary propositions.
Example
Step 1 :Find Logical Connectives. and
Step 2 : Break the sentence into p: This computer is good.
elementary prepositions. q: This computer is cheap.
Mathematics is a subject.
Examples
Object: Physics, Mathematics.
Function:
Replace the object by variable x
P(x) symbolizes the sentence “x is a subject”
Thus,
P(x) : x is a subject is the predicate logic and it becomes
proposition when specific values like ‘Physics’ or ‘Mathematics’
are substituted.
To convert propositional logic to
predicate logic
Universal Quantifiers
P(x) is true for all x in the universe
of discourse.
x P(x) is TRUE if P(x) is true for
every single x.
x P(x) is FALSE, if there is a x for
which P(x) is false.
x P(x) means “for some x, P(x)”
Existential Quantifiers
P(x) is true for some x in the universe
of discourse.
x P(x) is TRUE, if there is a x for which
P(x) is true.
x P(x) is FALSE, if P(x) is false for every
single x.
General rule: To negate a quantifier, move
negation to the right, changing quantifiers as
you go.
Negation of Quantifiers
( x P(x)) is the same as x P(x).
xy P(x,y)
• For at least one x and y for which P(x, y) is true.
xy P(x,y)
• For all x, there is at least one y for which P(x, y) is true.
xy P(x,y)
• There is at least one x that can map with all y such that P(x, y)
is true
Rule of Inference
Addition Conjunction
P P
---------------- Q
.: P v Q ----------------
.: P ^ Q
Simplification
P^Q
----------------
.: P
Rule of Inference(Contd.)
Modus Ponens Modus Tollens
P Q PQ
P ~Q
---------------- ----------------
.: Q .: ~P
Hypothetical Syllogism
PQ
QR
----------------
.: P R
Rule of Inference(Contd.)
Disjunction Constructive
Syllogism Dilemma
PvQ (PQ) ^ (R S)
~P PvR
---------------- ----------------
.: Q .: Q v S
Destructive
Dilemma
(PQ) ^ (R S)
~Q v ~S
----------------
.: ~P ~R
To conclude…
Predicate logic is distinguished from
propositional logic by its use of quantifiers.