Copyright | (c) 2020-2021 Emily Pillmore |
---|---|
License | BSD-style |
Maintainer | Emily Pillmore <emilypi@cohomolo.gy>, Reed Mullanix <reedmullanix@gmail.com> |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- class (Group g, Bounded g) => FiniteGroup g
- finiteOrder :: (Eq g, FiniteGroup g) => g -> Natural
- safeClassify :: (Eq a, Cyclic a, FiniteGroup a) => (a -> Bool) -> [a]
- class FiniteGroup g => FiniteAbelianGroup g
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 # | |
Defined in Data.Group.Finite | |
FiniteGroup a => FiniteGroup (Identity a) Source # | |
Defined in Data.Group.Finite | |
FiniteGroup a => FiniteGroup (Dual a) Source # | |
Defined in Data.Group.Finite | |
(Bounded a, Num a) => FiniteGroup (Sum a) Source # | |
Defined in Data.Group.Finite | |
(FiniteGroup a, FiniteGroup b) => FiniteGroup (a, b) Source # | |
Defined in Data.Group.Finite | |
FiniteGroup a => FiniteGroup (Proxy a) Source # | |
Defined in Data.Group.Finite | |
(FiniteGroup a, FiniteGroup b, FiniteGroup c) => FiniteGroup (a, b, c) Source # | |
Defined in Data.Group.Finite | |
FiniteGroup a => FiniteGroup (Const a b) Source # | |
Defined in Data.Group.Finite | |
(FiniteGroup a, FiniteGroup b, FiniteGroup c, FiniteGroup d) => FiniteGroup (a, b, c, d) Source # | |
Defined in Data.Group.Finite | |
(FiniteGroup a, FiniteGroup b, FiniteGroup c, FiniteGroup d, FiniteGroup e) => FiniteGroup (a, b, c, d, e) Source # | |
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:
>>>
safeClassify @(Sum Word8) (< 3)
[Sum {getSum = 1},Sum {getSum = 2},Sum {getSum = 0}]
Finite abelian groups
class FiniteGroup g => FiniteAbelianGroup g Source #
Commutative FiniteGroup
s