Documentation

CatCryptCore.Category.Affine

Affine Monoidal Categories #

An affine monoidal category has a natural "discard" morphism del X : X ⟶ 𝟙_ C for every object, satisfying naturality (f ≫ del Y = del X). This is the dual notion to having a "copy" morphism; in a cocartesian setting it means every computation can be discarded.

Main definitions #

Duality #

An affine monoidal category has a natural discard morphism del X : X ⟶ 𝟙_ C for every object. Naturality means f ≫ del Y = del X.

Instances

    Duality: SemiCartesian → Affine #

    @[implicit_reducible]

    Every semicartesian monoidal category is affine (del = toUnit).

    Equations

    Concrete instance: KlSPComp is affine #

    noncomputable def CatCrypt.Core.KlSPComp.klDel (α : KlSPComp) :
    α have this := Empty; this

    Discard morphism: maps any value to the failing computation on Empty.

    Equations
    Instances For