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

T × T → T (The Base Total Species). More...

Concept definition

template<typename T, typename Op>
(S, Op) is closed under a binary operation: Op{}(s_1, s_2) returns a value of type S for any S-typed ...
Definition total.cppm:212
T × T → T (The Base Total Species).
Definition total.cppm:527
The Master Safety Certificate for Level 0: is_total, as a concept.
Definition total.cppm:395

Detailed Description

T × T → T (The Base Total Species).

A Magma is the most primitive algebraic structure: a set T together with a binary operation Op that is closed (the result stays in T) and total (defined for every pair of inputs). No further axioms are required.

In the Dedekind taxonomy, unsigned int with wrapping addition is a Magma, while int with standard addition is not (signed overflow is undefined behaviour and therefore a "hazard").