|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
Exported Modules | |
| module | dedekind.topology |
| module | dedekind.sets |
| module | dedekind.sets |
| module | dedekind.order |
| module | dedekind.order |
| module | dedekind.order |
Concepts | |
| concept | dedekind::numbers::IsNatural |
| Structural concept for a commutative semiring with total order (the intensional ℕ). | |
| concept | dedekind::numbers::IsIntegralScalar |
| Numbers-layer alias for the algebra scalar bridge concept. | |
| concept | dedekind::numbers::IsUnsignedIntegralScalar |
| Numbers-layer alias for the algebra scalar bridge concept. | |
| concept | dedekind::numbers::IsFloatingScalar |
| Numbers-layer alias for the algebra scalar bridge concept. | |
| concept | dedekind::numbers::IsScalar |
| concept | dedekind::numbers::IsQuaternionScalar |
| Scalar type suitable as quaternion components. | |
| concept | dedekind::numbers::RejectsNonFinite |
The rejection contract a saturating backing must offer ℚ's tripwire: is_finite(i), found by ADL, says whether i is a point of ℤ or a sentinel (±ℵ_0 / NaZ). Rational rejects a non-finite value wherever one can arise (construction, comparison); a saturating carrier without this hook would clamp silently and is not admitted as a backing (see FractionBacking). | |
| concept | dedekind::numbers::IsRational |
Q is the rational field Rational<Z> — the canonical exact, dense, strongly-ordered coefficient carrier. Used to gate the real carriers (Cut, QuadraticReal): over \(\mathbb{Q}\) a nonsquare integer D has \(\sqrt D\notin\mathbb{Q}\) (a theorem), so those carriers are genuine (canonical representation, sound conjugate/norm) — which fails for a coefficient field that already contains \(\sqrt D\) (e.g. the degenerate QuadraticReal<2, QuadraticReal<2>>). | |
| concept | dedekind::numbers::IsComplexScalar |
Classes | |
| class | dedekind::numbers::DivergencePath< R > |
The escape signal of a Mandelbrot orbit, tagged as a sequence-shape witness: a monotone {Unknown,True}-valued Path<Ternary> that is structurally absorptive for every parameter c. More... | |
| class | dedekind::numbers::EmbedRationalToReal< I > |
| The field embedding \(\mathbb{Q}\hookrightarrow\mathbb{R}
=\mathbb{Q}(\sqrt2)\), \(q\mapsto q+0\sqrt2\). More... | |
| struct | dedekind::numbers::LatticeFactory< AmbientSet, N > |
| Primary template for lattice factory values. More... | |
| struct | dedekind::sets::ResidueClass< L > |
The class \(\{x \in \mathbb{N} \mid x \equiv r \pmod n\}\), read analytically: the materialisation of ℕ | (π % n == r). More... | |
| class | dedekind::numbers::Quaternion< R > |
| Hamilton's hypercomplex numbers q = a + bi + cj + dk. More... | |
| class | dedekind::numbers::QuadraticReal< D, Q > |
| A real of \(\mathbb{Q}(\sqrt D)\): \(a+b\sqrt D\). More... | |
| class | dedekind::numbers::Rational< Z > |
| The Field of Fractions over an Integral Domain Z. More... | |
| struct | dedekind::numbers::PartialAddRational< I > |
| Partial addition transform for Rational. More... | |
| struct | dedekind::numbers::PartialMulRational< I > |
| Partial multiplication transform for Rational. More... | |
| struct | dedekind::numbers::HonestDivRational< I > |
| Division transform for Rational. More... | |
| struct | dedekind::numbers::PartialEmbedIntegerToRational< I > |
| Identity and Associativity traits for Rational arithmetic. More... | |
| struct | dedekind::numbers::ReachPath |
The reach indicator's type: a Path<Ternary> monotone in {Unknown, True} (True absorbs), constructible only through collatz_reach_path, which guarantees that shape; registered absorptive in sequences below, as :mandelbrot's DivergencePath is. More... | |
| class | dedekind::numbers::Cut< Q > |
| A decidable Dedekind real: a principal rational cut or a rational radical \(\pm\sqrt{c}\). More... | |
| struct | dedekind::numbers::LowerCut< Q > |
The datum of a real's lower set: the real itself, χ(q) = real.contains(q). More... | |
| class | dedekind::numbers::Complex< R > |
| struct | dedekind::numbers::PartialAddComplex< R > |
| Partial addition transform for Complex<R>. More... | |
| struct | dedekind::numbers::PartialMulComplex< R > |
| Partial multiplication transform for Complex<R>. More... | |
| struct | dedekind::numbers::UnitRoot< N > |
A SYMBOLIC N-th root of unity \(\zeta_N^{\,p}\), carried by its exponent p ∈ ℤ/N (Modular<N>). The unit harmonics \(\mu_N=\{z:z^N=1\}\): the torsion subgroup of the unit circle U(1), cut out of ℂ, cyclic of order N and \(\cong\mathbb{Z}/N\) via de Moivre. More... | |
| struct | dedekind::numbers::Character< N > |
The de Moivre CHARACTER \(\chi_m : \mathbb{Z}/N \to \mu_N\), \(k \mapsto \zeta_N^{\,mk}\) — the plane wave "as such", carried SYMBOLICALLY in UnitRoot<N> (consumes the μ_N layer; resolve() collapses to exact ℂ at N=8). More... | |
| struct | dedekind::numbers::DiscreteCos< N > |
The exact discrete COSINE \(\cos_N(k) = \cos(2\pi k/N) =
\Re\,\zeta_N^k\) over the Modular<N> angle — the EVEN part of the de Moivre character (= the \(\tfrac12(I+U)\) projection's real value). More... | |
| struct | dedekind::numbers::DiscreteSin< N > |
The exact discrete SINE \(\sin_N(k) = \sin(2\pi k/N) =
\Im\,\zeta_N^k\) — the ODD part of the character (Im of character<N>(1) resolved). An IsArrow Modular<N> → ℝ, exact at N=8. More... | |
Enumerations | |
| enum class | dedekind::numbers::KleenePolicy { Inclusive , Exclusive } |
Typedefs | |
| template<IsComplexScalar R> | |
| using | dedekind::numbers::OrbitPath = Path<Complex<R>> |
| using | dedekind::numbers::machine_real_scalar = double |
| using | dedekind::numbers::default_integer = dedekind::sets::SignedCardinality |
Default signed-integer carrier used by downstream numeric layers (Rational, embeddings). Post-#670-sibling (ℚ retarget): anchored on sets::SignedCardinality (saturating ℤ proxy with ±ℵ_0 / NaZ escalation), mirroring how ℤ = 𝔸<SignedCardinality> in :integer. This is the discipline-consistent canonical ℤ carrier — ℚ = 𝔸<Rational<default_integer>> now uses the saturating variant uniformly. | |
| using | dedekind::numbers::C1 = dedekind::sets::ExtensionalCardinal<> |
| using | dedekind::numbers::Z1 = dedekind::sets::SignedExtensionalCardinal<> |
| using | dedekind::numbers::SC = dedekind::sets::SignedCardinality |
| using | dedekind::numbers::Card = dedekind::sets::Cardinality |
| using | dedekind::numbers::machine_integer = int |
| template<IsInteger I = default_integer> | |
| using | dedekind::numbers::RationalPolynomial = dedekind::algebra::Polynomial<Rational<I>> |
The polynomial ring over the rationals in one variable, ℚ[x]: algebra::Polynomial over the quotient field of the integer carrier I. | |
| template<IsRational Q = Rational<default_integer>> | |
| using | dedekind::numbers::LowerSet = Comprehension<𝔸<Q, Boole>, LowerCut<Q>> |
| The lower set of a real, \(\{q\in\mathbb{Q}\mid q<r\}\), as a set over \(\mathbb{Q}\). | |
| template<IsRational Q = Rational<default_integer>> | |
| using | dedekind::numbers::PrincipalRay = Interval<Q> |
| The ray \(\{q<p\}\) over \(\mathbb{Q}\): the lower set of a principal cut, \(\mathbb{Q}\hookrightarrow\mathbb{R}\) as the order datum. | |
Functions | |
| template<IsComplexScalar R> | |
| constexpr auto | dedekind::numbers::euclidean_escape_radius_squared (R escape_radius_squared=R{4}) |
| template<IsComplexScalar R> | |
| constexpr auto | dedekind::numbers::mandelbrot_step (const Complex< R > &c) |
| template<IsComplexScalar R> | |
| constexpr auto | dedekind::numbers::mandelbrot_orbit (const Complex< R > &c) |
| template<IsComplexScalar R, typename EscapeCriterion> requires IsEscapeCriterion<EscapeCriterion, Complex<R>> | |
| constexpr auto | dedekind::numbers::orbit_divergence_path (const OrbitPath< R > &orbit, EscapeCriterion criterion) -> DivergencePath< R > |
| template<IsComplexScalar R, typename EscapeCriterion> requires IsEscapeCriterion<EscapeCriterion, Complex<R>> | |
| constexpr std::optional< std::size_t > | dedekind::numbers::orbit_escape_time (const OrbitPath< R > &orbit, std::size_t max_iter, const EscapeCriterion &criterion) |
| template<IsComplexScalar R> | |
| constexpr std::optional< std::size_t > | dedekind::numbers::orbit_escape_time (const OrbitPath< R > &orbit, std::size_t max_iter, R escape_radius_squared=R{4}) |
| template<IsComplexScalar R, typename EscapeCriterion> requires IsEscapeCriterion<EscapeCriterion, Complex<R>> | |
| constexpr auto | dedekind::numbers::M_kleene_N (std::size_t max_iter, EscapeCriterion criterion) |
| template<IsComplexScalar R, typename EscapeCriterion> requires IsEscapeCriterion<EscapeCriterion, Complex<R>> | |
| constexpr auto | dedekind::numbers::M_N (std::size_t max_iter, EscapeCriterion criterion, KleenePolicy policy=KleenePolicy::Inclusive) |
| template<IsComplexScalar R, typename EscapeCriterion> requires IsEscapeCriterion<EscapeCriterion, Complex<R>> | |
| constexpr auto | dedekind::numbers::M_tower (EscapeCriterion criterion, KleenePolicy policy=KleenePolicy::Inclusive) |
| template<typename S> requires requires(S&& s) { dedekind::sets::image(embed_𝔹_ℕ_, std::forward<S>(s)); } | |
| constexpr auto | dedekind::numbers::embed_𝔹_ℕ (S &&s) |
Set-level lift of embed_𝔹_ℕ_: image of a Boolean set S under the canonical mono 𝔹 ↪ ℕ. | |
| template<IsNatural N, std::unsigned_integral U> | |
| constexpr N | dedekind::numbers::embed_unsigned_integral (U v) |
| Canonical injection from std::unsigned_integral into any IsNatural domain N via its single-argument constructor. | |
| template<typename L, typename C, std::integral K1, std::integral K2> | |
| constexpr ResidueClass< L > | dedekind::sets::operator& (const 𝔸< Cardinality, L, C > &, const Cmp< Rel::Eq, BinOp< std::modulus<>, Projection< 0 >, Const< K1 > >, Const< K2 > > &c) |
ℕ & (π % n == r): the residue class, decided analytically. A residue outside \([0, n)\) is never met, so π % 3 == 3 is empty. ADL finds it through the 𝔸<Cardinality> operand. | |
| template<typename Q> | |
| constexpr auto | dedekind::numbers::Sqrt2_Symbolic () |
| template<typename R> requires std::regular<R> | |
| constexpr auto | dedekind::numbers::TranscendentalSet () |
| The Transcendental Set (𝕋). | |
| constexpr std::size_t | dedekind::numbers::collatz_rule (std::size_t n) |
The recurrence, spelled out explicitly as a named function (not a lambda): n even ↦ n/2, n odd ↦ 3n+1. Computed on the native size_t shadow, which saturates where 3n+1 would leave the word, the posture of ℕ's proxy (the point-free relation on Cardinality saturates to ℵ₀ the same way). The word's top is odd, so it is a fixpoint of the rule: an orbit that reaches it never reaches 1, and the verdict below stays Unknown rather than wrapping into a false True. | |
| constexpr auto | dedekind::numbers::collatz_orbit (std::size_t n) |
The orbit \(\{n\} ; T^{\le N}\) presented as the arrow's iterate — a lazy Path<std::size_t>. | |
| constexpr ReachPath | dedekind::numbers::collatz_reach_path (std::size_t n) |
True once 1 is present, Unknown before — a monotone {Unknown,True} absorptive path (the ℕ analogue of Mandelbrot's escape indicator). | |
| constexpr std::optional< std::size_t > | dedekind::numbers::collatz_reach_time (std::size_t n, std::size_t budget) |
The first index \(k \le\) budget at which the orbit hits 1, else nullopt — the efficient materialization (one forward pass). | |
| constexpr Ternary | dedekind::numbers::reaches_1_within (std::size_t n, std::size_t budget) |
The Rosolini-dominance verdict: reaches 1 within budget ⟹ True (IN); not yet ⟹ Unknown (U). Never False. | |
| template<std::size_t W, std::size_t B> | |
| constexpr bool | dedekind::numbers::all_reach_1_within () |
The collapse: the open \(\forall\)-conjecture, restricted to a finite window \([1, W)\) and a budget B, is a decidable compile-time fact. | |
| template<IsRational Q> | |
| constexpr LowerSet< Q > | dedekind::numbers::lower_set (const Cut< Q > &r) |
| \(r \mapsto \{q<r\}\): the real read as its lower set. | |
| template<IsRational Q> | |
| constexpr PrincipalRay< Q > | dedekind::numbers::principal_ray (const Q &p) |
\(p \mapsto \{q<p\}\): the rational embedded as the principal ray, extensionally lower_set(Cut<Q>{p}). | |
| template<IsComplexScalar R> | |
| constexpr Complex< R > | dedekind::numbers::conj (const Complex< R > &z) |
| Complex conjugate: conj(a + bi) = a − bi. | |
| template<IsComplexScalar R> | |
| constexpr R | dedekind::numbers::dot (const Complex< R > &z, const Complex< R > &w) |
| The real inner product on ℂ ≅ ℝ²: dot(z, w) = Re(z · conj w) = re_z·re_w + im_z·im_w. | |
| template<IsComplexScalar R> | |
| constexpr R | dedekind::numbers::abs2 (const Complex< R > &z) |
| Squared norm abs2(z) = <z, z> = |z|² = re² + im²: exact, √-free. | |
| template<IsComplexScalar R> | |
| constexpr R | dedekind::numbers::euclidean_norm_squared (const Complex< R > &z) |
Squared Euclidean norm on Complex<R>: a synonym for abs2, kept so it stays reachable by ADL in dedekind::numbers for callers that do not import dedekind.geometry (e.g. the Mandelbrot escape test and the set-algebra predicates). Kept squared to avoid a square root in hot paths. | |
| template<unsigned N> | |
| constexpr UnitRoot< N > | dedekind::numbers::unit_root () |
| The primitive N-th root \(\zeta_N=\zeta_N^{1}\) (the μ_N generator). | |
| template<unsigned N> | |
| constexpr Character< N > | dedekind::numbers::character (dedekind::morphologies::Modular< N > m) |
The character \(\chi_m\) at frequency m. | |
| template<unsigned N> requires (N == 8u) | |
| constexpr DiscreteCos< N > | dedekind::numbers::cos_n () |
| \(\cos_N = \Re\,\zeta_N^{(\cdot)}\) as an arrow. | |
| template<unsigned N> requires (N == 8u) | |
| constexpr DiscreteSin< N > | dedekind::numbers::sin_n () |
| \(\sin_N = \Im\,\zeta_N^{(\cdot)}\) as an arrow. | |
Variables | |
| template<dedekind::numbers::IsComplexScalar R> | |
| constexpr bool | dedekind::sequences::is_absorptive_sequence_v< dedekind::numbers::DivergencePath< R > > = true |
Opt-in: every DivergencePath<R> is absorptive (eventually constant — True after escape, or the degenerate constant Unknown when bounded). The eventual-constancy is structural, holding for all c, so it is a sound type-level registration. See dedekind::numbers::DivergencePath. | |
| constexpr EmbedRationalToReal | dedekind::numbers::embed_ℚ_ℝ {} |
| The canonical S-leg instance \(\mathbb{Q}\hookrightarrow\mathbb{R}\). | |
| constexpr auto | dedekind::numbers::ℝ |
The canonical real-number universe ℝ = 𝔸<QuadraticReal<2>, Boole, ℶ_1> — the coat-hanger. | |
| constexpr auto | dedekind::numbers::ℝ_d |
The machine-real ambient: the finite doubles 𝕃<double>. | |
| template<auto AmbientSet, std::size_t N = 1> | |
| constexpr LatticeFactory< AmbientSet, N > | dedekind::numbers::lattice {} |
| First-class lattice value: lattice<ℝ_d>. | |
| constexpr auto | dedekind::numbers::embed_𝔹_ℕ_ |
| Canonical embedding 𝔹 ↪ ℕ: bool → Cardinality. | |
| constexpr Cardinality | dedekind::numbers::aleph_0 = Cardinality{ℵ_0{}} |
The countably-infinite cardinal \(\aleph_0\) as a Cardinality value: the saturation point, and the unique fixpoint of Successor<Cardinality> (succ(ℵ₀) = ℵ₀). A readable spelling of Cardinality{ℵ_0{}}, sibling to finite_cardinality(n). | |
| template<typename T> | |
| constexpr bool | dedekind::numbers::is_transcendental_v = false |
| Trait to mark a species as Transcendental (π, e). | |
| constexpr auto | dedekind::numbers::ℤ |
| constexpr 𝔸< Rational< default_integer >, Boole, ℵ_0 > | dedekind::numbers::ℚ |
| The canonical rational-number universe ℚ = 𝔸<Rational<default_integer>> (post-#559). | |
| constexpr auto | dedekind::numbers::embed_ℤ_ℚ_ |
Restored variant-layer subalgebra embedding ℤ ↪ ℚ: SignedCardinality → Rational<default_integer>, \(n\mapsto
n/1\). | |
| template<IsInteger I = default_integer> | |
| constexpr auto | dedekind::numbers::embed_𝕃_ℚ |
Exact dyadic embedding of the finite doubles into ℚ: 𝕃<double> → Rational. | |
| constexpr auto | dedekind::numbers::collatz |
The Trsk relation \(T \subseteq \mathbb{N}\times\mathbb{N}\), spelled point-free as the McCarthy conditional \(T = (\text{even} \cap \text{halve}) \cup (\text{odd} \cap
\text{triple})\) — no lambda, no graph, the recurrence is the relation, spelled in uniform set-grammar: & (meet), ~ (complement), | (join, the structural OrPredicate union of #365). Mirrors the divides relation of §4; the parity test appears exactly once. | |
| constexpr auto | dedekind::numbers::converges_in_1 |
converges_in_1 \(= \mathrm{collatz}^{\circ}(1) = \{n \mid
\mathrm{collatz}(n) = 1\}\) — the pre-image of the fixed-point target \(\{1\}\): the naturals that reach 1 in exactly one step. Point-free, via the converse fibre. | |
| constexpr auto | dedekind::numbers::collatz2 = collatzM >> collatzM |
collatz2 \(= \mathrm{collatz};\mathrm{collatz}\) over the finite \([0,64)\) middle — two steps, the bare relative product, middle inferred from the bound (no argument, no shadow, no graph, no array). | |
| constexpr auto | dedekind::numbers::converged_2 |
| constexpr auto | dedekind::numbers::pending_2 = ~converged_2 |
pending_2 \(= \sim\)converged_2 — the naturals not yet captured within two steps: the honest "Unknown", complemented on the domain (unary), not on the pair universe. | |
| template<> | |
| constexpr bool | dedekind::sequences::is_absorptive_sequence_v< dedekind::numbers::ReachPath > |
Opt-in: every ReachPath is absorptive (eventually constant: True once 1 is seen, or the constant Unknown). The shape is guaranteed by its only constructor, so the registration is sound. | |
| constexpr auto | dedekind::numbers::embed_ℝ_ℂ |
The Birkhoff S leg \(\mathbb{R}\hookrightarrow\mathbb{C}\) over the coat-hanger: QuadraticReal<2> → Complex<QuadraticReal<2>>, \(r\mapsto (r,0)\). | |
| constexpr auto | dedekind::numbers::root8 |
| The exact de Moivre exponential \(\zeta_8 : \mathbb{Z}/8 \to
\mathbb{C}^\times\) over the coat-hanger ℝ = ℚ(√2): \(k \mapsto \zeta_8^{\,k} = (\cos\tfrac{2\pi k}{8},\ \sin\tfrac{2\pi
k}{8})\). | |
| constexpr Complex< QuadraticReal< 2 > > | dedekind::numbers::ζ8 |
The primitive 8th root of unity ζ8 = e^{2πi/8} = ½√2 + ½√2·i, exact in ℂ(ℚ(√2)) — the generator of the de Moivre map root8. | |
| constexpr auto | dedekind::numbers::ℂ |
The canonical complex-number universe ℂ = 𝔸<Complex<QuadraticReal<2>>, Boole, ℶ_1> — the coat-hanger ℂ = Cplx(ℝ) over the genuine ℝ = ℚ(√2) (mirroring ℝ and 𝔻). Equality on ℚ(√2)[i] is decidable, so ℂ answers in Boole; ℶ_1 is the cardinality of the ℂ it models, not a logic. | |
Files | |
| file | src/main/modules/dedekind/numbers/numbers.cppm |
| Level -1 to 8: The Numerical Tower (ℕ ⊂ ℤ ⊂ ℚ ⊂ ℝ ⊂ ℂ). | |
| file | src/main/modules/dedekind/numbers/boolean.cppm |
| Formal definition of the Boolean system 𝔹 within the numeric ontology. | |
| file | src/main/modules/dedekind/numbers/cardinality.cppm |
| Re-export of dedekind.sets:cardinality with numbers-level proofs. | |
| file | src/main/modules/dedekind/numbers/collatz.cppm |
| Bounded Collatz reachability — a §4 relational exhibit on ℕ. | |
| file | src/main/modules/dedekind/numbers/complex.cppm |
| Minimal complex wrapper for experimental reintegration. | |
| file | src/main/modules/dedekind/numbers/constants.cppm |
| Reserved for Dedekind-cut realisations of named reals (empty). | |
| file | src/main/modules/dedekind/numbers/cut.cppm |
| The genuine real: a decidable Dedekind cut on \(\mathbb{Q}\). | |
| file | src/main/modules/dedekind/numbers/integer.cppm |
| Minimal number taxonomy concepts for reintegration. | |
| file | src/main/modules/dedekind/numbers/lattice.cppm |
| Integer lattices in ℝ_d and ℝ_dⁿ. | |
| file | src/main/modules/dedekind/numbers/mandelbrot.cppm |
| Core Mandelbrot recurrence helpers over complex carriers. | |
| file | src/main/modules/dedekind/numbers/natural.cppm |
| The Dictionary of Species (The Registry). | |
| file | src/main/modules/dedekind/numbers/quadratic.cppm |
| \(\mathbb{Q}(\sqrt D)\) — a genuine, decidable quadratic real field. | |
| file | src/main/modules/dedekind/numbers/quaternion.cppm |
| The Quaternion Division Ring (ℍ). | |
| file | src/main/modules/dedekind/numbers/rational.cppm |
| ℚ — rationals as numerator/denominator pairs. | |
| file | src/main/modules/dedekind/numbers/real.cppm |
The real line: ℝ (the coat-hanger — a set-indexed field over the order-complete carrier QuadraticReal<2>) and the machine ambient ℝ_d over the finite doubles 𝕃<double>. | |
| file | src/main/modules/dedekind/numbers/real_bridge.cppm |
| The Birkhoff S leg \(\mathbb{Q}\hookrightarrow\mathbb{R}\): a genuine monic homomorphism into the \(\mathbb{Q}(\sqrt2)\) coat-hanger, with computed witnesses, plus its graph \(\Gamma=\operatorname{graph}(\text{embed})\subseteq\mathbb{Q}\times
\mathbb{R}\) reifying the arrow relationally. | |
| file | src/main/modules/dedekind/numbers/scalars.cppm |
| Semirings as the formal algebraic basis for scalar number systems. | |
| file | src/main/modules/dedekind/numbers/symbolic.cppm |
| Symbolic constants ($\sqrt{2}$, …) as Dedekind cuts. | |