HLearn-algebra-0.0.1: Algebraic foundation for the homomorphic learning

HLearn.Algebra.Structures

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.

Synopsis

# Type classes

class Semigroup g => RegularSemigroup g whereSource

Semigroups that also have an inverse. See https://en.wikipedia.org/wiki/Regular_semigroup

Methods

inverse :: g -> gSource

Instances

 (Semigroup (RegSG2Group sg), RegularSemigroup sg) => RegularSemigroup (RegSG2Group sg)

class (RegularSemigroup g, Monoid g) => Group g Source

Regular semigroups that also have an identity; alternatively, monoids where every element has a unique inverse. See https://en.wikipedia.org/wiki/Group_(mathematics)

Instances

 (RegularSemigroup (RegSG2Group sg), Monoid (RegSG2Group sg), RegularSemigroup sg) => Group (RegSG2Group sg)

# Free Structures

data RegularSemigroup sg => RegSG2Group sg Source

Convert any regular semigroup into a group (and thus also a monoid) by adding a unique identity element

Constructors

 SGNothing SGJust sg

Instances

 (Eq sg, RegularSemigroup sg) => Eq (RegSG2Group sg) (Eq (RegSG2Group sg), Ord sg, RegularSemigroup sg) => Ord (RegSG2Group sg) (Read sg, RegularSemigroup sg) => Read (RegSG2Group sg) (Show sg, RegularSemigroup sg) => Show (RegSG2Group sg) RegularSemigroup sg => Monoid (RegSG2Group sg) RegularSemigroup sg => Semigroup (RegSG2Group sg) (RegularSemigroup (RegSG2Group sg), Monoid (RegSG2Group sg), RegularSemigroup sg) => Group (RegSG2Group sg) (Semigroup (RegSG2Group sg), RegularSemigroup sg) => RegularSemigroup (RegSG2Group sg)