Safe Haskell | None |
---|
HLearn.Algebra.Structures.Groups
Contents
Description
These algebraic structures have sacrificed generality in favor of being easily used with the standard Haskell Prelude. The fact that monoids are not guaranteed to be semigroups makes this difficult.
- class Monoid g => Group g where
- inverse :: g -> g
- class Monoid m => Abelian m
- data FreeInverse a
- = FreeInverse !a
- | Negate !a
- class Invertible a where
- module Data.Monoid
Algebra
class Monoid g => Group g whereSource
Groups are monoids that also have an inverse. See https://en.wikipedia.org/wiki/Regular_semigroup
Non-algebraic
data FreeInverse a Source
Constructors
FreeInverse !a | |
Negate !a |
Instances
Eq a => Eq (FreeInverse a) | |
Ord a => Ord (FreeInverse a) | |
Read a => Read (FreeInverse a) | |
Show a => Show (FreeInverse a) | |
Eq a => Invertible (FreeInverse a) |
class Invertible a whereSource
Instances
Eq a => Invertible (FreeInverse a) |
module Data.Monoid