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

Data.Group.Free.Church

Description

This module provides definitions for Church-encoded FreeGroups, FreeAbelianGroups, along with useful combinators.

Synopsis

Church-encoded free groups

newtype FG a Source #

The Church-encoding of a FreeGroup.

This datatype represents the free group on some a-valued generators. For more information on why this encoding is preferred, see Dan Doel's article in the Comonad Reader.

Constructors

FG 

Fields

Instances

Instances details
Monad FG Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

(>>=) :: FG a -> (a -> FG b) -> FG b #

(>>) :: FG a -> FG b -> FG b #

return :: a -> FG a #

Functor FG Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

fmap :: (a -> b) -> FG a -> FG b #

(<$) :: a -> FG b -> FG a #

Applicative FG Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

pure :: a -> FG a #

(<*>) :: FG (a -> b) -> FG a -> FG b #

liftA2 :: (a -> b -> c) -> FG a -> FG b -> FG c #

(*>) :: FG a -> FG b -> FG b #

(<*) :: FG a -> FG b -> FG a #

Alternative FG Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

empty :: FG a #

(<|>) :: FG a -> FG a -> FG a #

some :: FG a -> FG [a] #

many :: FG a -> FG [a] #

Cancelative FG Source # 
Instance details

Defined in Control.Applicative.Cancelative

Methods

cancel :: FG a -> FG a Source #

GroupFoldable FG Source # 
Instance details

Defined in Data.Group.Foldable

Methods

goldMap :: Group g => (a -> g) -> FG a -> g Source #

toFG :: FG a -> FG a Source #

Semigroup (FG a) Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

(<>) :: FG a -> FG a -> FG a #

sconcat :: NonEmpty (FG a) -> FG a #

stimes :: Integral b => b -> FG a -> FG a #

Monoid (FG a) Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

mempty :: FG a #

mappend :: FG a -> FG a -> FG a #

mconcat :: [FG a] -> FG a #

Group (FG a) Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

invert :: FG a -> FG a Source #

gtimes :: Integral n => n -> FG a -> FG a Source #

minus :: FG a -> FG a -> FG a Source #

Church-encoded free group combinators

interpretFG :: Group g => FG g -> g Source #

Interpret a Church-encoded free group as a concrete FreeGroup.

reifyFG :: FG a -> FreeGroup a Source #

Convert a Church-encoded free group to a concrete FreeGroup.

reflectFG :: FreeGroup a -> FG a Source #

Convert a concrete FreeGroup to a Church-encoded free group.

presentFG :: Group g => FG g -> (FG g -> g) -> g Source #

Present a Group as a FG modulo relations.

Church-encoded free abelian groups

newtype FA a Source #

The Church-encoding of a FreeAbelianGroup.

This datatype represents the free group on some a-valued generators, along with their exponents in the group.

Constructors

FA 

Fields

Instances

Instances details
Monad FA Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

(>>=) :: FA a -> (a -> FA b) -> FA b #

(>>) :: FA a -> FA b -> FA b #

return :: a -> FA a #

Functor FA Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

fmap :: (a -> b) -> FA a -> FA b #

(<$) :: a -> FA b -> FA a #

Applicative FA Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

pure :: a -> FA a #

(<*>) :: FA (a -> b) -> FA a -> FA b #

liftA2 :: (a -> b -> c) -> FA a -> FA b -> FA c #

(*>) :: FA a -> FA b -> FA b #

(<*) :: FA a -> FA b -> FA a #

Alternative FA Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

empty :: FA a #

(<|>) :: FA a -> FA a -> FA a #

some :: FA a -> FA [a] #

many :: FA a -> FA [a] #

Cancelative FA Source # 
Instance details

Defined in Control.Applicative.Cancelative

Methods

cancel :: FA a -> FA a Source #

Semigroup (FA a) Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

(<>) :: FA a -> FA a -> FA a #

sconcat :: NonEmpty (FA a) -> FA a #

stimes :: Integral b => b -> FA a -> FA a #

Monoid (FA a) Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

mempty :: FA a #

mappend :: FA a -> FA a -> FA a #

mconcat :: [FA a] -> FA a #

Group (FA a) Source # 
Instance details

Defined in Data.Group.Free.Church

Methods

invert :: FA a -> FA a Source #

gtimes :: Integral n => n -> FA a -> FA a Source #

minus :: FA a -> FA a -> FA a Source #

Church-encoded free abelian group combinators

forgetFA :: Group a => FA a -> FG a Source #

Forget the commutative structure of a Church-encoded free abelian group, turning it into a standard free group.

interpretFA :: Group g => FA g -> g Source #

Interpret a Church-encoded free abelian group as a concrete FreeAbelianGroup.

reifyFA :: Ord a => FA a -> FreeAbelianGroup a Source #

Convert a Church-encoded free abelian group to a concrete FreeAbelianGroup.

reflectFA :: Ord a => FreeAbelianGroup a -> FA a Source #

Convert a concrete FreeAbelianGroup to a Church-encoded free abelian group.