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

A property where a midpoint always exists (a < c < b). More...

Concept definition

template<typename T>
IsTotallyOrdered<T> && !IsDiscrete<T> && requires(const T a, const T b) {
{ (a + b) / T{2} } -> std::convertible_to<T>;
}
A property where a midpoint always exists (a < c < b).
Definition completeness.cppm:109
A set where every point is isolated by a step: the carrier provides the NNO steps (successor / predec...
Definition completeness.cppm:93
A refinement where every pair is comparable (The Chain).
Definition total.cppm:63

Detailed Description

A property where a midpoint always exists (a < c < b).

The midpoint is computed as (a + b) / T{2} rather than (a + b) / 2 so that the carrier itself supplies the value 2 (via the T{2} structural constructor), rather than relying on mixed-type T-vs-int arithmetic. This matters for variant exact carriers (SignedExtensionalCardinal<>, Rational<...> over such) which do not implicitly inter-operate with literal int — forcing the carrier to construct its own 2 keeps the concept honest across both built-in (int, double) and exact carriers.