Professional Documents
Culture Documents
Lecture - 08 - 09 - New
Lecture - 08 - 09 - New
Lecture No 1-7
Propositional logic is
the study of propositions (true or false statements)
and
The ways of combining them (logical operators) to
get new propositions.
Atomic propositions: p, q, r, …
Boolean operators:
Compound propositions: (p q) r
Equivalences: pq (p q)
Proving equivalences using:
Truth tables.
Laws of Logic
~(p q) ~p ~q.
The negation of the conditional statement:
~ (p q) p ~ q
P(x) = x + 5 > x
variable predicate
Represented by an upside-down A:
It means “for all”, “for each”, “for every”
If the universe of discourse is finite, say {n1, n2, . . ,
nk}, then the universal quantifier is simply the
conjunction of all elements:
Consider:
“Some students have visited Karachi”
“Every student in this class has visited Lahore or
Karachi”
Let:
S(x) be “x is a student in this class”
K(x) be “x has visited Karachi”
L(x) be “x has visited Lahore”
xy P(x, y)
“For all x, there exists a y such that P(x,y)”
Example: xy (x+y = 0)
xy P(x,y)
There exists an x such that for all y P(x,y)”
xy (x*y = 0)
xy P(x,y)
P(x,y) = (x+y = 0) is false
xy P(x,y)
P(x,y) = (x+y = 0) is true
Solution:
Rewrite it in English that quantifiers and a domain are
shown
Solution:
Introduce variables
“For every pair of integers, if both integers are positive, then the sum of them
is positive.”
Solution:
Rewrite it in English that quantifiers and a domain
are shown
25
26
Examples:
¬(xy P(x,y))
= x ¬y P(x,y)
= xy ¬P(x,y)
¬(xyz P(x,y,z))
= x¬yz P(x,y,z)
= x¬yz P(x,y,z)
= xyz ¬P(x,y,z)
xy (x+y = y)
There exists an additive identity for all real numbers
xy (((x≥0) (y<0)) → (x-y > 0))
A non-negative number minus a negative number is
greater than zero
xy (((x≤0) (y≤0)) (x-y > 0))
The difference between two non-positive numbers is
not necessarily non-positive (i.e. can be positive)
xy (((x≠0) (y≠0)) ↔ (xy ≠ 0))
The product of two non-zero numbers is non-zero if
and only if both factors are non-zero
x (C(x)L(x))