Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
affine.cppm File Reference

Affine spaces — points, vectors, dimension witnesses. More...

#include <algorithm>
#include <array>
#include <concepts>
#include <cstddef>
#include <initializer_list>
#include <limits>
#include <type_traits>
#include <utility>
import dedekind.algebra;
import dedekind.category;
Include dependency graph for affine.cppm:

Classes

struct  dedekind::geometry::FiniteDim
struct  dedekind::geometry::CountablyInfiniteDim
class  dedekind::geometry::Vector< F, N >
 An element of a Coordinate Space over a Field F. More...
class  dedekind::geometry::FunctionalVector< F, Fn >
 A vector-like object defined by coordinate evaluation x[i]. More...

Concepts

concept  dedekind::geometry::HasFiniteDimension
 A vector type whose coordinate index set is finite.
concept  dedekind::geometry::HasCountableDimension
 A vector type whose coordinate index set is at most countably infinite.
concept  dedekind::geometry::HasDimension
 A vector type with a specific compile-time dimension N.
concept  dedekind::geometry::IsAffine
 Affine-space witness over scalar carrier S.

Typedefs

template<IsFloatingScalar F, typename Fn>
using dedekind::geometry::InfiniteVector = FunctionalVector<F, Fn>
 Alias highlighting intent for potentially infinite-dimensional vectors.
template<IsFloatingScalar F, typename Fn>
using dedekind::geometry::SequenceVector = FunctionalVector<F, Fn>
 Alias for well-behaved infinite sequences viewed as vectors.

Functions

template<IsFloatingScalar F, typename Fn>
requires requires(const Fn& fn, std::size_t i) { { fn(i) } -> std::convertible_to<F>; }
constexpr auto dedekind::geometry::functional_vector (Fn &&fn)
 Factory helper for function-based vectors.
template<IsFloatingScalar F, typename Fn>
requires requires(const Fn& fn, std::size_t i) { { fn(i) } -> std::convertible_to<F>; }
constexpr auto dedekind::geometry::sequence_vector (Fn &&fn)
 Factory helper emphasizing sequence semantics.
template<IsFloatingScalar F>
constexpr Vector< F, 1 > dedekind::geometry::as_vector (const F &x)
 Embed a scalar as a 1-dimensional vector.

Detailed Description

Affine spaces — points, vectors, dimension witnesses.

@partition :affine

Note
"Space and time are commonly regarded as the forms of existence of the real world, matter as its substance." – Hermann Weyl, Space-Time-Matter (1918)

Typedef Documentation

◆ SequenceVector

template<IsFloatingScalar F, typename Fn>
using dedekind::geometry::SequenceVector = FunctionalVector<F, Fn>
export

Alias for well-behaved infinite sequences viewed as vectors.

A sequence (x_n) with coordinate access x[n] is treated as an infinite-dimensional vector in the same carrier.

Function Documentation

◆ as_vector()

template<IsFloatingScalar F>
Vector< F, 1 > dedekind::geometry::as_vector ( const F & x)
constexprexport

Embed a scalar as a 1-dimensional vector.

Formalises the view that ℝ (or any floating scalar) is a 1-dimensional vector space over itself. Combined with the tower embeddings (bool → ℕ → ℤ → ℚ → ℝ), any number in the tower can be lifted to a Vector<F,1>.