MathematicsFoundation20 min read

Logic

Statements, truth tables, and the difference between a proof and a good guess

This topic appears in:

01

A statement is a sentence that can be false

In logic, a statement (or proposition) is a declarative sentence that is either true or false, but never both and never neither. "Lahore is in Pakistan" is a statement, and it is true. "7 is an even number" is a statement, and it is false — being false does not stop something from being a statement.

Questions, commands and opinions are not statements. "What time is it?", "Close the door" and "Mathematics is beautiful" cannot be assigned a truth value, so logic has nothing to say about them.

Statements are labelled p, q, r, and their truth value is written T or F. Everything else in this chapter is built from combining them.

NameSymbolRead asTrue when…
Negation~pnot pp is false
Conjunctionp ∧ qp and qboth are true
Disjunctionp ∨ qp or qat least one is true
Conditionalp → qif p then qexcept when p is true and q is false
Biconditionalp ↔ qp if and only if qboth have the same truth value
02

Truth tables

A truth table lists every possible combination of truth values for the simple statements and works out the compound statement for each. With two statements there are 2² = 4 rows; with three there are 2³ = 8. Set the rows out in the same order every time — TT, TF, FT, FF — and you will never miss one.

Four of the five connectives are exactly what everyday language would suggest. The conditional is the one that surprises people.

Look at p → q. Only the second row is false. When the hypothesis p is false, the implication counts as true whatever q does — the highlighted row is the only way to break a conditional.

03

Why a false hypothesis makes a true implication

Suppose a teacher says: "If you score above 90, I will give you a prize." When has that promise been broken? Only in one situation — you scored above 90 and got nothing. If you scored 60 and got no prize, the promise was not broken; it simply never came into play. If you scored 60 and got a prize anyway, the promise was still not broken.

So p → q is false in exactly one case: p true, q false. In every other case it is true. This is called vacuous truth when p is false, and it is the single most tested idea in the chapter.

The conditional is not the same as "causes"

In logic, p → q makes no claim that p brings q about. "If 2 + 2 = 5 then the moon is made of cheese" is a true statement, because the hypothesis is false. Everyday language rarely uses "if… then" this way, which is exactly why the exam asks about it.

04

Converse, inverse and contrapositive

Given a conditional p → q, three related statements can be built from it. They are easy to write and easy to confuse, so learn them by what happens to the two halves.

NameFormFrom "If it is raining, the ground is wet"
Conditionalp → qIf it is raining, the ground is wet
Converseq → pIf the ground is wet, it is raining (swap)
Inverse~p → ~qIf it is not raining, the ground is not wet (negate)
Contrapositive~q → ~pIf the ground is not wet, it is not raining (swap and negate)
p → q ≡ ~q → ~p(a statement and its contrapositive are equivalent)q → p ≡ ~p → ~q(converse and inverse are equivalent to each other)the contrapositive always matches the original; the converse need not

Read the rain example again

The original is clearly true. The converse is not — the ground could be wet because somebody washed a car. The contrapositive is true, and obviously so: dry ground means it cannot have been raining. That pattern holds in general, which is why mathematicians so often prove the contrapositive instead of the original statement.

05

Tautologies, and the two kinds of reasoning

A compound statement whose truth-table column is all T is called a tautology — it is true no matter what the parts are. One whose column is all F is a contradiction. Anything else is a contingency. Two statements are logically equivalent when their columns match row for row.

The chapter closes with the distinction between the two ways of arguing to a conclusion.

  • Deductive reasoning goes from general to particular. "All squares have four equal sides; ABCD is a square; therefore ABCD has four equal sides." If the premises are true, the conclusion is guaranteed. This is what mathematical proof is made of.
  • Inductive reasoning goes from particular to general. "3, 5, 7 and 11 are odd primes, so all primes are odd." The conclusion is only probable, and this one is false — 2 is prime and even. Induction suggests results; deduction proves them.
Worked example

Show that p ∨ ~p is a tautology.

  1. There is only one simple statement, so the table has 2¹ = 2 rows: p = T and p = F.The number of rows is 2 raised to the number of distinct statements.
  2. Row 1: p = T, so ~p = F, and T ∨ F = T.A disjunction needs only one true part.
  3. Row 2: p = F, so ~p = T, and F ∨ T = T.
  4. Every entry in the final column is T, so the statement is a tautology.This particular one is the law of the excluded middle: either something is so, or it is not.

Both rows give T, so p ∨ ~p is a tautology.

Before you leave this chapter

  1. A statement must be capable of being true or false. Questions and commands are not statements.
  2. n simple statements give 2ⁿ rows in the truth table.
  3. p → q is false in one case only: p true and q false.
  4. Contrapositive ≡ original. Converse ≡ inverse. The converse is NOT equivalent to the original.
  5. Deduction proves; induction only suggests. A single counterexample destroys an inductive conclusion.

Practice questions

6 questions · 20 marks · full working on every one

Try each one on paper first, then open the working. The marks are shown where they are actually awarded, because that is where they are actually lost.

Short questions

3 · 6 marks

Two marks each, in the style of the short-question section of the paper. Answer in two or three lines.

SQ1[2 marks]
Define a statement in logic and give one example of a sentence that is not a statement.
Model answer

A statement is a declarative sentence that is either true or false, but not both. "Open the window" is not a statement, because a command cannot be assigned a truth value.

Examiner tip. The phrase "but not both" is part of the definition and is often worth its own mark.

SQ2[2 marks]
Write the converse and the contrapositive of: "If a number is divisible by 6, then it is divisible by 3."
Model answer

Converse: if a number is divisible by 3, then it is divisible by 6. Contrapositive: if a number is not divisible by 3, then it is not divisible by 6.

Examiner tip. Notice the original and the contrapositive are both true, while the converse is false (9 is divisible by 3 but not by 6). That is the pattern the examiner is testing.

SQ3[2 marks]
Under what circumstances is the conditional p → q false?
Model answer

Only when p is true and q is false. In all three other combinations the conditional is true, including both cases where p is false.

Examiner tip. Answer with the single case, not with a list of the true ones. "One case only" is what the mark scheme is looking for.

Solved numericals

2 · 8 marks

Full working, one step per line, with the marks shown where they are awarded.

N1[4 marks]
Construct a truth table for ~(p ∧ q) and for ~p ∨ ~q, and state what your tables show.
Full working
  1. Four rows listed in a systematic order: TT, TF, FT, FFa missing row loses this mark even if the rest is right[1]
  2. Column for ~(p ∧ q): F, T, T, Tp ∧ q is T only in the first row, so its negation is F only there[1]
  3. Column for ~p ∨ ~q: F, T, T, T[1]
  4. The two columns are identical, so the statements are logically equivalent — this is De Morgan's lawnaming the law is not required, but the equivalence statement is[1]

Both columns read F, T, T, T, so ~(p ∧ q) ≡ ~p ∨ ~q.

Examiner tip. For any "show these are equivalent" question, the final mark is for the sentence comparing the columns. A table with no conclusion is an incomplete answer.

N2[4 marks]
Determine whether (p ∧ q) → p is a tautology, a contradiction or a contingency.
Full working
  1. Four rows, with the column for p ∧ q: T, F, F, F[1]
  2. Row 1: T → T = T[1]
  3. Rows 2–4 all have a false hypothesis, so each conditional is Tthis is where vacuous truth is being tested[1]
  4. The final column is T, T, T, T, so the statement is a tautology[1]

A tautology — the final column is all T.

Examiner tip. When the hypothesis of a conditional is false, stop and write T. Working out what q does in that row is wasted time.

Long questions

1 · 6 marks

Theory and numerical together, as they appear in the long-question section.

LQ1[6 marks]
Consider the statement: "If a quadrilateral is a square, then it is a rectangle."
  1. Write the statement in symbolic form, defining p and q.
  2. Write its converse and state, with a reason, whether the converse is true.
  3. Write its contrapositive and explain why it must have the same truth value as the original.
Mark scheme
  1. Let p: the quadrilateral is a square; q: the quadrilateral is a rectangle. Statement: p → qboth p and q must be defined[1]
  2. Converse: q → p — if a quadrilateral is a rectangle then it is a square[1]
  3. The converse is false[1]
  4. Counterexample: a 2 cm by 5 cm rectangle is not a squarea counterexample is required, not just the verdict[1]
  5. Contrapositive: ~q → ~p — if a quadrilateral is not a rectangle then it is not a square[1]
  6. A conditional and its contrapositive have identical truth tables, so they are logically equivalent and must always agreeaccept an argument from the truth table[1]

(a) p → q (b) q → p, false — a 2 × 5 rectangle is not a square (c) ~q → ~p, equivalent to the original

Examiner tip. Whenever you claim a statement is false, produce a counterexample. One concrete shape or number is worth a full mark and takes a single line.