The Haskell road to Logic, Maths and programming excercise