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

The field embedding \(\mathbb{Q}\hookrightarrow\mathbb{R} =\mathbb{Q}(\sqrt2)\), \(q\mapsto q+0\sqrt2\). More...

Public Types

using Domain = Rational<I>
using Codomain = QuadraticReal<2, Rational<I>>

Public Member Functions

constexpr Codomain operator() (const Domain &q) const
 \(q\mapsto q+0\sqrt2\) (the QuadraticReal(Q) lift).

Detailed Description

template<typename I = default_integer>
class dedekind::numbers::EmbedRationalToReal< I >

The field embedding \(\mathbb{Q}\hookrightarrow\mathbb{R} =\mathbb{Q}(\sqrt2)\), \(q\mapsto q+0\sqrt2\).

A genuine arrow (not a stub): Domain and Codomain are both inhabited, std::regular field carriers, so the arrow is the pointwise map whose homomorphism law embed(a+b)==embed(a)+embed(b) is an element-level identity the compiler can evaluate. Its image is exactly the b=0 subfield \(\{a+0\sqrt2\}\subset\mathbb{Q}(\sqrt2)\) — an isomorphic copy of \(\mathbb{Q}\), i.e. a genuine subalgebra.

Template Parameters
Ithe integer carrier of the rational field (defaults to default_integer, so Codomain is the canonical QuadraticReal<2>).

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