Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::sets::ResidueClass< L > Struct Template Referenceexport

The class \(\{x \in \mathbb{N} \mid x \equiv r \pmod n\}\), read analytically: the materialisation of ℕ | (π % n == r). More...

Public Member Functions

constexpr bool operator== (const Ø< Cardinality, L > &) const
template<typename C>
constexpr bool operator== (const 𝔸< Cardinality, L, C > &) const

Public Attributes

std::size_t modulus
bool inhabited

Friends

constexpr bool operator== (const Ø< Cardinality, L > &e, const ResidueClass &s)
template<typename C>
constexpr bool operator== (const 𝔸< Cardinality, L, C > &u, const ResidueClass &s)

Detailed Description

template<typename L>
struct dedekind::sets::ResidueClass< L >

The class \(\{x \in \mathbb{N} \mid x \equiv r \pmod n\}\), read analytically: the materialisation of ℕ | (π % n == r).

Both lattice-bound comparisons (Eqn 2) are decided without enumerating anything: since x % n lies in \([0, n)\), the class is inhabited exactly when r does (r itself is a member), and it is all of ℕ exactly when it is inhabited and \(n = 1\). The modulus is positive by construction: a negative constant meeting ℕ raises, and a division by the constant 0 is refused when the term is built.

Template Parameters
Lthe species.

The documentation for this struct was generated from the following file: