Skip to content
The Lumenary

Each worksheet prints cleanly on A4 or Letter. Answer keys are on a separate page.

The Lumenary · Grades 9–12

Propositional logic and truth tables

Name: ______________________

Date: ______________________

You will learn to

  • Build truth tables for compound statements and classify formulas as tautologies, contradictions or contingent
  • Test logical equivalence with truth tables, and prove De Morgan's laws and ¬(P→Q)≡P∧¬Q\neg(P \to Q) \equiv P \wedge \neg Q
  • Distinguish an implication from its converse, inverse and contrapositive, and explain why only the contrapositive is equivalent to it
  • Negate compound and quantified statements, including implications
  • Recognise valid argument forms such as modus ponens and modus tollens, and the fallacy of affirming the consequent
  1. 1.

    Is the statement “If 77 is even, then 77 is divisible by 44” true or false?

    • A.True
    • B.False, because 77 is not divisible by 44
    • C.Neither: it is meaningless because 77 is odd
  2. 2.

    Which statement is the contrapositive of “If a shape is a square, then it is a rectangle”?

    • A.If a shape is not a rectangle, then it is not a square.
    • B.If a shape is a rectangle, then it is a square.
    • C.If a shape is not a square, then it is not a rectangle.
    • D.A shape is a square and it is not a rectangle.
  3. 3.

    Which statement is the negation of “If it is a public holiday, then the bakery is closed”?

    • A.It is a public holiday and the bakery is open.
    • B.If it is a public holiday, then the bakery is open.
    • C.If it is not a public holiday, then the bakery is open.
    • D.It is not a public holiday and the bakery is open.
  4. 4.

    What is the negation of “Amara speaks Hausa and Yoruba”?

    • A.Amara does not speak Hausa or she does not speak Yoruba.
    • B.Amara speaks neither Hausa nor Yoruba.
    • C.Amara speaks exactly one of Hausa and Yoruba.
  5. 5.

    How many rows does the truth table of (P∧Q)→(R∨¬S)↔T(P \wedge Q) \to (R \vee \neg S) \leftrightarrow T have?

  6. 6.

    Which of these formulas are tautologies? (Choose all that apply.)

    • A.P∨¬PP \vee \neg P
    • B.(P→Q)→(Q→P)(P \to Q) \to (Q \to P)
    • C.((P→Q)∧¬Q)→¬P\big((P \to Q) \wedge \neg Q\big) \to \neg P
    • D.P→(P∨Q)P \to (P \vee Q)
    • E.((P→Q)∧Q)→P\big((P \to Q) \wedge Q\big) \to P
  7. 7.

    Each card has a letter on one side and a whole number on the other. You see E, M, 6 and 3. Rule: “If a card has a vowel on one side, then it has an even number on the other.” Which cards must you turn over to check the rule? (Choose all that apply.)

    • A.E
    • B.M
    • C.6
    • D.3
  8. 8.

    Which statement is the negation of “Every whole number divisible by 44 is divisible by 88”?

    • A.Some whole number is divisible by 44 but not by 88.
    • B.Every whole number divisible by 44 is not divisible by 88.
    • C.Every whole number divisible by 88 is divisible by 44.
    • D.No whole number divisible by 88 is divisible by 44.
  9. 9.

    Which Lean statement says that a conditional is equivalent to its contrapositive (for all propositions p and q)?

    • A.(p → q) ↔ (¬q → ¬p)
    • B.(p → q) ↔ (q → p)
    • C.(p → q) ↔ (¬p → ¬q)
    • D.¬(p → q) ↔ (p ∧ q)
  10. 10.

    Write is_tautology(f, n), which returns True exactly when the Python function f of n boolean arguments returns True for every combination of arguments. Then write equivalent(f, g, n) using it. (Hint: itertools.product([True, False], repeat=n) lists all rows.)

    Computational — Practice

Code: Apache-2.0 · Content: CC BY-SA 4.0