Playground Documentation Challenges Full Docs
← All Challenges

#13. AND Identity

Easy if <…> contradict

Prove that equivalent(and(a,true),a) evaluates to true for any boolean a. This shows that true is the identity element for and.

Hint

Assume the opposite, then case-split on a. When a -> false: and(false,true) -> false and equivalent(false,false) -> true — contradiction. Similarly for a -> true.

Your Solution
Output