|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
\emph{Operational} duck-typed check that T carries the member API of a cyclic structure: T::Domain alias, T::generator() returning a Domain element, and T::successor(a) walking the chain.
More...
\emph{Operational} duck-typed check that T carries the member API of a cyclic structure: T::Domain alias, T::generator() returning a Domain element, and T::successor(a) walking the chain.
This is the syntactic counterpart of the categorical dedekind::category::IsCyclicGroup<T, Op> in the strict / operational pattern the project uses elsewhere (cf. HasRingOperators vs IsRing). The two concepts are complementary:
IsCyclic<T> — "this carrier exposes the shape" (member API for generator + successor). Cheap to check; useful for duck-typed templated algorithms that walk a cyclic chain.category::IsCyclicGroup<T, Op> — "this carrier under
this operation forms a cyclic abelian group" (axiomatic, via IsAbelianGroup<T, Op> + the is_cyclic_group_v<T, Op> opt-in trait). More demanding; certifies the laws.Carriers that satisfy both — e.g. morphologies::Modular<N> — are positively certified at both layers. Other carriers, such as morphologies::CyclicRing<T, N>, may satisfy only the operational layer unless separately registered with the categorical trait machinery.
The T::successor(x) member API exposed by IsCyclic carriers coincides numerically with the Peano successor \(S(x) = x + 1\) but is a different beast in the type system from the axiomatic dedekind::order::IsSuccessor<T> concept (in dedekind.order:completeness). The pairing is:
T::successor(x) returning a Domain element. Operational; what the IsCyclic shape concept reaches for when walking a cyclic chain.order::IsSuccessor<T>, asserting x + unit<T>(std::multiplies<T>{}) is well-typed and that T is a partial magma + multiplicatively pointed. Axiomatic; the trait the order::IsArchimedean composition demands.The two coincide on carriers like Modular<N> that satisfy both surfaces. The coherence witness Modular<N>::successor(x) == x + Modular<N>{1} is pinned at the type level in src/main/modules/dedekind/morphologies/cyclic.cppm (alongside the IsCyclic / IsCyclicGroup chains for the same carrier). Re-expressing order::IsArchimedean purely in terms of :order concepts is deliberately not done here: the additive partial-magma + pointed multiplicative-identity composition is the algebraic content the Archimedean axiom genuinely needs, and the order layer is the right home for it.
The Peano successor and the Archimedean property are unified in modern probability through the Archimedean generator of copula theory: a strictly decreasing convex function \(\varphi : [0, 1] \to [0, \infty]\) with the additive law
\[ \varphi(C(u, v)) \;=\; \varphi(u) \,+\, \varphi(v), \]
where C is an Archimedean copula. Two threads of the library meet in this framing:
C. Adding 1 once corresponds to composing one more dependency layer via \(\varphi^{-1}\).S) is the discrete analogue of the copula-theoretic d-monotonicity condition — \(\varphi\)'s pseudo-inverse must be "sufficiently large" for the dependency to scale across any number of variables.This is the deeper motivation behind the project's twin successor / generator vocabulary: the IsCyclic carrier supplies a discrete generator g and a successor walk g, S(g), S(S(g)), \ldots; an order::IsArchimedean carrier supplies the same shape at the axiom level; an Archimedean copula lifts the same shape into the continuous unit interval. A dedicated :copula partition is out of scope here, but the framing is recorded so future work can connect the discrete and continuous Archimedean stories without re-deriving the bridge.