Beruflich Dokumente
Kultur Dokumente
Propositional Logic
Propositional variables: p, q, r, s
Examples:
1 + 1 = 2 (proposition)
2 + 2 = 5 (propositian)
Compound Propositions
Compound propositions: news propositions formed from
existing propositions using logical operators
Definition 1: Let p be a proposition. The negation of p, denoted
by p (orp), is the statement It is not the case that p.
Definition 2: Let p and q be propositions. The conjunction of p
and q, denoted by p q, is the proposition p and q.
Definition 3: Let p and q be propositions. The disjunction of p
and q, denoted by p q, is the proposition p or q.
Definition 4: Let p and q be propositions. The exclusive or of p
and q, denoted by p q, is the proposition that is true when
exactly one of p and q is true and is false otherwise.
4
Compound Propositions
Definition 5: Let p and q be propositions. The conditional
statement p q is the proposition if p, then q.
p: hypothesis (or antecedent or premise)
q: conclusion (or consequence)
Implication: p implies q
Definition 6: Let p and q be propositions. The biconditional
statement p q is the proposition p if and only if q.
Compound Propositions
By convention
Logical Operator
Precedence
1
2
3
4
5
Examples:
pq r
is equivalent to
(( p) q) r
pq rs
is equivalent to
p (q (r s))
6
xy
xy
x y
xy
xy
1
7
Propositional Equivalences
A tautology is a proposition that is always true.
p
p p
pp
pp
T
8
Logical Equivalences
Logical Equivalences
Use known logical equivalences to prove that
two propositions are logically equivalent.
Example:
( p q) p q
( p q) ( (p q)) (De Morgans)
pq
(Double negation)
10
Logical Equivalences
Identity
pT p
pF p
Domination
pTT
pFF
Idempotence
ppp
ppp
Double negation
pp
Commutativity
pqqp
pqqp
Associativity
(pq)r p(qr)
(pq)r p(qr)
Distributivity
p(qr)(pq)(pr)
p(qr)(pq)(pr)
De Morgans
( p q ) p q (De Morgans I)
( p q ) p q (De Morgans II)
Excluded Middle
p p T
Uniqueness
p p F
Useful LE
p q p q
11
Implication: p q
Converse: q p
Contrapositive: q p
Inverse: p q
Two compound propositions are equivalent if
they always have the same truth value
The contrapositive is equivalent to the implication
The converse is equivalent to the inverse
Predicate Logic
Predicate: a property that the subject of the statement
can have
Example: x > 3
x : variable
> 3 : predicate
P(x) : x > 3 (the value of the propositional function P at x)
Predicates can be quantified using
Universal Quantifier
Suppose that P(x) is a predicate on some universe of discourse.
14
Existential Quantifier
Suppose P(x) is a predicate on some universe of discourse.
The existential quantification of P(x) is the proposition:
There exists at least one x in the universe of discourse
such that P(x) is true.
x P(x) reads for some x, P(x)
or
There exists x, P(x) is True
x P(x) is TRUE
Quantifier Negation
x P(x) means P(x) is true for every x.
What about x P(x) ?
It is not the case that [P(x) is true for every x.]
There exists an x for which P(x) is not true.
x P(x)
Universal negation:
x P(x) x P(x).
16
Proofs
17
Valid Argument
Argument: a sequence of propositions that end with
a conclusion
Premises or hypotheses of the problem (p1,,pn)
Conclusion: the final proposition (q)
Argument form: a sequence of compound propositions
involving propositional variables
An argument is valid
if p1 p2 pn q is true when p1,,pn are true.
An argument is valid if whenever all the premises are true
then the conclusion is true.
18
19
Modus Ponens
p = I have a total score over 96
q = I get an A for the class
I have a total score over 96
If I have a total score over 96, then I get an A for the class
Therefore, I get an A for this class
p
pq
q
Tautology:
(p (p q)) q
20
Modus Tollens
p = The power supply fails
pq
q
Tautology:
( (p q) q) p
p
21
Hypothetical Syllogism
p = I get a total score over 96
If I get a total score over 96 then I will have a 4.0 semester average.
pq
qr
pr
Tautology:
((p q) (q r)) (p r)
22
Disjunctive Syllogism
p = I am a student
q = I am a soccer player
I am a student or I am a soccer player
I am a not soccer player
Therefore, I am a student
pq
q
Tautology:
((p q) q) p
p
23
Addition
p = I am a student
q = I am a soccer player
I am a student
pq
Tautology:
p (p q)
24
Simplification
p = I am a student
q = I am a soccer player
I am a student and I am a soccer player
Therefore, I am a student
pq
Tautology:
(p q) p
25
Conjunction
p = I am a student.
q = I am a soccer player.
I am a student
I am a soccer player
Tautology:
((p) (q)) p q
pq
26
Resolution
p = I am taking discrete mathematics
q = I am taking calculus
r = I am taking linear algebra
I am taking discrete mathematics or I am taking calculus
I am not taking discrete mathematics or I am taking linear algebra
Therefore, I am taking calculus or I am taking linear algebra
pq
pr
qr
Tautology:
((p q ) ( p r)) (q r)
27
Example 1:
p = I am taking discrete mathematics
q = I am taking calculus
r = I am taking linear algebra
pq
pr
qr
r
Tautology:
((p q ) (p r) (q r)) r
28
Example 2:
It is not sunny this afternoon and it is colder than
yesterday
We will go swimming only if it is sunny
If we do not go swimming, then we will take a canoe trip
29
Universal Instantiation
(for an arbitrary object c from UoD)
Universal Generalization
(for any arbitrary element c from UoD)
Existential Instantiation
(for some specific object c from UoD)
Existential Generalization
(for some object c from UoD)
30
Direct Proofs
Start with premises and deduce the conclusion:
Assume that the premises are true
Apply rules of inferences and theorems
31
Vacuous Proofs
p q is vacuously true if p is false
In this case, p q is a vacuous proof
Example:
p : 0 > 1 (false)
q : Mars is an asteroid
p q is true
32
Trivial Proofs
p q is trivially true if q is true,
In this case, we have a trivial proof
Example:
p:x>1
q : 1 = 1 (true)
p q is true
33
Indirect Proofs
To prove p q,
we prove its contrapositive: q p
Example:
if n2 is even then n is even is equivalent to
if n is odd then n2 is odd
We can prove If n2 is even then n is even
by proving If n is odd then n2 is odd
34
Proof by Contradiction
To prove p, we assume p and derive a contradiction.
(pF) p
Proof Techniques-Quantifiers
x P(x): provide a proof, not just examples.
Example:
Prove that the product of any two odd integers
is odd.
Prove that if n is an integer and n2 is odd, then n is odd.
Prove that the sum of two rational numbers is rational.
36
Proof Techniques-Quantifiers
Disproving x P(x)
that P(k)
37