- class Additive r where
- sum1 :: (Foldable1 f, Additive r) => f r -> r
- class Additive r => Abelian r
- class Additive r => Idempotent r
- sinnum1pIdempotent :: Natural -> r -> r
- class Additive m => Partitionable m where
- partitionWith :: (m -> m -> r) -> m -> NonEmpty r

# Additive Semigroups

(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

# Additive Abelian semigroups

class Additive r => Abelian r Source

an additive abelian semigroup

a + b = b + a

# Additive Monoids

class Additive r => Idempotent r Source

An additive semigroup with idempotent addition.

a + a = a

Idempotent Bool | |

Idempotent () | |

Idempotent r => Idempotent (Complex r) | |

Idempotent r => Idempotent (Quaternion r) | |

Idempotent r => Idempotent (Dual r) | |

Idempotent r => Idempotent (Hyper' r) | |

Idempotent r => Idempotent (Hyper r) | |

Idempotent r => Idempotent (Dual' r) | |

Idempotent r => Idempotent (Quaternion' r) | |

Idempotent r => Idempotent (Trig r) | |

Band r => Idempotent (Log r) | |

Idempotent r => Idempotent (Opposite r) | |

Idempotent r => Idempotent (ZeroRng r) | |

Idempotent r => Idempotent (e -> r) | |

(Idempotent a, Idempotent b) => Idempotent (a, b) | |

(HasTrie e, Idempotent r) => Idempotent (:->: e r) | |

Idempotent r => Idempotent (Covector r a) | |

(Idempotent a, Idempotent b, Idempotent c) => Idempotent (a, b, c) | |

(Idempotent a, Idempotent b, Idempotent c, Idempotent d) => Idempotent (a, b, c, d) | |

(Idempotent a, Idempotent b, Idempotent c, Idempotent d, Idempotent e) => Idempotent (a, b, c, d, e) |

sinnum1pIdempotent :: Natural -> r -> rSource

# Partitionable semigroups

class Additive m => Partitionable m whereSource

partitionWith :: (m -> m -> r) -> m -> NonEmpty rSource

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

Partitionable Bool | |

Partitionable () | |

Partitionable Natural | |

Partitionable r => Partitionable (Complex r) | |

Partitionable r => Partitionable (Quaternion r) | |

Partitionable r => Partitionable (Dual r) | |

Partitionable r => Partitionable (Hyper' r) | |

Partitionable r => Partitionable (Hyper r) | |

Partitionable r => Partitionable (Dual' r) | |

Partitionable r => Partitionable (Quaternion' r) | |

Partitionable r => Partitionable (Trig r) | |

Factorable r => Partitionable (Log r) | |

(Partitionable a, Partitionable b) => Partitionable (a, b) | |

(Partitionable a, Partitionable b, Partitionable c) => Partitionable (a, b, c) | |

(Partitionable a, Partitionable b, Partitionable c, Partitionable d) => Partitionable (a, b, c, d) | |

(Partitionable a, Partitionable b, Partitionable c, Partitionable d, Partitionable e) => Partitionable (a, b, c, d, e) |