Playground Documentation Challenges Full Docs
← All Challenges

#20. Contrapositive

Medium if <…> contradict

Prove that equivalent(implies(a,b), implies(not(b),not(a))) evaluates to true for all booleans a and b. An implication and its contrapositive are logically equivalent.

Hint

Case analysis on both a and b (4 combinations). For each, substitute all values into the expression and derive a contradiction.

Your Solution
Output