group-theory-0.1.0.0: The theory of groups
Copyright (c) 2020 Emily Pillmore BSD-style Emily Pillmore , Reed Mullanix stable non-portable Safe Haskell2010

Description

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

Synopsis

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

## Combinators

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

Infix alias for minus.

### Examples:

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

>>> let x = Any True
>>> x - x
Any {getAny = True}


(+) :: 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}


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