Skip to content

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
#pqf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSEFALSE
3TRUETRUETRUE

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
#pqf
0FALSEFALSEFALSE
1FALSETRUEFALSE
2TRUEFALSEFALSE
3TRUETRUETRUE

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
#pqf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

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
#pf
0FALSETRUE
1TRUETRUE
p OR NOT p
  1. Complement · A OR NOT A = TRUE
    p OR NOT p → TRUEResult: TRUE
TRUE · verified equivalent on every row · simplified, not minimal

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
#pf
0FALSEFALSE
1TRUEFALSE
p AND NOT p
  1. Complement · A AND NOT A = FALSE
    p AND NOT p → FALSEResult: FALSE
FALSE · verified equivalent on every row · simplified, not minimal

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)
#pqf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

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
#pqf
0FALSEFALSETRUE
1FALSETRUEFALSE
2TRUEFALSETRUE
3TRUETRUETRUE

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)
#pqf
0FALSEFALSEFALSE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUEFALSE

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
#pqf
0FALSEFALSETRUE
1FALSETRUETRUE
2TRUEFALSETRUE
3TRUETRUETRUE

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)
#pqrf
0FALSEFALSEFALSETRUE
1FALSEFALSETRUETRUE
2FALSETRUEFALSETRUE
3FALSETRUETRUETRUE
4TRUEFALSEFALSETRUE
5TRUEFALSETRUETRUE
6TRUETRUEFALSETRUE
7TRUETRUETRUETRUE

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

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.