## The Haskell Road to Logic, Maths and ProgrammingLong ago, when Alexander the Great asked the mathematician Menaechmus for a crash course in geometry, he got the famous reply There is no royal road to mathematics. Where there was no shortcut for Alexander, there is no shortcut for us. Still, the fact that we have access to computers and mature programming languages means that there are avenues for us that were denied to the kings and emperors of yore. The purpose of this book is to teach logic and mathematical reasoning in practice, and to connect logical reasoning with computer programming in Haskell. Haskell emerged in the 1990s as a standard for lazy functional programming, a programming style where arguments are evaluated only when the value is actually needed. Haskell is a marvelous demonstration tool for logic and maths because its functional character allows implementations to remain very close to the concepts that get implemented, while the laziness permits smooth handling of infinite data structures. This book does not assume the reader to have previous experience with either programming or construction of formal proofs, but acquaintance with mathematical notation, at the level of secondary school mathematics is presumed. Everything one needs to know about mathematical reasoning or programming is explained as we go along. After proper digestion of the material in this book, the reader will be able to write interesting programs, reason about their correctness, and document them in a clear fashion. The reader will also have learned how to set up mathematical proofs in a structured way, and how to read and digest mathematical proofs written by others. This is the updated, expanded, and corrected second edition of a much-acclaimed textbook. Praise for the first edition: Doets and van Eijck s The Haskell Road to Logic, Maths and Programming is an astonishingly extensive and accessible textbook on logic, maths, and Haskell. Ralf Laemmel, Professor of Computer Science, University of Koblenz-Landau |

### What people are saying - Write a review

#### Review: The Haskell Road to Logic, Maths and Programming. Second Edition

User Review - Maiz Lulkin - GoodreadsThe most hard core programming language ever - Haskell - presented in a really different and thought provoking way. For those interested in this topics - functional languages, logics and mathematical foundations - i think it's must have. Read full review

#### Review: The Haskell Road to Logic, Maths and Programming. Second Edition

User Review - GoodreadsThe most hard core programming language ever - Haskell - presented in a really different and thought provoking way. For those interested in this topics - functional languages, logics and mathematical foundations - i think it's must have. Read full review

### Contents

Getting Started | 1 |

Talking about Mathematical Objects | 27 |

Proof | 71 |

Copyright | |

9 other sections not shown

### Other editions - View all

The Haskell Road to Logic, Maths and Programming Kees Doets,Jan van Eijck,Jan Eijck Snippet view - 2004 |

### Common terms and phrases

acount algorithm approx arbitrary argument Assume bijection binary tree bisimulation Bool called Chapter co-domain coefficients complex number corecursive data type decForm defined definition difference disjunction divides divisor domain elem element equal equation equivalence class equivalence relation Example Exercise False finite foldl foldn foldr formula functional programming given gives Haskell induction hypothesis Induction step injective Integer integer partition iterate lambda abstraction logical mathematical induction means module natural numbers negate nodes non-empty notation operation pairs partition polynomial powerList predefined prefix Prelude prime numbers procedure proof propositional proved quantifiers rational number real numbers recursive reflexive relation representation restricted quantifiers rules sequence Show statement String subset Suppose surjective Theorem tower transitive transitive closure transitive relation tree of depth True truth table truth values TU0LP type Bool type declaration variable x:xs