Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MAT1830
John Stillwell
The main problem of logic is to recognise
sentences that are logically true, that is, true
under all interpretations. In propositional
logic, such sentences are called tautologies.
5.1
Tautologies
5.2
Logical equ
Sentences and ar
they are the same tru
means is a ta
between sentences is
.
Example. p q
We know that p q
p
T
T
F
F
q
T
F
T
F
ables.
p
T
T
F
F
(T) T =
(T) F =
(F) T =
(F) F =
(F) = (F) F = T F = T,
hence (p) p is a tautology. (It is known
as the law of excluded middle.)
logic is to recognise
lly true, that is, true
ns. In propositional
e called tautologies.
5.2
Logical equivalence
q
T
F
T
F
If Stuart Broad is limping and Ian Bell is looking grumpy, then England
are losing the cricket match.
p: Stuart Broad is limping.
q: Ian Bell is looking grumpy.
r : England are losing the cricket match.
(p q) r
p could be T or F, q could be T or F, and r could be T or F.
So there are 2 2 2 = 8 ways to assign truth values to this statement.
Thats why there would be eight rows in the truth table.
Question How many ways are there to assign truth values to the
following statement?
((p1 p2 ) ((p3 p4 ) p1 )) (p2 p5 )
2 2 2 2 2 = 32
Question 5.1 There are two possibilities for each of the variables and
this gives a total of 2 2 2 = 2n possibilities.
John Stillwell
f logic is to recognise
ally true, that is, true
ons. In propositional
re called tautologies.
5.2
)p
T = F T = T,
Logical equivalence
q
T
F
T
F
pq
T
F
T
T
p
= F T = T,
= T F = T,
Example. p q (p) q
We know that p q has the truth table
p
T
T
F
F
q
T
F
T
F
pq
T
F
T
T
The expression
x 3 3x 2 + 3x + 1 x 3 x
(x 1)4
x +1
Similarly
((p (p q)) (p q)) (p q)
is logically equivalent to
q.
5.3
Useful equivalences
The following equivalences are the most frequently used in this algebra of logic.
Equivalence law
p q (p q) (q p)
Implication law
p q p q
Double negation law
p p
Idempotent laws
ppp
ppp
Commutative laws
pq qp
pq qp
Associative laws
p (q r) (p q) r
p (q r) (p q) r
Distributive laws
Remarks
1. The commutative
range terms, as in or
p q q p is like p
algebra, and p q
2. The associative
brackets. Since p (
can write either side
is like p + (q + r) =
in ordinary algebra.
3. The distributiv
pand combinations
p (q r)
is like
p(q + r)
p (p
p (q r) (p q) r
p (q r) (p q) r
Distributive laws
p (q r) (p q) (p r)
p (q r) (p q) (p r)
p (p
De Morgans laws
(p q) (p) (q)
(p q) (p) (q)
p (p q)
Identity laws
pTp
pFp
Annihilation laws
pFF
pTT
Inverse laws
p (p) F
p (p) T
Absorption laws
p (p q) p
p (p q) p
q
T
F
T
F
pq
T
F
F
F
(p q)
F
T
T
T
p
F
F
T
T
q
F
T
F
T
p q
F
T
T
T
p
T
T
F
F
q
T
F
T
F
pq
T
T
T
F
(p q)
F
F
F
T
p
F
F
T
T
q
F
T
F
T
p q
F
F
F
T
valences
p)
Remarks
1. The commutative laws are used to rearrange terms, as in ordinary algebra. The law
p q q p is like p + q = q + p in ordinary
algebra, and p q q p is like pq = qp.
2. The associative laws are used to remove
brackets. Since p (q r) (p q) r, we
can write either side simply as pq r. This
is like p + (q + r) = (p + q) + r = p + q + r
in ordinary algebra.
3. The distributive laws are used to expand combinations of and .
p (q r) (p q) (p r)
is like
p(q + r) = pq + pr.
The other distributive law is not like anything in ordinary algebra.
4. Some of these laws are redundant, in
the sense that other laws imply them. For
example, the absorption law
p r)
p r)
(p p) (p q)
by distributive law
p (p q)
by idempotent law
(p T) (p q)
by identity law
p (T q)
by distributive law
pT
by annihilation law
p
by identity law
q
T
T
F
F
T
T
F
F
r
T
F
T
F
T
F
T
F
qr
F
T
T
F
F
T
T
F
p (qr )
F
T
T
F
F
F
F
F
pq
T
T
F
F
F
F
F
F
pr
T
F
T
F
F
F
F
F
(p q)(p r )
F
T
T
F
F
F
F
F
SAT
SAT