|
Dedekind 0.0.0
A structuralist C++23 Module Library
|
Categorification of std::pair<A, B> as the categorical product (A × B). More...
Categorification of std::pair<A, B> as the categorical product (A × B).
A product of A and B is an object P equipped with projection morphisms π₁: P → A and π₂: P → B such that for any object X with morphisms f: X → A and g: X → B, there exists a unique morphism u: X → P making the following diagram commute:
The membership test is against the canonical projections π_1 / π_2 (above), NOT the raw .first / .second: std::pair, Complex and Rational satisfy it through the default .first / .second projection, while Dual satisfies it through its val / der overload — the P-leg is uniform across every product-shaped carrier regardless of storage names.
| Op | The pairing-constructor FACTORY the product commits to, defaulting to AnyOperation (unconstrained; the base case, ignored). A named Op must build the product: Op{}(a,b) is convertible to P (the Haskell pair constructor (,) specialised to P). Its result type is the discriminator, so the lattice AST tells a meet-pairing (MakeMeet, pullback legs) from a join-pairing (MakeJoin, pushout colegs) without a separate concept. #881. |