Lecture 3 — Conditional Statements
Pre-work: Video 003 (Conditional Statements). See conditional-statements for the reference definitions this lecture builds on. Note: Applied Classes start in Week 2 and include an assessed component.
Learning goals
- Understand the connectives if…then (\(\to\)) and if and only if (\(\leftrightarrow\)).
- Know the equivalence \(p \to q \equiv \sim p \lor q \equiv \sim q \to \sim p\).
- Negate a conditional statement.
- Understand necessary and sufficient conditions.
Conditional (\(\to\))
| \(p\) | \(q\) | \(p \to q\) |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
\(p \to q\) is true whenever \(p\) is false — “vacuously true” by definition, not by intuition.
By definition, \(p \to q \equiv \sim p \lor q\), so any law of logical equivalence can be applied to conditionals by first rewriting \(\to\) this way.
\(p \to q\) can be phrased many equivalent ways in English: “\(p\) implies \(q\)”, “if \(p\) then \(q\)”, “\(q\) if \(p\)”, “\(p\) is sufficient for \(q\)”, “\(p\) only if \(q\)”, “\(q\) is necessary for \(p\)”.
Reminder: \(p \to q \not\equiv q \to p\) — see conditional-statements for the contrapositive/converse/inverse relationships.
Order of operations (extended)
- \(\sim\)
- \(\land, \lor\) (equal) — parenthesise, else left to right
- \(\to, \leftrightarrow\) (equal) — parenthesise, else left to right
E.g. \(p \to \sim q \lor r\) means \(p \to ((\sim q) \lor r)\) — always parenthesise to avoid ambiguity in your own work.
Notation: \(\leftrightarrow\) combines two statements into one (like \(+, -, \times\) on numbers). \(\equiv\) compares two statements (like \(=\) on numbers) — it is not itself a connective.
Necessary and sufficient conditions
- \(p\) is a necessary condition for \(q\) ⟺ “if \(\sim p\) then \(\sim q\)” ⟺ “if \(q\) then \(p\)” ⟺ “\(q\) only if \(p\)”.
- \(p\) is a sufficient condition for \(q\) ⟺ “if \(p\) then \(q\)” ⟺ “\(q\) if \(p\)”.
Examples:
- Being non-negative is necessary but not sufficient for a number to be the square of an integer (\(-9\) can’t be a square; \(7\) is non-negative but not a square).
- Being divisible by 4 is sufficient but not necessary for being even (\(8\) is divisible by 4 so even; \(10\) is even but not divisible by 4).
Biconditional (\(\leftrightarrow\))
\[a \leftrightarrow b \equiv (a \to b) \land (b \to a)\]
“\(a\) if and only if \(b\)” ≡ “\(a\) only if \(b\)” and “\(a\) if \(b\)” ≡ “\(b\) is necessary and sufficient for \(a\)”.
In-class activities
Activity 1: For “If the file is missing, then the program crashes”:
- Which have the same meaning (multiple allowed)? A. If the program crashes, the file is missing. B. The program crashes if the file is missing. C. If the program doesn’t crash, the file is not missing. D. The file is missing or the program crashes. E. The file is not missing or the program crashes.
- Write the negation of the original statement.
Activity 2: Demonstrate that \(\sim(p \to q) \not\equiv \sim p \to \sim q\).
Activity 3: Let \(p, q, r\) be statements. Show that \(p \to (q \lor r) \equiv (p \land \sim q) \to r\).
Activity 4: Let \(n\) be a positive integer.
- State a condition necessary but not sufficient for \(n\) divisible by 6.
- State a condition sufficient but not necessary for \(n\) divisible by 6.
- State a necessary and sufficient condition for \(n\) divisible by 6.
See also
- conditional-statements — the reference definitions, contrapositive/converse/inverse and the necessary-vs-sufficient table
- logical-equivalence-laws — the laws used in Activity 3
- 2026-07-30-logical-form-and-equivalence — Lecture 2 · 2026-08-03-valid-and-invalid-arguments — Lecture 4
- practice-problems — §3 Conditional Statements, with full worked solutions