Logic exercises for philosophy courses, with answers
Ten exercises in the style of an introductory philosophy course: propositions p, q, r joined by the connectives of propositional logic. For each, build the truth table and classify the formula as a tautology, a contradiction or a contingency; several are the classic argument forms, so validity is part of the answer.
The notation is the one used in the course: -> for the conditional, <-> for the biconditional, AND, OR and NOT for conjunction, disjunction and negation. Rows are ordered with p as the most significant bit, so for two propositions row 0 is p = FALSE, q = FALSE and row 3 has both TRUE; the solutions name rows as assignments. The classification line under each problem gives the engine's verdict, and the table lets you check every row of your own.
The argument forms appear as single conditionals, premises in the antecedent and conclusion in the consequent: modus ponens, disjunctive syllogism and hypothetical syllogism are tautologies and therefore valid arguments; affirming the consequent is contingent and therefore an invalid argument, and its FALSE row is the counterexample. The law of excluded middle, the principle of non-contradiction and the contraposition equivalence complete the set.
1. Build the truth table of p -> q and classify it. p -> q
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
p -> q Classification: contingent
Contingency: FALSE only on p = TRUE, q = FALSE, TRUE on the other three rows, two of them vacuously.
2. Build the truth table of (p -> q) AND p and classify it. (p -> q) AND p
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | FALSE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
(p -> q) AND p Classification: contingent
Contingency: TRUE on a single row, p = TRUE, q = TRUE. These are the two premises of modus ponens taken together; the next problem adds the conclusion.
3. Build the truth table of ((p -> q) AND p) -> q and classify it. Is modus ponens valid? ((p -> q) AND p) -> q
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
(p -> q) AND p -> q Classification: tautology
Tautology: on the only row where both premises hold, q holds too, so modus ponens is a valid argument.
4. Build the truth table of p OR NOT p and classify it. p OR NOT p
| # | p | f |
|---|---|---|
| 0 | FALSE | TRUE |
| 1 | TRUE | TRUE |
p OR NOT p- Complement ·
A OR NOT A = TRUEp OR NOT p→TRUEResult:TRUE
Classification: tautology
Tautology, the law of excluded middle: TRUE on both rows.
5. Build the truth table of p AND NOT p and classify it. p AND NOT p
| # | p | f |
|---|---|---|
| 0 | FALSE | FALSE |
| 1 | TRUE | FALSE |
p AND NOT p- Complement ·
A AND NOT A = FALSEp AND NOT p→FALSEResult:FALSE
Classification: contradiction
Contradiction, the principle of non-contradiction: FALSE on both rows.
6. Build the truth table of (p -> q) <-> (NOT q -> NOT p) and classify it. (p -> q) <-> (NOT q -> NOT p)
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
p -> q <-> NOT q -> NOT p Classification: tautology
Tautology: the conditional and its contrapositive have the same table, both FALSE only on p = TRUE, q = FALSE, so they are logically equivalent.
7. Build the truth table of ((p -> q) AND q) -> p and classify it. Is the argument valid? ((p -> q) AND q) -> p
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | FALSE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
(p -> q) AND q -> p Classification: contingent
Contingency, so affirming the consequent is an invalid argument. The counterexample is p = FALSE, q = TRUE: the premises hold and the conclusion fails.
8. Build the truth table of (p OR q) AND NOT (p AND q) and classify it. (p OR q) AND NOT (p AND q)
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | FALSE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | FALSE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
(p OR q) AND NOT (p AND q) Classification: contingent
Contingency: TRUE exactly when p and q differ, p = FALSE, q = TRUE and p = TRUE, q = FALSE. This is the exclusive disjunction written with the basic connectives.
9. Build the truth table of ((p OR q) AND NOT p) -> q and classify it. Is the argument valid? ((p OR q) AND NOT p) -> q
| # | p | q | f |
|---|---|---|---|
| 0 | FALSE | FALSE | TRUE |
| 1 | FALSE | TRUE | TRUE |
| 2 | TRUE | FALSE | TRUE |
| 3 | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
(p OR q) AND NOT p -> q Classification: tautology
Tautology: the premises hold only on p = FALSE, q = TRUE, where q is TRUE; disjunctive syllogism is valid.
10. Build the truth table of ((p -> q) AND (q -> r)) -> (p -> r) and classify it. Is the argument valid? ((p -> q) AND (q -> r)) -> (p -> r)
| # | p | q | r | f |
|---|---|---|---|---|
| 0 | FALSE | FALSE | FALSE | TRUE |
| 1 | FALSE | FALSE | TRUE | TRUE |
| 2 | FALSE | TRUE | FALSE | TRUE |
| 3 | FALSE | TRUE | TRUE | TRUE |
| 4 | TRUE | FALSE | FALSE | TRUE |
| 5 | TRUE | FALSE | TRUE | TRUE |
| 6 | TRUE | TRUE | FALSE | TRUE |
| 7 | TRUE | TRUE | TRUE | TRUE |
The engine found no law that shortens this expression; it is already as short as its rewriting laws can make it.
(p -> q) AND (q -> r) -> p -> r Classification: tautology
Tautology on all eight rows: hypothetical syllogism is valid. Wherever both conditionals hold, p TRUE forces q and then r.
Questions
Why is p -> q TRUE when p is FALSE?
Because a conditional only claims that q holds whenever p does; it makes no claim about the rows where p fails, and the convention is that an unfulfilled condition does not falsify the claim. Those rows are called vacuously TRUE. The only row that falsifies p -> q is p = TRUE, q = FALSE.
Related
Glossary
Compare
See also
- Lesson 4: Truth tables (beginner, 12 min)
- Lesson 8: Arguments and validity (intermediate, 15 min)
- Valid argument in logic: meaning and examples
- Contrapositive in logic: meaning and examples
- Modus tollens: A → B, NOT B, therefore NOT A (valid)
Practice
Generated from the Tangibool engine, semantics tangibool-semantics/1, engine 1.0.0, build . Every table, map, simplification and verdict on these pages was computed by the Tangibool engine when the site was built, and every claim was re-checked by the same exact checker the app uses. Limits are stated where they apply. © 2026 Foreranger LTD.