Data.Group

Synopsis

# Documentation

class Monoid m => Group m where #

A Group is a Monoid plus a function, invert, such that:

a <> invert a == mempty
invert a <> a == mempty

Minimal complete definition

invert

Methods

invert :: m -> m #

pow :: Integral x => m -> x -> m #

pow a n == a <> a <> ... <> a
 (n lots of a)

If n is negative, the result is inverted.

Instances
 Group () # Instance detailsDefined in Data.Group Methodsinvert :: () -> () #pow :: Integral x => () -> x -> () # Group a => Group (Dual a) # Instance detailsDefined in Data.Group Methodsinvert :: Dual a -> Dual a #pow :: Integral x => Dual a -> x -> Dual a # Num a => Group (Sum a) # Instance detailsDefined in Data.Group Methodsinvert :: Sum a -> Sum a #pow :: Integral x => Sum a -> x -> Sum a # Fractional a => Group (Product a) # Instance detailsDefined in Data.Group Methodsinvert :: Product a -> Product a #pow :: Integral x => Product a -> x -> Product a # Group b => Group (a -> b) # Instance detailsDefined in Data.Group Methodsinvert :: (a -> b) -> a -> b #pow :: Integral x => (a -> b) -> x -> a -> b # (Group a, Group b) => Group (a, b) # Instance detailsDefined in Data.Group Methodsinvert :: (a, b) -> (a, b) #pow :: Integral x => (a, b) -> x -> (a, b) # (Group a, Group b, Group c) => Group (a, b, c) # Instance detailsDefined in Data.Group Methodsinvert :: (a, b, c) -> (a, b, c) #pow :: Integral x => (a, b, c) -> x -> (a, b, c) # (Group a, Group b, Group c, Group d) => Group (a, b, c, d) # Instance detailsDefined in Data.Group Methodsinvert :: (a, b, c, d) -> (a, b, c, d) #pow :: Integral x => (a, b, c, d) -> x -> (a, b, c, d) # (Group a, Group b, Group c, Group d, Group e) => Group (a, b, c, d, e) # Instance detailsDefined in Data.Group Methodsinvert :: (a, b, c, d, e) -> (a, b, c, d, e) #pow :: Integral x => (a, b, c, d, e) -> x -> (a, b, c, d, e) #

class Group g => Abelian g #

An Abelian group is a Group that follows the rule:

a <> b == b <> a
Instances
 Abelian () # Instance detailsDefined in Data.Group Abelian a => Abelian (Dual a) # Instance detailsDefined in Data.Group Num a => Abelian (Sum a) # Instance detailsDefined in Data.Group Fractional a => Abelian (Product a) # Instance detailsDefined in Data.Group Abelian b => Abelian (a -> b) # Instance detailsDefined in Data.Group (Abelian a, Abelian b) => Abelian (a, b) # Instance detailsDefined in Data.Group (Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) # Instance detailsDefined in Data.Group (Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) # Instance detailsDefined in Data.Group (Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) # Instance detailsDefined in Data.Group