group-theory-0.2.1.0: The theory of groups
Copyright (c) 2020-2021 Reed Mullanix Emily Pillmore BSD-style Reed Mullanix , Emily Pillmore stable non-portable Safe-Inferred Haskell2010

Data.Group.Free.Product

Description

This module provides definitions for the FreeProduct of two groups, along with useful combinators.

Synopsis

# Documentation

newtype FreeProduct g h Source #

The free product on two alphabets

Note: This does not perform simplification upon multiplication or construction. To do this, one should use simplify.

Constructors

 FreeProduct FieldsrunFreeProduct :: Seq (Either g h)

#### Instances

Instances details
 Source # Instance detailsDefined in Data.Group.Free.Product Methodsbimap :: (a -> b) -> (c -> d) -> FreeProduct a c -> FreeProduct b d #first :: (a -> b) -> FreeProduct a c -> FreeProduct b c #second :: (b -> c) -> FreeProduct a b -> FreeProduct a c # Source # Instance detailsDefined in Data.Group.Free.Product Methodsfmap :: (a -> b) -> FreeProduct g a -> FreeProduct g b #(<\$) :: a -> FreeProduct g b -> FreeProduct g a # (Eq g, Eq h) => Eq (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product Methods(==) :: FreeProduct g h -> FreeProduct g h -> Bool #(/=) :: FreeProduct g h -> FreeProduct g h -> Bool # (Ord g, Ord h) => Ord (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product Methodscompare :: FreeProduct g h -> FreeProduct g h -> Ordering #(<) :: FreeProduct g h -> FreeProduct g h -> Bool #(<=) :: FreeProduct g h -> FreeProduct g h -> Bool #(>) :: FreeProduct g h -> FreeProduct g h -> Bool #(>=) :: FreeProduct g h -> FreeProduct g h -> Bool #max :: FreeProduct g h -> FreeProduct g h -> FreeProduct g h #min :: FreeProduct g h -> FreeProduct g h -> FreeProduct g h # (Show g, Show h) => Show (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product MethodsshowsPrec :: Int -> FreeProduct g h -> ShowS #show :: FreeProduct g h -> String #showList :: [FreeProduct g h] -> ShowS # Semigroup (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product Methods(<>) :: FreeProduct g h -> FreeProduct g h -> FreeProduct g h #sconcat :: NonEmpty (FreeProduct g h) -> FreeProduct g h #stimes :: Integral b => b -> FreeProduct g h -> FreeProduct g h # Monoid (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product Methodsmempty :: FreeProduct g h #mappend :: FreeProduct g h -> FreeProduct g h -> FreeProduct g h #mconcat :: [FreeProduct g h] -> FreeProduct g h # (Group g, Group h) => Group (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product Methodsinvert :: FreeProduct g h -> FreeProduct g h #(~~) :: FreeProduct g h -> FreeProduct g h -> FreeProduct g h #pow :: Integral x => FreeProduct g h -> x -> FreeProduct g h # (GroupOrder g, GroupOrder h) => GroupOrder (FreeProduct g h) Source # Instance detailsDefined in Data.Group.Free.Product Methodsorder :: FreeProduct g h -> Order Source #

simplify :: (Eq g, Eq h, Monoid g, Monoid h) => FreeProduct g h -> FreeProduct g h Source #

O(n) Simplifies a word in a FreeProduct. This means that we get rid of any identity elements, and perform multiplication of neighboring gs and hs.

coproduct :: Monoid m => (a -> m) -> (b -> m) -> FreeProduct a b -> m Source #

The FreeProduct of two Monoids is a coproduct in the category of monoids (and by extension, the category of groups).

injl :: a -> FreeProduct a b Source #

Left injection of an alphabet a into a free product.

injr :: b -> FreeProduct a b Source #

Right injection of an alphabet b into a free product.