Module

Data.Group.Free

#FreeGroup

newtype FreeGroup a

The free group generated by elements of a, up to equality. Note that the Eq and Monoid instances differ from the standard such instances for List (Signed a); two elements of the free group are equal iff they are equal after being reduced to "canonical form", i.e., cancelling adjacent inverses.

Constructors

Instances

#free

free :: forall a. a -> FreeGroup a

Lift a value of type a to a value of type FreeGroup a

#Signed

data Signed a

A data type indicating the sign of one of the generators of the free group.

Constructors

Instances

#foldFree

foldFree :: forall a b. Group b => (a -> b) -> FreeGroup a -> b

Lift a function from a to some group b into the unique induced homomorphism from FreeGroup a to b.

Modules