DEV Community

Discussion on: Daily Challenge #168 - [Code golf] f (f (f b)) = f b

Collapse
 
cattheory profile image
joomy

Here's my solution in Coq:

Lemma lemma : forall (f : bool -> bool) (b : bool), f (f (f b)) = f b.
intros;case b eqn:G,(f b) eqn:H,(f (f b)) eqn:I;rewrite G,H,I in*;intuition. Qed.

The second line has 80 characters.