## Explaining algebraic theory with functional programs

### BibTeX

@MISC{Fokker_explainingalgebraic,

author = {Jeroen Fokker},

title = {Explaining algebraic theory with functional programs},

year = {}

}

### OpenURL

### Abstract

Abstract. 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. 1

### Citations

1307 | Lectures on constructive functional programming
- Bird
- 1989
(Show Context)
Citation Context ...ffl Adding more classes, e.g. vector spaces and modules, or algebraically closed fields. ffl Proving that the required laws hold for the implementations given, in the style of the induction proofs in =-=[BW88]-=-. ffl Adding more instances, e.g. lists as a monoid with ++ as addition and [] as zero, or Klein's 4-group as a group, or symbolic expressions as a field. ffl Adding more derived operations for the cl... |

47 | Functional parsers
- Fokker
- 1995
(Show Context)
Citation Context ...symbol '-') , n !- parse ] unpars Zero = showChar '0' unpars (Pos n) = unpars n unpars (Neg n) = showChar '-' . unpars n Similarly, a parser for floating point numbers can be defined, as described in =-=[Fok95]-=-. For the parameterized types, like Quot and Iadd, (un)parsers can be defined by calling the overloaded parse function for the base type. instance (Ring a,Repr a) =? Repr (Quot a) where parse = [ Quot... |

5 |
Carsten Gomard and Peter Sestoft, ‘Partial evaluation and Automatic program generation
- Jones
- 1993
(Show Context)
Citation Context ...ming 1 20 20 40 40 [Fok92] Grammars and Parsing 2 30 30 40 60 [JDS94] Implementation of Prog.Lang. 3 20 20 80 40 [Meij95] Advanced Functional Progr. 6 30 0 60 30 [JM95] Partial Evaluation 7 30 0 0 90 =-=[JGS93]-=- Category Theory 7 30 0 0 90 [Mee95] The specialization courses in semester 5–8 are optional. Furthermore, there is a connection with the course on User Interfaces (semester 6). Unfortunately, the cou... |

1 |
Functioneel programmeren. Course notes, dept. computer science
- Fokker
- 1994
(Show Context)
Citation Context ...ter science students. In fact, the material presented in this paper is covered, with some more explanation, in the first year course on functional programming for computer science students in Utrecht =-=[Fok94]-=-. Available time (10 weeks, with no former knowledge on programming) and scope of that course prohibit us to treat all details in the course, but it should be enough to convince the students that math... |

1 |
Gofer 2.30 release notes. http: //www.cs.nott.ac.uk:80/Department/Staff/mpj
- Jones
(Show Context)
Citation Context ...es prelude and of a monadic parser library, inspired by Wadler [Wad95]. In that library, the type Parser is made instance of Functor, Monad, MonadPlus and MonadZero, so that monad comprehensions (see =-=[Jon94]-=-) can be used for defining parsers. In the library, some common parser combinators are defined, like satisfy :: (Char-?Bool) -? Parser Char many :: Parser a -? Parser [a] option :: Parser a -? Parser ... |

1 |
Functional programming. Course notes
- Fokker
- 1992
(Show Context)
Citation Context ...am and by their lab works. The courses involved, with their workload in hours and the literature used, are: course semester lecture tutorial lab homew. literature Functional Programming 1 20 20 40 40 =-=[Fok92]-=- Grammars and Parsing 2 30 30 40 60 [JDS94] Implementation of Prog.Lang. 3 20 20 80 40 [Meij95] Advanced Functional Progr. 6 30 0 60 30 [JM95] Partial Evaluation 7 30 0 0 90 [JGS93] Category Theory 7 ... |

1 |
Duponcheel and Doaitse Swierstra, Grammars and Parsing. Course notes
- Jeurig, Luc
- 1994
(Show Context)
Citation Context ...lved, with their workload in hours and the literature used, are: course semester lecture tutorial lab homew. literature Functional Programming 1 20 20 40 40 [Fok92] Grammars and Parsing 2 30 30 40 60 =-=[JDS94]-=- Implementation of Prog.Lang. 3 20 20 80 40 [Meij95] Advanced Functional Progr. 6 30 0 60 30 [JM95] Partial Evaluation 7 30 0 0 90 [JGS93] Category Theory 7 30 0 0 90 [Mee95] The specialization course... |

1 |
Category theory, Course notes
- Meertens
- 1995
(Show Context)
Citation Context ...and Parsing 2 30 30 40 60 [JDS94] Implementation of Prog.Lang. 3 20 20 80 40 [Meij95] Advanced Functional Progr. 6 30 0 60 30 [JM95] Partial Evaluation 7 30 0 0 90 [JGS93] Category Theory 7 30 0 0 90 =-=[Mee95]-=- The specialization courses in semester 5–8 are optional. Furthermore, there is a connection with the course on User Interfaces (semester 6). Unfortunately, the course on Linear Algebra (semester 4) i... |

1 |
and Doaitse Swierstra, Implementation of Programming Languages. Course notes
- Meijer
- 1995
(Show Context)
Citation Context ...re used, are: course semester lecture tutorial lab homew. literature Functional Programming 1 20 20 40 40 [Fok92] Grammars and Parsing 2 30 30 40 60 [JDS94] Implementation of Prog.Lang. 3 20 20 80 40 =-=[Meij95]-=- Advanced Functional Progr. 6 30 0 60 30 [JM95] Partial Evaluation 7 30 0 0 90 [JGS93] Category Theory 7 30 0 0 90 [Mee95] The specialization courses in semester 5–8 are optional. Furthermore, there i... |