Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::IsRig Concept Referenceexport

A Semiring without Negatives (Addition is a Monoid). More...

Concept definition

template<typename T, typename Add, typename Mult>
A Monoid where the operation is commutative.
Definition total.cppm:605
The "Glue" of the Ring: a * (b + c) = a*b + a*c.
Definition species.cppm:802
A Semigroup with a two-sided Identity element.
Definition total.cppm:584
A Semiring without Negatives (Addition is a Monoid).
Definition total.cppm:751

Detailed Description

A Semiring without Negatives (Addition is a Monoid).

A Rig ("Ring without negatives") provides two monoidal operations that distribute over each other. bool with (OR, AND) and unsigned int with (+, *) are both Rigs. Neither has an additive inverse, so they stop short of a Ring.

Textbook note: In standard algebra literature, semiring is often used for this structure, while rig is the explicit mnemonic "ring without negatives".