Skip to content

Truth tables and logical equivalence

5 min read

Short answer

A truth table lists the value of a statement for every assignment of truth values. Two statements are logically equivalent when their tables match. Key facts: p→q≡¬p∨qp\to q\equiv\neg p\lor q and De Morgan's laws ¬(p∧q)≡¬p∨¬q\neg(p\land q)\equiv\neg p\lor\neg q, ¬(p∨q)≡¬p∧¬q\neg(p\lor q)\equiv\neg p\land\neg q.

p → q is false only when compared with Contrapositive and conversep → q is false onlywhenp is true and q isfalseA false hypothesismakes it trueEquivalent to ¬p ∨ qContrapositive andconverse¬q → ¬p is equivalentto p → qThe converse q → p isNOT equivalentUse the contrapositiveto prove
An implication is equivalent to its contrapositive, not to its converse.

Building a table

With nn variables there are 2n2^n rows. List all combinations, compute sub-expressions column by column, and compare the final columns of the two statements.

Why implication is odd

"If it rains, the ground is wet" is only broken by rain with a dry ground. If it does not rain, the promise is not violated, so the implication counts as true.

Worked example

Show with a truth table that p→qp\to q is equivalent to ¬p∨q\neg p\lor q.

Rows (p,q)(p,q): (T,T)(T,T): p→q=Tp\to q=T, ¬p∨q=F∨T=T\neg p\lor q=F\lor T=T. (T,F)(T,F): FF and F∨F=FF\lor F=F. (F,T)(F,T): TT and T∨T=TT\lor T=T. (F,F)(F,F): TT and T∨F=TT\lor F=T. The columns agree: T,F,T,TT,F,T,T.

Try it yourself

Write the negation of "x>0x>0 and xx is even" using De Morgan's law.

Show the answer

¬(p∧q)≡¬p∨¬q\neg(p\land q)\equiv\neg p\lor\neg q, so the negation is "x≤0x\le0 or xx is odd".

Keep going with practice

Vidi's probability lessons use the same AND, OR and NOT rules for events.