Made the caculation steps proper Haskell values to enable syntax, type and equality checking. 'Poor man's proofs'