algebra-4.3.1: Constructive abstract algebra

Synopsis

class Additive r where Source #

(a + b) + c = a + (b + c)
sinnum 1 a = a
sinnum (2 * n) a = sinnum n a + sinnum n a
sinnum (2 * n + 1) a = sinnum n a + sinnum n a + a

Minimal complete definition

(+)

Methods

(+) :: r -> r -> r infixl 6 Source #

sinnum1p :: Natural -> r -> r Source #

sinnum1p n r = sinnum (1 + n) r

sumWith1 :: Foldable1 f => (a -> r) -> f a -> r Source #

Instances

sum1 :: (Foldable1 f, Additive r) => f r -> r Source #

class Additive r => Abelian r Source #

a + b = b + a

Instances

 Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Source # Abelian () Source # Source # Abelian r => Abelian (ZeroRng r) Source # Abelian r => Abelian (RngRing r) Source # Abelian r => Abelian (Opposite r) Source # Abelian r => Abelian (End r) Source # Commutative r => Abelian (Log r) Source # Abelian r => Abelian (Trig r) Source # Abelian r => Abelian (Quaternion' r) Source # Abelian r => Abelian (Hyper r) Source # Source # Abelian r => Abelian (Dual' r) Source # Abelian r => Abelian (Quaternion r) Source # Abelian r => Abelian (Hyper' r) Source # Abelian r => Abelian (Dual r) Source # Abelian r => Abelian (Complex r) Source # GCDDomain d => Abelian (Fraction d) Source # Abelian r => Abelian (e -> r) Source # (Abelian a, Abelian b) => Abelian (a, b) Source # Abelian s => Abelian (Covector s a) Source # (Abelian a, Abelian b, Abelian c) => Abelian (a, b, c) Source # Abelian s => Abelian (Map s b a) Source # (Abelian a, Abelian b, Abelian c, Abelian d) => Abelian (a, b, c, d) Source # (Abelian a, Abelian b, Abelian c, Abelian d, Abelian e) => Abelian (a, b, c, d, e) Source #

class Additive r => Idempotent r Source #

a + a = a

Instances

 Source # Source # Idempotent r => Idempotent (ZeroRng r) Source # Idempotent r => Idempotent (Opposite r) Source # Band r => Idempotent (Log r) Source # Idempotent r => Idempotent (Trig r) Source # Source # Idempotent r => Idempotent (Hyper r) Source # Idempotent r => Idempotent (Dual' r) Source # Source # Idempotent r => Idempotent (Hyper' r) Source # Idempotent r => Idempotent (Dual r) Source # Idempotent r => Idempotent (Complex r) Source # Idempotent r => Idempotent (e -> r) Source # (Idempotent a, Idempotent b) => Idempotent (a, b) Source # Idempotent r => Idempotent (Covector r a) Source # (Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) Source # (Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) Source # (Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) Source #

# Partitionable semigroups

class Additive m => Partitionable m where Source #

Minimal complete definition

partitionWith

Methods

partitionWith :: (m -> m -> r) -> m -> NonEmpty r Source #

partitionWith f c returns a list containing f a b for each a b such that a + b = c,

Instances

 Source # MethodspartitionWith :: (Bool -> Bool -> r) -> Bool -> NonEmpty r Source # Source # MethodspartitionWith :: (Natural -> Natural -> r) -> Natural -> NonEmpty r Source # Source # MethodspartitionWith :: (() -> () -> r) -> () -> NonEmpty r Source # Factorable r => Partitionable (Log r) Source # MethodspartitionWith :: (Log r -> Log r -> r) -> Log r -> NonEmpty r Source # Source # MethodspartitionWith :: (Trig r -> Trig r -> r) -> Trig r -> NonEmpty r Source # Source # MethodspartitionWith :: (Quaternion' r -> Quaternion' r -> r) -> Quaternion' r -> NonEmpty r Source # Source # MethodspartitionWith :: (Hyper r -> Hyper r -> r) -> Hyper r -> NonEmpty r Source # Source # MethodspartitionWith :: (Dual' r -> Dual' r -> r) -> Dual' r -> NonEmpty r Source # Source # MethodspartitionWith :: (Quaternion r -> Quaternion r -> r) -> Quaternion r -> NonEmpty r Source # Source # MethodspartitionWith :: (Hyper' r -> Hyper' r -> r) -> Hyper' r -> NonEmpty r Source # Source # MethodspartitionWith :: (Dual r -> Dual r -> r) -> Dual r -> NonEmpty r Source # Source # MethodspartitionWith :: (Complex r -> Complex r -> r) -> Complex r -> NonEmpty r Source # (Partitionable a, Partitionable b) => Partitionable (a, b) Source # MethodspartitionWith :: ((a, b) -> (a, b) -> r) -> (a, b) -> NonEmpty r Source # (Partitionable a, Partitionable b, Partitionable c) => Partitionable (a, b, c) Source # MethodspartitionWith :: ((a, b, c) -> (a, b, c) -> r) -> (a, b, c) -> NonEmpty r Source # (Partitionable a, Partitionable b, Partitionable c, Partitionable d) => Partitionable (a, b, c, d) Source # MethodspartitionWith :: ((a, b, c, d) -> (a, b, c, d) -> r) -> (a, b, c, d) -> NonEmpty r Source # (Partitionable a, Partitionable b, Partitionable c, Partitionable d, Partitionable e) => Partitionable (a, b, c, d, e) Source # MethodspartitionWith :: ((a, b, c, d, e) -> (a, b, c, d, e) -> r) -> (a, b, c, d, e) -> NonEmpty r Source #