Explaining algebraic theory with functional programs
Explaining Algebraic Theory with Functional Programs.
In: Functional Programming Languages in Education,
Proceedings of the first international symposium FPLE'95
in Nijmegen, the Netherlands, december 1995.
(Pieter Hartel and Rinus Plasmeijer, eds).
A hierarchy of six important structures from abstract algebra
(groups, rings, fields etc.)
is introduced as Gofer class definitions and laws about them.
Many instance declarations are provided, explaining the
algebraic construction of integers, quotients, adding $i$,
function spaces, polynomials, and matrices.
The definitions include generalized implementations
of polynomial division and matrix inversion.
Monadic parsers are provided for all constructs discussed.
As an application, a one-line program is given for calculating
the eigenvalue equation of a matrix.
Gofer program source
Other relevant links