5 Logic and Proofs

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MA11: Lecture 6

Logic and Proof


Propositional Logic
Tautologies, Contradictions and Contingencies
Useful Logical Equivalences
Proofs without Truth Tables

. – p.1/10
Tautologies

Consider the logical expression


p ⇒ (p ∨ q)
and its truth table:
p q p∨q p ⇒ (p ∨ q)
T T T T
T F T T
F T T T
F F F T

The expression is true whatever the truth values of p and q .

This is known as a tautology.

. – p.2/10
Contradictions

Consider the logical expression


(p ∨ q) ∧ (¬p ∧ ¬q)
and its truth table:
p q p∨q ¬p ¬q ¬p ∧ ¬q (p ∨ q) ∧ (¬p ∧ ¬q)
T T T F F F F
T F T F T F F
F T T T F F F
F F F T T T F

The expression is false whatever the truth values of p and q .

This is known as a contradiction.

. – p.3/10
Examples
1. Two very useful tautologies are
• The excluded middle law: p ∨ ¬p p ¬p p ∨ ¬p
T F
F T

• The domination law: p∨T p T p∨T


T T
F T

2. Two very useful contradictions are


• The contradiction law: p ∧ ¬p p ¬p p ∧ ¬p
T F
F T

• The domination law: p∧F p F p∧T


T F
F F

. – p.4/10
Contingencies

A logical expression which is neither a tautology nor a


contradiction is known as a contingency.

Use truth tables to show whether


¬(p ⇒ q) ⇒ p
is a tautology, a contradiction or a contingency.

. – p.5/10
Notes

Saying that two logical expressions, P and Q, are


logically equivalent (i.e. P ≡ Q) is the same as saying
that P ⇔ Q is a tautology.

If a logical expression P is a tautology then ¬P is a


contradiction.

There are many logical equivalences which can be used


to manipulate logical expressions and construct proofs.

. – p.6/10
Useful Logical Equivalences

Complement laws ¬T ≡ F ¬F ≡ T
Excluded middle law p ∨ ¬p ≡ T
Contradiction law p ∧ ¬p ≡ F
Identity laws p∨F ≡ p p∧T ≡ p
Domination laws p∨T ≡ T p∧F ≡ F
Idempotent laws p∨p ≡ p p∧p ≡ p
Double negation law ¬¬p ≡ p
Commutative laws p∨q ≡ q∨p p∧q ≡ q∧p
Associative laws (p ∨ q) ∨ r ≡ p ∨ (q ∨ r)
(p ∧ q) ∧ r ≡ p ∧ (q ∧ r)
Distributive laws (p ∨ q) ∧ (p ∨ r) ≡ p ∨ (q ∧ r)
(p ∧ q) ∨ (p ∧ r) ≡ p ∧ (q ∨ r)
De Morgan’s laws ¬(p ∧ q) ≡ ¬p ∨ ¬q
¬(p ∨ q) ≡ ¬p ∧ ¬q

. – p.7/10
A First Look at Proofs

The proofs of the laws given on the previous slide have so


far been carried out using truth tables (cf. proof by cases).

Having proved that these laws hold, they can now be used in
their own right to construct more complicated proofs.

1. Prove, without the use of truth tables, that


(p ∧ (q ∨ ¬q)) ∨ p ≡ p

Proof:
(p ∧ (q ∨ ¬q)) ∨ p ≡ (p ∧ T) ∨ p Excluded middle law
≡ p∨p Identity law
≡ p Idempotent law

. – p.8/10
Examples
2. Prove each of the following without the use of truth tables.
a. ¬(p ∧ ¬q ∧ q) ≡ T
b. ¬p ∧ (q ∨ p) ≡ q ∧ ¬p
c. p ∨ (p ∧ q) ≡ p (This is one of the absorption laws.)

. – p.9/10
Summary

Some statements are always true, some are always


false, while the rest depend on the situation.

Some statements are equivalent, i.e. in any given


situation they will always have the same truth value.

These equivalences can be used, via substitution, to


manipulate expressions and form proofs.

. – p.10/10

You might also like