Professional Documents
Culture Documents
Lecture No 4
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: s (p q) r
Equivalences: pq (p q)
Proving equivalences using:
Truth tables.
Symbolic derivations. p q r …
P(x) = x + 5 > x
variable predicate
P(x,y) = x + y == 0
P(1,2) is false, P(1,-1) is true
P(x,y,z) = x + y == z
P(3,4,5) is false, P(1,2,3) is true
P(x1,x2,x3 … xn) = …
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:
If P(x) is true for all parts of the for loop, then x P(x)
Consequently, if P(x) is false for any one value of the for loop,
then x P(x) is false
Represented by an backwards E:
It means “there exists a”, “some”, for at least one
If the universe of discourse is finite, say {n1, n2, . . ,
nk}, then the universal quantifier is simply the
disjunction of all elements:
From Book