Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::numbers::PartialEmbedIntegerToRational< I > Struct Template Referenceexport

Identity and Associativity traits for Rational arithmetic. More...

Public Types

using value_type = Rational<I>
using logic_species = Kleene

Public Member Functions

TernaryResult< Rational< I > > operator() (I n) const noexcept

Detailed Description

template<IsInteger I>
struct dedekind::numbers::PartialEmbedIntegerToRational< I >

Identity and Associativity traits for Rational arithmetic.

Rational arithmetic over exact field operations satisfies:

  • Kleene associativity: if both sides are defined, they are equal
  • Kleene commutativity (for addition/multiplication)
  • Partial identities: 0 for addition, 1 for multiplication

Specializations are declared in the dedekind::category namespace (see below).

Embedding transform: ℤ ↪ ℚ with Ternary acknowledgment.

The embedding of an integer Z into the rationals is exact: every integer n corresponds uniquely to n/1. This transform returns Ternary::True to signal no information loss.

See also
embed_ℤ_ℚ_ (below) — the same \(n\mapsto n/1\) as a categorical arrow over default_integer, carrying the monic/homomorphism/monotone registrations the tower S-leg needs. This Ternary transform is the Kleene surface; the two are distinct, not a redundant fork.


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