Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::sets::ComposedRetractImagePredicate< SourceSet, RetractFn, L > Struct Template Reference

Composed predicate for the retract-decidable image(f, Set) specialisation: y ↦ let mx = retract(f)(y); mx.has_value() ? S(mx.value()) : L::False. More...

Public Member Functions

template<typename U>
requires std::invocable<const RetractFn&, const U&> && std::invocable<const SourceSet&, typename std::invoke_result_t<const RetractFn&, const U&>::value_type>
constexpr L::Ω operator() (const U &y) const

Public Attributes

SourceSet source
RetractFn retract_fn

Detailed Description

template<typename SourceSet, typename RetractFn, typename L>
struct dedekind::sets::ComposedRetractImagePredicate< SourceSet, RetractFn, L >

Composed predicate for the retract-decidable image(f, Set) specialisation: y ↦ let mx = retract(f)(y); mx.has_value() ? S(mx.value()) : L::False.

Operational shape:

  • When retract(f)(y) has a value, the membership query factors through the source set's operator() at that preimage.
  • When the retract returns nothing, y is structurally outside image(F, S) and the predicate returns L::False directly.

Stores the source set and the retract callable by value. Sister predicate shape to ComposedIsoImagePredicate above (#657 / #602 Case A's iso sibling), differing in that the retract is partial so the membership query has to case-split on the has_value branch.


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