1 Inspiration


1.1 Required readings

http://blog.sigfpe.com/2006/01/eleven-reasons-to-use-haskell-as.html

1.2 Why study discrete mathematics?

Discrete mathematics has widespread, fundamental applications in computer science,
as well as in electrical engineering and computer engineering.
Proof is often better than testing; edge cases can be costly!

Intel has lost many millions due to the lack of formal verification of circuit design.

Some of the biggest problems in applied math and computing are number problems.
For example, factoring a number to it’s prime factors.

1.3 Why study Haskell?

Haskell is fast, statically typed, purely functional, and lazy.
It encourages error-free abstraction.
Haskell jobs are reliably some of the highest paid.
Hiring and finding Haskell developers is easier (they are typically capable enthusiasts).
Much like Rust strong-arms you into thinking correctly about system resources,
Haskell strong-arms you into thinking correctly about your logic.
There is a reason Haskell has a reputation for being snooty and elitist…

1.4 Why study discrete mathematics in Haskell?

Why use a functional language, and why Haskell in particular?

Haskell allows you to compute directly with the fundamental objects of discrete mathematics!

It is a powerful language, allowing programs that would be long and complicated in other languages,
to be expressed simply and concisely.

You can reason mathematically about Haskell programs in the same way you do in elementary algebra.

The language provides a strong type system that allows the compiler to catch a large fraction of errors;
it is rare for a Haskell program to crash.

Haskell is an excellent language for rapid prototyping.
(i.e., implementing a program quickly and with minimal effort in order to experiment with it).

Haskell can be used interactively, like a calculator; you don’t need a heavyweight compiler.

Haskell makes it possible to use discrete mathematics more concretely.
The computer can help you to learn and understand mathematics.
As various mathematical objects are defined, software tools will enable you to perform calculations with those objects.
Exploring and experimenting with mathematical ideas gives a practical intuition.

Our purpose is to teach logic and mathematical reasoning in practice,
and to connect formal reasoning to computer programming.
In Haskell,l implementations remain as close as possible to the formal definitions.
Lazy functional programming is a programming style where arguments are evaluated only when the value is actually needed,
thus it can handle infinite co-recursion easily.

With Haskell, the step from formal definition to program is particularly easy.
This presupposes, of course, that you are at ease with formal definitions.

Our reason for combining training in reasoning with an introduction to functional programming,
is that your programming needs will provide motivation for improving your reasoning skills.