|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
A fold along the walk, fold(r, v, h), and its specialisation by the action law (the Jlt paper's Listing 4). acting_monoid<H> names the monoid an action h acts by on the right, a declared certificate of \(h(h(v, a), b) = h(v, a \cdot b)\) and \(h(v, 1) = v\), the product in the walk's order; keyed by the action's type without cv-qualification, as a fold deduces it. A fold walks a right action; a left action, scalar first as IsLeftAction, is a right action of the opposite monoid and registers Opposite<Op> (:involution), the bridge between the two textbook conventions. On n copies of one value the fold is v acted on by their product, and concat computes the product in one step or by squaring: two declared laws, two overloads, composed by resolution.
More...
A fold along the walk, fold(r, v, h), and its specialisation by the action law (the Jlt paper's Listing 4). acting_monoid<H> names the monoid an action h acts by on the right, a declared certificate of \(h(h(v, a), b) = h(v, a \cdot b)\) and \(h(v, 1) = v\), the product in the walk's order; keyed by the action's type without cv-qualification, as a fold deduces it. A fold walks a right action; a left action, scalar first as IsLeftAction, is a right action of the opposite monoid and registers Opposite<Op> (:involution), the bridge between the two textbook conventions. On n copies of one value the fold is v acted on by their product, and concat computes the product in one step or by squaring: two declared laws, two overloads, composed by resolution.