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

Data.Group.Additive

Description

This module contains definitions for AdditiveGroup and AdditiveAbelianGroup, along with the relevant combinators.

Synopsis

Additive groups

class Group g => AdditiveGroup g Source #

An additive group is a Group whose operation can be thought of as addition in some sense.

For example, the additive group of integers \( (ℤ, 0, +) \).

Instances

Instances details
AdditiveGroup () Source # 
Instance details

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

Num a => AdditiveGroup (Sum a) Source # 
Instance details

Defined in Data.Group.Additive

AdditiveGroup b => AdditiveGroup (a -> b) Source # 
Instance details

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

AdditiveGroup a => AdditiveGroup (Op a b) Source # 
Instance details

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

Combinators

(-) :: AdditiveGroup a => a -> a -> a infixl 6 Source #

Infix alias for minus.

Examples:

>>> let x = Sum (3 :: Int)
>>> x - x
Sum {getSum = 0}

(+) :: AdditiveGroup g => g -> g -> g infixl 6 Source #

Infix alias for additive (<>).

Examples:

>>> Sum (1 :: Int) + Sum (40 :: Int)
Sum {getSum = 41}

(×) :: (Integral n, AdditiveGroup a) => n -> a -> a infixl 7 Source #

Infix alias for copower.

Examples:

>>> let x = Sum (3 :: Int)
>>> 2 × x
Sum {getSum = 6}

copower :: (Integral n, AdditiveGroup g) => n -> g -> g Source #

Add an element of an additive group to itself n-many times.

This represents -indexed copowers of an element g of an additive group, i.e. iterated coproducts of group elements. This is representable by the universal property \( C(∐_n g, x) ≅ C(g, x)^n \).

Examples:

>>> copower 2 (Sum (3 :: Int))
Sum {getSum = 6}

Additive abelian groups

class (Abelian g, AdditiveGroup g) => AdditiveAbelianGroup g Source #

An additive abelian group is an Abelian whose operation can be thought of as commutative addition in some sense. Almost all additive groups are abelian.

Instances

Instances details
AdditiveAbelianGroup () Source # 
Instance details

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

Num a => AdditiveAbelianGroup (Sum a) Source # 
Instance details

Defined in Data.Group.Additive

AdditiveAbelianGroup b => AdditiveAbelianGroup (a -> b) Source # 
Instance details

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

AdditiveAbelianGroup a => AdditiveAbelianGroup (Op a b) Source # 
Instance details

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive

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

Defined in Data.Group.Additive