Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::sets::Value< P > Struct Template Reference

The value algebra: a term or a predicate folded at the point p. A projection reads its coordinate, a constant is its value, a predicate the grammar does not know is evaluated as itself; an operator or a comparison combines its operands in the carrier of the non-constant one; an applied arrow converts its argument into its domain. More...

Public Member Functions

template<IsRingIntegral auto I>
constexpr decltype(auto) operator() (Projection< I >) const
template<typename K>
constexpr K operator() (const Const< K > &c) const
template<typename Q>
requires requires(const Q& q, const P& x) { q(x); }
constexpr auto operator() (const Q &q) const
template<typename Op, typename A, typename B, typename X, typename Y>
constexpr auto operator() (const BinOp< Op, A, B > &, const X &x, const Y &y) const
template<typename F, typename A, typename X>
constexpr auto operator() (const Ap< F, A > &t, const X &x) const
template<Rel R, typename A, typename B, typename X, typename Y>
constexpr bool operator() (const Cmp< R, A, B > &, const X &x, const Y &y) const
template<typename A, typename B>
constexpr auto steer (const RelAnd< A, B > &t) const
 The connectives short-circuit as the built-in && / || do, and McCarthy's conditional evaluates only the branch it selects: these nodes steer the recursion into their legs themselves (see cata), so a leg the operator does not reach is never evaluated.
template<typename A, typename B>
constexpr auto steer (const RelOr< A, B > &t) const
template<typename Pr, typename A, typename B>
constexpr auto steer (const CondT< Pr, A, B > &t) const
template<typename K>
constexpr rt_value_t< P > steer (const Term< K > &t) const
 A term built at run time, read at the point: its sort is inferred from its projections (a constant takes its context's), and it is read in that sort. The value is the point's one carrier, or the sum of its two.
template<typename K>
constexpr bool steer (const Pred< K > &t) const
 A predicate built at run time: a comparison in its operands' common sort, the connectives in 𝔹.
template<typename C, typename K>
constexpr C eval_as (const Term< K > &t) const
 The term read in the sort C: a projection its coordinate, a constant cast, an operator applied where admitted, a conditional's chosen branch. Each node visited checks its own admission, so a predicate called directly is at par with one the former bound.

Public Attributes

const P & p

Detailed Description

template<typename P>
struct dedekind::sets::Value< P >

The value algebra: a term or a predicate folded at the point p. A projection reads its coordinate, a constant is its value, a predicate the grammar does not know is evaluated as itself; an operator or a comparison combines its operands in the carrier of the non-constant one; an applied arrow converts its argument into its domain.

Template Parameters
Pthe point's type.

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