Dedekind 0.0.0
A structuralist C++23 Module Library
Loading...
Searching...
No Matches
dedekind::category::identity_functor< Cat > Struct Template Referenceexport

Public Types

using Σ_cat = Cat
using Τ_cat = Cat
using Domain = Cat
using Codomain = Cat
template<typename U>
using Shape = U

Public Member Functions

constexpr Codomain operator() (const Domain &c) const noexcept
 Object Mapping: Id(C) = C Satisfies the IsArrow requirement for Functor Arrows.
template<typename 𝗳>
requires IsArrow<std::remove_cvref_t<𝗳>> && std::same_as<typename std::remove_cvref_t<𝗳>::Domain, typename Cat::Species>
constexpr auto operator() (𝗳 f) const
 The identity's action on arrows: the arrow itself. We loosen the constraint to accept any valid arrow of the category, satisfying the "Honest" requirement that F(f) = f.

Detailed Description

template<typename Cat>
requires IsSmallCategory<Cat>
struct dedekind::category::identity_functor< Cat >

The identity functor for any category, which simply returns the input arrow as-is. This serves as the canonical identity functor for any category, ensuring that the identity morphism is preserved without alteration.

I.e. this is presumably the only functor which is truly generic across all categories, since it doesn't rely on any specific structure of the category. Concrete IsShapedFunctor model.


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