|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
The Pst fragment's normal form: a decidable set over a finite chain, folded into its run list as the chain is walked. More...
#include <algorithm>#include <concepts>#include <cstddef>#include <iterator>#include <optional>#include <ranges>#include <tuple>#include <type_traits>#include <utility>import dedekind.sequences:ranges;import dedekind.order;import dedekind.sets;import dedekind.category;
Classes | |
| struct | dedekind::sequences::detail_pst::ToMembership< S > |
| An element of the walk as the step to its membership, ⊥ past the window's top. More... | |
| struct | dedekind::sequences::ScanSteps< S > |
The normal form of s on the window [lo, hi], by exhaustion: a step source that walks the window (and the element after it) along chain_view and steps where χ changes, ⊥ outside the window. Lazy: one walk per traversal, nothing stored. More... | |
| struct | dedekind::sequences::Ø< T, L > |
| ∅: The Initial Object. Extensional (Size 0). More... | |
| struct | dedekind::sequences::𝔸< T, L, C > |
The universal set over the carrier T: the terminal object ⊤ of Sub(T), the reified type constraint. More... | |
| struct | dedekind::sequences::detail_pst_witness::Run< C > |
A maximal run of membership as its closed ends, [lo, hi]. More... | |
Namespaces | |
| namespace | dedekind::sequences::detail_pst_witness |
Concepts | |
| concept | dedekind::sequences::IsPstSet |
| A decidable set object over a finite chain with the covering step: a leaf or a lattice node whose χ answers in \(\mathbb{B}\) (the Δ grade). An L-valued set enters through its α-cuts. | |
Functions | |
| template<IsPstSet S> | |
| constexpr auto | dedekind::sequences::runs (const S &s, const typename S::Domain &lo, const typename S::Domain &hi) |
The runs of s on the window, read off its normal form. | |
| template<IsPstSet S> requires IsPst<typename S::Domain> | |
| constexpr auto | dedekind::sequences::runs (const S &s) |
| The runs over a whole truth chain, ⊥ to ⊤. | |
| template<typename View> | |
| consteval auto | dedekind::sequences::detail_pst_witness::summary (View v) |
| A run list's runs as (count, first, last). | |
| template<typename A> | |
| constexpr Maybe< std::decay_t< A > > | dedekind::sequences::detail_pst_witness::η (A value) |
| The Maybe endofunctor T, implemented via std::optional. | |
Variables | |
| constexpr auto | dedekind::sequences::detail_pst_witness::above_bottom = 𝔸<Ternary>{} & (π > Ternary::False) |
| constexpr auto | dedekind::sequences::detail_pst_witness::above5 = 𝔸<int>{} & (π > 5) |
| constexpr auto | dedekind::sequences::detail_pst_witness::below3 = 𝔸<int>{} & (π < 3) |
| constexpr auto | dedekind::sequences::detail_pst_witness::hedge = 𝔸<Ternary, Kleene>{} & Identity<Ternary>{} |
| constexpr auto | dedekind::sequences::detail_pst_witness::cut_u |
| constexpr auto | dedekind::sequences::detail_pst_witness::fibre_u |
| constexpr Projection< 0 > | dedekind::sequences::detail_pst_witness::π |
| The unary projection, the identity: the variable of a comprehension over one carrier. | |
The Pst fragment's normal form: a decidable set over a finite chain, folded into its run list as the chain is walked.
@partition :pst
A set over a finite chain is a finite table \(\chi : C \to L\). Equality, and with it the quantifiers and the subset identity, is exhaustion of the chain and lives upstream (sets:boundaries, sets:quantifier). What needs the walk is here: a decidable set whose χ is opaque reaches its normal form, a run list (order:runs), by exhausting the chain along chain_view, on a window whose ends are values or on a whole truth chain; its runs are then read off that normal form. O(N) steps.
An L-valued set is read through its decidable sets on \(\Omega\), pulled back along χ with the generic preimage (category:morphism): the fibre of χ at \(\ell\), \(\chi^{-1}(\ell) = @c preimage(χ, η(ℓ))\), and the α-cut \(\{\chi \ge \ell\} = @c preimage(χ, 𝔸<Ω> & (π ≥ ℓ))\). The α-cuts are nested in \(\ell\) and are the Pst normal form; their runs are this partition's. Not here: ℤ (the walk would have to jump between the term's cut points) and the dense carriers (no step).
Wikipedia: Alpha cut (fuzzy set), Fiber (mathematics), Run-length encoding, Dedekind cut
|
constexprexport |
The runs over a whole truth chain, ⊥ to ⊤.
| S | a set over a truth chain. |