26 of 28 people found the following review helpful
on December 2, 2009
The 'Haskell Road to Logic' is a wonderful introduction to the mathematics that lie behind functional programming and computer science. Readers should however be aware that this book is not, and does not pretend to be, a book about programming in Haskell. It is really a text book about topics in mathematics that are of particular interest to computer scientists. What distinguishes the book from many others is its use of Haskell to implement mathematical structures that are usually taught as abstract concepts. This approach makes the mathematics far more approachable for computer programmers than many other text books. Presumably it should also make for an excellent introduction to computer programming for the mathematically inclined.
While the book is easy to read and has a friendly writing style, it not particularly well suited to casual reading. To really understand the subject being discussed the reader will probably need to solve most of the exercises in the text. The good news is this requires minimal prior mathematical training (the authors expect familiarity with "secondary school mathematics"). Solving the exercises will also train the reader in writing, and proving the correctness of, short functional programs.
The book has a minor few faults. One is a relatively large number of minor errors (many of which are noted in the errata available on the book's website). Another is that some major topics are introduced in exercises without much discussion, particularly in the later chapters. But these are but quibbles in a review of a fantastic math book for programmers.
72 of 85 people found the following review helpful
on April 9, 2006
Want to learn discrete math as in the non-calculus version of Math 101? Willing to work hard to learn it? Then this is the book for you! It is written in a user friendly style. The book has a chatty tone when explaining serious topics. The chat is the talk of experts, however, so it should never be underestimated. The book will teach you the functional programming language Haskell. This language is the most modern version of the Lisp family to have received any significant attention. It features advanced type features and lazy evaluation. The book covers all the "classic" topics of a discrete math course, to a considerable depth. Best of all, they are all implemented in Haskell. All except for the predicate calculus, that is. It would be a major piece of work indeed to have any implementation of this topic in a work at this level! The book teaches logic by example. One is taught the meaning, the rules and the insider's "recipes" of mathematical proofs. The book then covers the standard topics of sets, relations, functions, and induction / recursion with impressive computer implementations. The book goes on to a quick overview of the construction of the number systems of mathematics. It proceeds to a substantial treatment of combinatorics in a short space which includes implementation of polynomial solutions to recursion relations. Then it is on to corecursion, power series, and a hint of domain theory. The book ends with a modern chapter on the elements of set theory. All in all an excellent book! IMHO it is the best book out there on the topics in a discrete math course. It is amazing that all of this (except the serious parts of logic) could be implemented in Haskell so successfully. The one caveat about the book is that if you want to benefit fully from it, you are going to have to do some hard work.
32 of 36 people found the following review helpful
on January 30, 2011
After dabbling in several other programming languages I came across references to Haskell and quickly became interested in learning the language given (1) my disdain for over-sized and almost convoluted languages such as Java and C# and, (2) my background in Mathematics. Yes this is an interesting book that does an excellent job showing how well the abstraction of Mathematics can be quantified using Haskell yet, I do not believe that this book does any justice to those individuals the author claims the book is written for-"[t]his book does not assume the reader to have previous experience with either programming or construction of formal proof ...". Any inexperienced programmer or person with minimal Mathematical experience will, in no way, benefit from this book unless they have a quality teacher who can explain as well as expand on the material. In my humble opinion the person's who can utilize and benefit from this book are either semi-experienced functional programmers, young (possibly old) whiz-kids or the auto-didactic types who have the patience to refer to other sources for more explanation. As an example of the later claim, Exercise 1.10 asks the reader to "define a function called removeFst that removes the first occurrence of an integer m from a list of integers ..." without reference to working with/on lists. Further, this user defined function is expected to be used in the very next example (1.11) which, without assurance of the readers ability to define such a function, i.e. providing a solution, is pedagogically unsound. Either include a reference to the solution(s) on the authors website, include them in the book, or do a better job of NOT asking for chicken without providing the egg.
This is not meant to be a negative review! Instead, it is a warning to those with minimal programming/Mathematics background expecting to learn Haskell. Personally, I loved this book and wish I came across it years ago. In fact, I wish I had come across functional programming years ago and therefore had not wasted years trying abstract other less abstract-able languages.
15 of 16 people found the following review helpful
on September 17, 2010
As a professional programmer who dropped out of college too early to get a good grounding in mathematics, this book has been a wonder to me. I've been trying to learn more advanced mathematics in the last year or so, and struggled because I didn't know how to do proofs.
Haskell is prominent in the title, but is secondary in the book. The vast majority of my time has been spent reading and performing proofs with with pencil and paper. The mathematics portions are all fairly rigorous. Once proofs are fully introduced, nearly all the exercises are proving theorems given in the book, or providing counter examples. There isn't much in the way of computational type exercises I've seen in some other discrete math texts, stuff like "what's the transitive closure of this relation". Instead, a theorem will be given and the author will ask you to prove it.
The Haskell exercises typically follow pure math introductions and exercises, and are used to help develop a stronger, more intuitive understating of the subjects. I can now write enough Haskell to take on the exercises, but to this point, the Haskell has all be very compact - 10 lines of code to answer a question at the max, usually more like 3. There's no way I could go and do something 'practical' with Haskell at this point, but I can grok some of it and am starting to appreciate functional programming.
This is easily the most challenging self study book I've taken on, but also the most rewarding. Not only have I gained proof writing knowledge, and a solid understanding of the fundamentals of modern mathematics, but it's helped me develop a measure of discipline in thought. I've noticed improvements in the clarity of my day to day software development - in design, development, and verification. The methodical approach to breaking down a proof into cases and sub-cases has been most helpful in that regard.
I recommend this to anyone, especially developers who haven't had the benefit of a thorough mathematical education.
14 of 16 people found the following review helpful
on June 7, 2009
When I was a Math undergrad back in the 70's, we had a 5 hr course called Foundations of Mathematics. This was an intro to symbolic logic, propositional calculus, and methods of proof. Deadly boring, dry material that we either knew, grasped by intuition, or ignored.
This textbook covers this material in a constructive fashion by using the Haskell programming language. Haskell is a modern form of lisp, one of the original programming languages, from the '50's, the language used for most Artificial Intelligence work. The breadth of Haskell allows it to be used for logic and proof, as well as the usual numerical and string processing. Pattern matching and list processing is built into the basic structure of the Haskell language.
This text's exercises are mostly Haskell programming assignments. Turning the abstract ideas of the math into the concrete statements of Haskell (if statements in a program can be considered concrete) will make the ideas familiar and real. Free, useful versions of Haskell (Hugs) are available for readers or students to use, even on Windows systems. Any familiarity with any programming system and a text editor should be enough to get started.
What is the difference between proving a theorem and debugging a program ? The way I do it, not much. That has much to do with me, I am a programmer first, and a Math second. This statement is the Curry-Howard correspondence, connecting computability and proof or truth. This text is a step on that road to truth.
There are several other titles in this series. All of them sound fascinating. I will read them later.
8 of 9 people found the following review helpful
on January 18, 2009
This book is breathtaking in its clarity and depth. I'm into the chapter on using Haskell to prove logical theorems.
One of my all-time favourite subjects in undergraduate study was Logic. That you could translate English language arguments into logical symbolism and test their validity and soundness by following a set of rules was, to me, a revelation. By following a number of logical inference rules, one could build an argument that proves the validity of a conclusion. The use of truth tables was intriguing and so simple in concept.
Blaise Pascal (French philosopher, and whose name was given to the Pascal programming language) speculated about the possibility of a logic calculating machine. Well, this book shows how you can do it with Haskell.
The Haskell Road To Logic, Maths and Programming provides Haskell source code that you can run to demonstrate the validity of all the traditional logical inference rules that I learned in Logic.
It's a pleasure to read.
6 of 7 people found the following review helpful
on August 20, 2009
As a mathematician, I find that of all current programming languages Haskell is the best for describing mathematical notions in thanks to such features as newtypes, type classes, list comprehensions, purity, etc. It is also much better suited to reasoning about programs than the imperative languages are.
Therefore, it makes perfect sense to write a book which covers the basic notions of discrete math and implements them in Haskell, which is just what this book does. Along the way the reader will see many examples of strict and rigorous logical proofs, and learn how to approach them.
5 of 6 people found the following review helpful
on September 18, 2012
Let me start by saying I am not a Haskell programmer. I program mostly with C# and F#, and study Haskell as a educational exercise. However, Haskell's ability to express formulae makes it the perfect 'pseudo-code' for presenting abstract mathematical concepts in a concrete way to modern programmers.
Us workaday programmers have a hard time picking up maths or remembering the maths we learned in school. This book gives us a great alternative to grinding through old textbooks to learn the math we need in our projects. Really, the concreteness of seeing mathematical concepts implemented in working code can make all the difference.
I love this book so much, I can only wish there were more in the same vein. What about a 'Haskell Road to Linear Algebra', or a 'Haskell Road to Calculus'? Wouldn't such a series be magnificent?!
If I could ask for anything more from the authors, I would ask for more books like this! I can't praise the work enough!
18 of 25 people found the following review helpful
on March 16, 2006
In March 2006, there are only three or four books that boast Haskell in their titles. They are all excellent books. But the world can benefit from more Haskell books. In fact, we are in need of such books, especially CS1 texts. This book is a pleasure to read. I suspect that even math haters will not find it hostile. Anyone learning Haskell will find the book and its companion web site a valuable resouce. On the web site, you will find the source code from the book, such as Powerseries.hs. You can quickly play and experiment with it; read and learn from it.
I wish more books are as pleasant and affordable ($25).
2 of 2 people found the following review helpful
on May 31, 2012
I am really happy to have this item which is great book for learning math with real applications in Haskell. Author demonstrate elegant of math theory and pure functional language. This pair together can be used for solving and modeling math concepts.
I really recommend this book to math hobbits and/or Haskell newcomers. And thank you again Kees Doets and Jan van Eijck for several happy week and good time with reading and solving problems. That was really fun.