Skip to Content »

Michi’s blog » Computational Group Theory in Haskell (1 in a series)

 Computational Group Theory in Haskell (1 in a series)

  • October 18th, 2006
  • 3:37 pm

This term, I’m listening to a lecture course on Computational Group Theory. As a good exercise, I plan to implement everything we talk about as Haskell functions as well.

The first lecture was mainly an introduction to the area, ending with a very na

5 People had this to say...


Are you sure you want identity :: n -> a rather than identity :: a

  • Michi
  • October 19th, 2006
  • 14:56

Actually, I do, since I view every group as a subgroup of some symmetric group. The identity is a function taking as argument which symmetric group I operate in, and returning the appropriate identity element.

Sure, translating group axioms straight off would make identity :: a be much saner; but on the other hand, I write the group type class with a specific use in mind.


Hang on, I’m sure there was meant to be more of that comment, to the effect that what you really want is for each symmetric group to be a type in its own right. But then you’d need types parametrized by integers, which you can do in C++ or Ada, but not (IIRC) in Haskell. I remember running into this problem a while ago while implementing the algorithms from my Computational Methods in Finite Fields course.

  • Michi
  • October 19th, 2006
  • 15:38

Parametrizing the type “Subgroup of a symmetric group” would make a lot of things much easier; handling the cycle representation would look different, as would the multiplication code. But I’m not very much inclined to start writing things like
newtype Permutation3 = ..., and Haskell does not, at the current stage, seem to allow parametrized types.

There may possibly be some extension floating around in an alpha version capable of it though…

  • Luis
  • October 23rd, 2014
  • 8:13

I would like to use Haskell to develop some computational group modules and I am very interested in what you did time ago. I cannot find it in this blog, just the first few lines. Do you have it in another blog?
I am learning Haskell and would like to use it for managing groups and group rings.
Thank you.

Want your say?

* Required fields. Your e-mail address will not be published on this site

You can use the following XHTML tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>