Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::detail_involution Namespace Reference

An involution is an endomorphism once read on its object: the implication holds of the lifted arrow, endo<T>(f), and not of a bare callable such as std::logical_not<bool>, which is a family of arrows, one per type, and no IsArrow until endo names its domain. More...

Classes

struct  Reversed
 Op with its arguments exchanged, \(a \cdot^{op} b = b \cdot a\). More...
struct  opposite
struct  opposite< Reversed< Op > >

Typedefs

template<typename F, typename T>
using on_t
 F read as an arrow on the object T: itself when it is one; a bare callable (std::logical_not, a logic's RFL) as the endomorphism endo<T>(f) (:morphism), the value-type default where the object is one type and the callable's shape is its arrow.

Variables

constexpr auto neg = endo<std::size_t>(std::negate<std::size_t>{})
constexpr auto flip = endo<std::size_t>(std::bit_not<std::size_t>{})
constexpr auto not_bool = endo<bool>(std::logical_not<bool>{})
constexpr auto not_not = not_bool >> not_bool
constexpr auto flip_neg

Detailed Description

An involution is an endomorphism once read on its object: the implication holds of the lifted arrow, endo<T>(f), and not of a bare callable such as std::logical_not<bool>, which is a family of arrows, one per type, and no IsArrow until endo names its domain.

The opposite operation, an involution on operations: exchanging the arguments twice is the operation itself. The dagger below is an involutive anti-isomorphism, a homomorphism into the opposite.

The involutions the Jlt paper's Listing 1 defines from the certified callables: unary minus and the complement on size_t. Composed, −(~x) = x + 1 is an isomorphism, by (g∘f)⁻¹ = f⁻¹∘g⁻¹, and no involution: applied twice it is x + 2. Not exported: a two-letter name at namespace scope shadows locals wherever the module is used.

involution__Opposite

Typedef Documentation

◆ on_t

template<typename F, typename T>
using dedekind::category::detail_involution::on_t
Initial value:
std::conditional_t<IsArrow<F>, F, decltype(endo<T>(std::declval<F>()))>

F read as an arrow on the object T: itself when it is one; a bare callable (std::logical_not, a logic's RFL) as the endomorphism endo<T>(f) (:morphism), the value-type default where the object is one type and the callable's shape is its arrow.

Variable Documentation

◆ flip_neg

auto dedekind::category::detail_involution::flip_neg
constexpr
Initial value:
= endo<int>(std::bit_not<int>{}) >>
endo<int>(std::negate<int>{})