group-theory-0.2.0.0: The theory of groups

Copyright(c) 2020 Emily Pillmore
LicenseBSD-style
MaintainerEmily Pillmore <emilypi@cohomolo.gy>, Reed Mullanix <reedmullanix@gmail.com>
Safe HaskellSafe
LanguageHaskell2010

Data.Group.Finite

Contents

Description

 
Synopsis

Finite groups

class (Group g, Bounded g) => FiniteGroup g Source #

A FiniteGroup is a Group whose underlying set is finite. This is equivalently a group object in \( FinSet \).

Finite groups often arise when considering symmetry of mathematical or physical objects, when those objects admit just a finite number of structure-preserving transformations. Important examples of finite groups include cyclic groups and permutation groups.

Instances
FiniteGroup () Source # 
Instance details

Defined in Data.Group.Finite

FiniteGroup a => FiniteGroup (Identity a) Source # 
Instance details

Defined in Data.Group.Finite

FiniteGroup a => FiniteGroup (Dual a) Source # 
Instance details

Defined in Data.Group.Finite

(Bounded a, Num a) => FiniteGroup (Sum a) Source # 
Instance details

Defined in Data.Group.Finite

(FiniteGroup a, FiniteGroup b) => FiniteGroup (a, b) Source # 
Instance details

Defined in Data.Group.Finite

FiniteGroup a => FiniteGroup (Proxy a) Source # 
Instance details

Defined in Data.Group.Finite

(FiniteGroup a, FiniteGroup b, FiniteGroup c) => FiniteGroup (a, b, c) Source # 
Instance details

Defined in Data.Group.Finite

FiniteGroup a => FiniteGroup (Const a b) Source # 
Instance details

Defined in Data.Group.Finite

(FiniteGroup a, FiniteGroup b, FiniteGroup c, FiniteGroup d) => FiniteGroup (a, b, c, d) Source # 
Instance details

Defined in Data.Group.Finite

(FiniteGroup a, FiniteGroup b, FiniteGroup c, FiniteGroup d, FiniteGroup e) => FiniteGroup (a, b, c, d, e) Source # 
Instance details

Defined in Data.Group.Finite

Finite group combinators

finiteOrder :: (Eq g, FiniteGroup g) => g -> Natural Source #

Calculate the exponent of a particular element in a finite group.

Examples:

>>> finiteOrder @(Sum Word8) 3
256

safeClassify :: (Eq a, Cyclic a, FiniteGroup a) => (a -> Bool) -> [a] Source #

Classify elements of a finite Cyclic group.

Apply a classifying function a -> Bool to the elements of a Cyclic group as generated by its designated generator. This is a safer version of classify, that is gauranteed to terminate.

Examples:

>>> take 3 $ safeClassify (< (3 :: Sum Word8))
[Sum {getSum = 1},Sum {getSum = 2}]

Finite abelian groups