0% found this document useful (0 votes)
96 views4 pages

02 PropLogicPrfs-DNFCombined - Handout PDF

The document provides steps to prove logical equivalences using direct proofs. It begins by proving the equivalence (p∧¬q) ∨ q ⇔ p∨q. Each step is justified using a logical equivalence such as commutativity or distribution. Examples are also given to prove statements are tautologies or not equivalent. The document emphasizes that every step of a direct proof must be justified with a logical equivalence.

Uploaded by

Vishal Upadhayay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views4 pages

02 PropLogicPrfs-DNFCombined - Handout PDF

The document provides steps to prove logical equivalences using direct proofs. It begins by proving the equivalence (p∧¬q) ∨ q ⇔ p∨q. Each step is justified using a logical equivalence such as commutativity or distribution. Examples are also given to prove statements are tautologies or not equivalent. The document emphasizes that every step of a direct proof must be justified with a logical equivalence.

Uploaded by

Vishal Upadhayay
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Prove: (p∧¬q) ∨ q ⇔ p∨q

(p∧¬q) ∨ q Left-Hand Statement


Proofs Using Logical ⇔ q ∨ (p∧¬q) Commutative
Equivalences ⇔ (q∨p) ∧ (q ∨¬q) Distributive
⇔ (q∨p) ∧ T Negation
Rosen (6th Ed.) 1.2 ⇔ q∨p Identity
⇔ p∨q Commutative
Note: These are all Direct Proofs
Begin with exactly the left-hand side statement
End with exactly what is on the right
Justify EVERY step with a logical equivalence

Prove: (p∧¬q) ∨ q ⇔ p∨q Prove: p → q ⇔ ¬q → ¬p


(p∧¬q) ∨ q Left-Hand Statement Contrapositive
p→q
⇔ q ∨ (p∧¬q) Commutative
⇔ ¬p ∨ q Implication Equivalence
⇔ (q∨p) ∧ (q ∨¬q) Distributive
⇔ q ∨ ¬p Commutative
Why did we need this step?
⇔ ¬(¬q) ∨ ¬p Double Negation
Our logical equivalence specified that ∨ is distributive on the
right. This does not guarantee distribution on the left! ⇔ ¬q → ¬p Implication Equivalence
Ex.: Matrix multiplication
(Note that whether or not ∨ is distributive on the left is not the
point here.)

Prove: p → p ∨ q is a tautology Why do I have to justify


Must show that the statement is true for any value of p and q.
everything?
p→p∨q •  Note that your operation must have the
⇔ ¬p ∨ (p ∨ q) Implication Equivalence same order of operands as the rule you
⇔ (¬p ∨ p) ∨ q Associative quote unless you have already proven (and
⇔ (p ∨ ¬p) ∨ q Commutative cite the proof) that order is not important.
⇔ T∨q Negation
•  3+4 = 4+3
⇔ q∨T Commutative
•  3/4 ≠ 4/3
⇔ T Domination
A*B ≠ B*A for everything!
This tautology is called the addition rule of inference.

1
Prove: (p∧q) → p is a tautology Prove or Disprove
p → q ⇔ p ∧ ¬q ???
(p∧q) → p
⇔ ¬(p∧q) ∨ p Implication Equivalence
To prove that something is not true it is
⇔ (¬p∨¬q) ∨ p DeMorgan’s
enough to provide one counter-example.
(Something that is true must be true in every
⇔ (¬q∨¬p) ∨ p Commutative
case.)
⇔ ¬q∨ (¬p ∨ p) Associative
⇔ ¬q∨ (p ∨ ¬p) Commutative
p q p→q p∧¬q
⇔ ¬q∨ T Negation FT T F
⇔ T Domination The statements are not logically equivalent

Class Exercise: Without using truth tables,


prove that ((p∨q)∧¬p)→q is a tautology.
Prove:¬p ↔ q ⇔p ↔ ¬q p∧T ⇔ p; p∨F ⇔ p Identity Laws
p∨T ⇔ T; p∧F ⇔ F Domination Laws
p∨p ⇔ p; p∧p ⇔ p Idempotent Laws
¬p ↔ q ¬(¬p) ⇔ p Double Negation Law
p∨q ⇔ q∨p; p∧q ⇔ q∧p Commutative Laws
⇔ (¬p→q) ∧ (q→¬p) Biconditional Equivalence (p∨q)∨ r ⇔ p∨ (q∨r); (p∧q) ∧ r ⇔ p ∧ (q∧r) Associative Laws
⇔ (¬¬p∨q) ∧ (¬q∨¬p) Implication Equivalence (x2) p∨(q∧r) ⇔ (p∨q)∧(p∨r) Distributive Laws
p∧(q∨r) ⇔ (p∧q)∨(p∧r)
⇔ (p∨q) ∧ (¬q∨¬p) Double Negation ¬(p∨q)⇔(¬p ∧ ¬q) De Morgan’s Laws
⇔ (q∨p) ∧ (¬p∨¬q) Commutative ¬(p∧q)⇔(¬p ∨ ¬q)
p ∨ (p∧q) ⇔ p Absorption Laws
⇔ (¬¬q∨p) ∧ (¬p∨¬q) Double Negation p ∧ (p∨q) ⇔ p
⇔ (¬q→p) ∧ (p→¬q) Implication Equivalence (x2) p ∨ ¬p ⇔ T Negation Laws
p ∧ ¬p ⇔ F
⇔ p ↔ ¬q Biconditional Equivalence (p→q) ⇔ (¬p ∨ q) Implication Equivalence

Class Exercise: Without using truth tables,


prove that ((p∨q)∧¬p)→q is a tautology.
((p∨q)∧¬p)→q
¬((p∨q)∧¬p) ∨ q Implication Equivalence

Normal or Canonical Forms
⇔ (¬(p∨q) ∨ ¬¬p) ∨ q DeMorgan
⇔ (¬(p∨q) ∨ p) ∨ q Double Negation
⇔ ¬(p∨q) ∨ (p∨q) Associative Rosen (6th Ed.) 1.2 (exercises)
⇔ (p∨q) ∨ ¬(p∨q) Commutative
⇔ T Negation

2
Logical Operators Functionally Complete
∨ - Disjunction Do we need all these? •  A set of logical operators is called
∧ - Conjunction functionally complete if every compound
¬ - Negation proposition is logically equivalent to a
→ - Implication p→q = ¬p ∨ q compound proposition involving only these
⊕ - Exclusive or (p ∧ ¬q) ∨ (¬p ∧ q) logical operators.
↔ - Biconditional p↔q⇔ •  ∧, ∨, and ¬ form a functionally complete
(p→q) ∧ (q→p) ⇔ set of operators.
(¬p ∨ q) ∧ (¬q ∨ p)

Are ¬(p∨(¬p∧q))
Are ¬(p∨(¬p∧q))
and (¬p ∧ ¬q) equivalent?
¬(p∨(¬p∧q))
and (¬p ∧ ¬q) equivalent?
⇔  ¬p ∧ ¬(¬p∧q) DeMorgan •  Even though both are expressed with only
⇔ ¬p ∧ (¬¬p∨¬q) DeMorgan ∧, ∨, and ¬, it is still hard to tell without
⇔ ¬p ∧ (p∨¬q) Double Negation doing a proof.
⇔ (¬p∧p)∨(¬p ∧¬q) Distribution •  What we need is a unique representation of
⇔ (p∧¬p)∨(¬p ∧¬q) Commutative a compound proposition that uses ∧, ∨, and
⇔ F ∨(¬p ∧¬q) Negation ¬.
⇔  (¬p ∧¬q) ∨ F Commutative
•  This unique representation is called the
⇔  (¬p ∧¬q) Identity
Disjunctive Normal Form.

Disjunctive Normal Form Truth Table


•  A disjunction of conjunctions where every p q p⊕q (p∧¬q) ∨ (¬p∧q)
variable or its negation is represented once T T F F
in each conjunction (a minterm) T F T T
–  each minterm appears only once
F T T T
Example: DNF of p⊕q is
F F F F
(p∧¬q)∨(¬p∧q).

3
How to find the DNF of (p ∨ q)→¬r
Method to construct DNF p q r (p ∨ q)
¬r (p ∨ q)→¬r
•  Construct a truth table for the proposition. T T T T F F
T T F T T T
•  Use the rows of the truth table where the
T F T T F F
proposition is True to construct minterms T F F T T T
–  If a variable is false, use the negation of the F T T T F F
variable in the minterm F T F T T T
–  If the variable is true, use the propositional F F T F F T
variable in the minterm F F F F T T
•  Connect the minterms with ∨’s. There are five sets of input that make the statement
true. Therefore there are five minterms.

p q r (p ∨ q)
¬r (p ∨ q)→¬r
T T T T F F
Can we show that just ¬ and ∧ form a set
T T F T T T of functionally complete operands?
T F T T F F
Use DeMorgan’s Laws on the DNF.
T F F T T T
Example:
F T T T F F
(p ∨ q)→¬r
F T F T T T
⇔ (p∧q∧¬r) ∨ (p∧¬q∧¬r) ∨ (¬p∧q∧¬r) ∨
F F T F F T (¬p∧¬q∧r) ∨ (¬p∧¬q∧¬r) DNF
F F F F T T ⇔ ¬ ¬[ (p∧q∧¬r) ∨ (p∧¬q∧¬r) ∨ (¬p∧q∧¬r) ∨
From the truth table we can set up the DNF (¬p∧¬q∧r) ∨ (¬p∧¬q∧¬r)] Double Neg
(p ∨ q)→¬r ⇔ (p∧q∧¬r) ∨ (p∧¬q∧¬r) ∨ ⇔ ¬[¬(p∧q∧¬r) ∧ ¬(p∧¬q∧¬r) ∧ ¬(¬p∧q∧¬r) ∧
(¬p∧q∧¬r) ∨ (¬p∧¬q∧r) ∨ (¬p∧¬q∧¬r) ¬(¬p∧¬q∧r) ∧ ¬(¬p∧¬q∧¬r)] DeMorgan

Find an expression equivalent to p → q Now can we write an equivalent statement to p → q


that uses only conjunctions and negations. that uses only disjunctions and negations?
p q p→q
How many minterms in p→q
T T T the DNF? ⇔ ¬[¬(p∧q) ∧ ¬(¬p∧ q) ∧ ¬(¬p∧ ¬q)] From Before
T F F ⇔ ¬[(¬p∨¬q) ∧ (¬¬p∨¬q) ∧ (¬¬p ∨ ¬¬q)] DeMorgan
F T T ⇔ ¬[(¬p∨¬q) ∧ (p∨¬q) ∧ (p∨q)] Doub. Neg.
⇔ ¬(¬p∨¬q) ∨ ¬(p∨¬q) ∨ ¬(p∨q) DeMorgan
F F T
The DNF of p → q is (p∧q) ∨ (¬p∧ q) ∨ (¬p∧ ¬q).
Then, applying DeMorgan’s Law, we get that this is
equivalent to
¬[¬(p∧q) ∧ ¬(¬p∧ q) ∧ ¬(¬p∧ ¬q)].

You might also like