|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
Pure syntactic shape: T closes strictly under the multiplicative-group operator surface *, /, and exposes the multiplicative unit T{1}.
More...
Pure syntactic shape: T closes strictly under the multiplicative-group operator surface *, /, and exposes the multiplicative unit T{1}.
Sibling of HasGroupOperatorsAdd for the multiplicative side. C++ has no unary 1/x operator (only *, &, +, -, ++, --, ~, ! can be unary); the convention here is to witness the multiplicative unit (the identity element 1) via the structural constructor T{1}, parallel to HasSemiringOperators's T{1} requirement. The reciprocal of x is then T{1} / x at the callsite, with no carrier-imposed .inverse() method needed.
The triple (*, /, T{1}) is the multiplicative-group surface a callsite needs to write a * b, a / b, and recover the unit T{1}, with results that stay in T.
As with all shape concepts, this checks syntactic closure only; it makes no semantic claim. HasGroupOperatorsMul<unsigned int> fires (*, /, unsigned int{1} all compile and yield unsigned int) even though unsigned int is not a multiplicative group — the integer / is truncation, not the field inverse. The semantic claim "this carrier is a
multiplicative group" lives in IsMultiplicativeGroup, gated by the species-trait registry.
Canonical positive witness: Rational (closes strictly under (*, /, T{1})). Negative witness (shape refuses): bool, unsigned char, unsigned short — integer promotion lifts * and / to int.
Introduced under #394.