Home
This site is my collection of Haskell code for learning maths.Why write code to learn maths?
If you want to understand maths, it's no good just reading maths books. You've got to do something with it. Writing code is a double whammy:- Writing the code forces you to understand the maths
- When you've written the code, you can play around with it and improve your understanding further
Why Haskell?
Haskell is a mathematically elegant language, a purely functional language with lazy evaluation - so it's pleasing to code in. Features such as arbitrary precision integer arithmetic, list comprehensions, infinite lists, all come in handy for maths. However, the real reason for using Haskell is that the code comes out shorter, and is quicker to write, than in imperative languages - four times shorter/quicker according to one study. What that means is, I can get much more done when I use Haskell.What's here?
This is some code I've written while trying to learn about maths, mainly algebra, combinatorics and number theory. The level is mainly advanced undergraduate, beginning postgraduate - however, because we're just playing around with mathematical objects, rather than doing proofs, much of it will be accessible to those with less maths.At the moment, the code falls into five main areas:
Foundations
Commutative algebra
Combinatorics
Permutation groups
Basic number theory
Advanced number theory
Further code that's currently in development includes group presentations, Coxeter groups, hyperbolic geometry, and more on matrices and combinatorics. Code that I'm planning to write includes using commutative algebra to do combinatorics and polytopes, maybe algebraic coding theory. We'll see.
Please send comments, questions, feature requests, bug reports, bug fixes to me, David Amos, at:
polyomino (at) f2s (dot) com