A decidable Dedekind real: a principal rational cut or a rational radical \(\pm\sqrt{c}\).
More...
|
|
using | Domain = Cut |
|
using | ScalarCarrier = Q |
|
|
constexpr | Cut ()=default |
| | The additive identity \(0\) (principal cut at \(0\)).
|
|
constexpr | Cut (Q value) |
| | A rational is a real: its principal cut. Implicit, so \(\mathbb{Q}\hookrightarrow\) Cut is spelled by ordinary assignment.
|
template<typename V>
requires (!std::same_as<V, Q> && std::convertible_to<V, Q>) |
| constexpr | Cut (V v) |
| | Single-step implicit lift V → Q → Cut (e.g. an int literal names the principal cut at that integer).
|
|
constexpr Cut | operator- () const |
| | Additive reflection \(-x\): negate the rational, or flip the root's sign.
|
|
constexpr bool | contains (const Q &q) const |
| | Is the rational q strictly below this real ( \(q\in\) the lower cut)? The decidable membership query the cut is defined by: the χ of lower_set(*this).
|
|
|
static constexpr Cut | sqrt (Q radicand) |
| | The radical real \(\sqrt{c}\) (requires \(c\ge 0\); a perfect square is admitted — it simply compares == to its rational root).
|
|
|
constexpr std::strong_ordering | operator<=> (const Cut &a, const Cut &b) |
| | The order on reals is cut-inclusion, decided exactly on the leaf shapes. Everything else (<, >, <=, >=, ==) derives.
|
|
constexpr bool | operator== (const Cut &a, const Cut &b) |
template<typename Q = Rational<default_integer>>
requires IsRational<Q>
class dedekind::numbers::Cut< Q >
A decidable Dedekind real: a principal rational cut or a rational radical \(\pm\sqrt{c}\).
- Template Parameters
-
| Q | the rational scalar carrier (defaults to \(\mathbb{Q}\)). Only its ordered-ring surface is used (*, unary -, <=>, Q{}), so every decision is exact. |
The documentation for this class was generated from the following file:
- src/main/modules/dedekind/numbers/cut.cppm