# Algebra and algebraic data types

Which of the well-known structures of modern algebra (monoids, groups, rings etc) can be expressed as algebraic data types (ADTs)?

Presumably a free monoid can be considered to be isomorphic to the familiar Nil, Cons construction for lists. Can finitely-presented monoids be represented as an ADT?

If ADTs can't model structures having inverses, then is there a generalisation which can?

• What do you mean by "expressed"? – Martin Berger Jan 7 '16 at 7:39
• @MartinBerger - By "expressed", I mean that the structure of the ADT is necessary and sufficient to constrain instances of the ADT to obey the axioms of the algebraic structure (and e.g. any additional constraints given by a finite presentation). – NietzscheanAI Jan 7 '16 at 9:56

Observe that the fact you can represent free-monoids (that is monoids of strings/lists) as algebraic data types comes from the fact that lists are ADTs for the algebraic specification with a $$0$$-ary operation (namely $$\text{Nil}$$ or $$[]$$) and a binary operation ($$cons$$ or $$(:)$$).