Professional Documents
Culture Documents
IT2106 S2 Logic
IT2106 S2 Logic
Level I - Semester 2
Definition
Proposition
1)is a Proposition
2)is a Proposition
3)is a not a Proposition
4)is a not Proposition
5)is a not Proposition
0 1 2 3
p ~p
T F
F T
p q pq
T T T
T F F
F T F
F F F
Truth table of p q
© 2020 e-Learning Centre, UCSC
14
Definition of or ()
p q pq
T T T
T F T
F T T
F F F
Truth table of p q
© 2020 e-Learning Centre, UCSC
15
Examples
Let
p : “It is hot” and
q: “It is sunny”.
Solution :
~(p q)
© 2020 e-Learning Centre, UCSC
18
Examples
Let
p : “It is hot” and
q: “It is sunny”.
Solution :
~p ~q
© 2020 e-Learning Centre, UCSC
19
Construction of truth tables
p q ~q p~q ~(p~q)
T T
T F
F T
F F
p q ~q p~q ~(p~q)
T T F
T F T
F T F
F F T
p q ~q p~q ~(p~q)
T T F F
T F T T
F T F F
F F T F
p q ~q p~q ~(p~q)
T T F F T
T F T T F
F T F F T
F F T F T
p p~p
T T
F T
p q pq
T T T
T F F
F T F
F F T
Example
P(p,q) : p q
This means the proposition p q is denoted by P(p,q)
2) Associative laws
a) (p q) r p (q r )
b) (p q) r p (q r )
3) Commutative laws
a) p q q p
b) p q q p
3) Distributive laws
a) p (q r) (p q) (p r )
b) p (q r) (p q) (p r )
4) Identity laws
a) p F p
b) p T p
c) p T T
d) p F F
5) Complement laws
a) p ~p T
b) p ~p F
c) ~T F
d) ~F T
6) Involution law
a) ~~p p
5) DeMorgan’s laws
a) ~(p q) ~p ~q
b) ~(p q) ~p ~q
p q r pq qr (p q) r p (q r)
T T T T T T T
T T F T F F T
T F T T F T T
F T T T T T T
T F F T F F T
F T F T F F F
F F T F F F F
F F F F F F F
© 2020 e-Learning Centre, UCSC
51
From the truth tables it is clear that (p q) r
and p (q r) are not logically equivalent.
Therefore the meaning of the proposition p q
r is ambiguous.
How can we disambiguate the meaning of such
expressions ?
b) By using parenthesis.
~q r ? Solution :
The evaluation order of the expression is
p ((~q) r )
c) p1,p2,pn d) p1,p2,pn
Therefore q -------------
q
In all the above representations p1,p2,…
and pn denote the premises of the
arguments and q denotes the conclusion.
© 2020 e-Learning Centre, UCSC
58
Validity of arguments
An argument is said to be valid if the conclusion
of the argument is true whenever all premises
are true. An argument which is not valid is called
a fallacy.
– If x = 1: False
– If x = 26: True
Such sentences
are called
Predicates.
• The set of all elements in A for which P(x) is true is called the truth
set of the predicate P(x).
• Let x N
• P(x) is True is and only if
– x + 5 > 10
– That is, x > 5
– That is, x = 6 or 7 or 8 or …
The Truth Set of
• Truth set is {6, 7, 8,…} a predicate is
always a subset
of its Domain
(x, y) ordered
pairs
• We can say:
• “For all x R, x2 0 is true”
Upside-down
A
We can say:
“There exists some x N such that x + 7 = 10”
Mirror-image
of E
not ( x, P(x))
“not (For all x, P(x) is true)”
not ( x, P(x))
“not (There exists some x such that P(x) is true)”
x N, x + 2 = 5
x N, x + 2 ≠ 5
Predicate is
negated
• Let xN
• Let y = x+1.
• Then yN and x < y.
– xN, yN, x ≥ y
Predicate is
• xN, yN, x < y negated
– xN, yN, x ≥ y