Package0.7AlgebraDataData StructuresMathMathsMathematics
semirings
two monoids as one, in holy haskimony
- Version0.7
- CategoryAlgebra, Data, Data Structures, Math, Maths, Mathematics
- LicenceBSD-3-Clause
- Authorchessai
- Maintainerchessai <chessai1996@gmail.com>
- Homepagegithub.com/chessai/semirings
- Pinned byhackage semirings 0.7
- Sourcehackage.haskell.org/package/semirings-0.7
Modules
8 modules- Data.Euclidean6
- Data.Field5A Field is a Ring in which all nonzero elements
- Data.Ring.Ordered2An 'ordered ring' is a ring with a total order. Mathematical pedantry note Many (if not most) of the instances of the OrderedRing type cl…
- Data.Semiring23A class for semirings (types with two binary operations, one commutative and one associative, and two respective identities), with variou…
- Data.Semiring.Directed1A "directed semiring" refers to the semiring composed of the union of upwards
- Data.Semiring.Generic9This module provides generic deriving tools for semirings and rings for
- Data.Semiring.Tropical4A tropical semiring is an extension of another totally ordered
- Data.Star1A class for *-semirings (pron. "star-semirings").
Description
Haskellers are usually familiar with monoids and semigroups. A monoid has an appending operation <> (or mappend), and an identity element, mempty. A semigroup has an appending <> operation, but does not require a mempty element.
A Semiring has two appending operations, plus and times, and two respective identity elements, zero and one.
More formally, a Semiring R is a set equipped with two binary relations + and *, such that:
(R,+) is a commutative monoid with identity element 0,
(R,*) is a monoid with identity element 1,
(*) left and right distributes over addition, and
multiplication by '0' annihilates R.
Depends on
4 packages- base-4.20.2.0with GHC
- containers-0.7with GHC
- hashable-1.4.7.0in this set
- unordered-containers-0.2.21in this set