group-theory-0.2.2: The theory of groups
Copyright(c) 2020-2021 Reed Mullanix Emily Pillmore
LicenseBSD-style
MaintainerReed Mullanix <reedmullanix@gmail.com>, Emily Pillmore <emilypi@cohomolo.gy>
Stabilitystable
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageHaskell2010

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 

Fields

Instances

Instances details
Bifunctor FreeProduct Source # 
Instance details

Defined in Data.Group.Free.Product

Methods

bimap :: (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 #

Functor (FreeProduct g) Source # 
Instance details

Defined in Data.Group.Free.Product

Methods

fmap :: (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 details

Defined 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 details

Defined in Data.Group.Free.Product

Methods

compare :: 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 details

Defined in Data.Group.Free.Product

Methods

showsPrec :: Int -> FreeProduct g h -> ShowS #

show :: FreeProduct g h -> String #

showList :: [FreeProduct g h] -> ShowS #

Semigroup (FreeProduct g h) Source # 
Instance details

Defined 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 details

Defined in Data.Group.Free.Product

Methods

mempty :: 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 details

Defined in Data.Group.Free.Product

Methods

invert :: 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 details

Defined in Data.Group.Free.Product

Methods

order :: 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.