Documentation

CatCryptCore.Category.KlSPComp

Kleisli Category of SPComp as a Symmetric Monoidal Category #

This file shows that the Kleisli category of SPComp (stateful probabilistic computations) forms a symmetric monoidal category with Sum as tensor and Empty as unit.

Main results #

Objects of the Kleisli category of SPComp. Opaque wrapper around Type to avoid conflicting with Mathlib's CategoryTheory.types : Category Type.

Equations
Instances For
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[implicit_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    @[simp]
    theorem CatCrypt.Core.KlSPComp.comp_apply {α β γ : KlSPComp} (f : α β) (g : β γ) (x : α) :

    Monoidal definitions #

    All structural morphisms use explicit pattern matching on Sum constructors so their equations are directly available to simp.

    noncomputable def CatCrypt.Core.KlSPComp.wkL (X : KlSPComp) {Y₁ Y₂ : KlSPComp} (f : Y₁ Y₂) :
    (have this := X Y₁; this) have this := X Y₂; this
    Equations
    Instances For
      noncomputable def CatCrypt.Core.KlSPComp.wkR {X₁ X₂ : KlSPComp} (f : X₁ X₂) (Y : KlSPComp) :
      (have this := X₁ Y; this) have this := X₂ Y; this
      Equations
      Instances For
        noncomputable def CatCrypt.Core.KlSPComp.assocHom (X Y Z : KlSPComp) :
        (have this := (X Y) Z; this) have this := X Y Z; this
        Equations
        Instances For
          noncomputable def CatCrypt.Core.KlSPComp.assocInv (X Y Z : KlSPComp) :
          (have this := X Y Z; this) have this := (X Y) Z; this
          Equations
          Instances For
            noncomputable def CatCrypt.Core.KlSPComp.assocIso (X Y Z : KlSPComp) :
            (have this := (X Y) Z; this) have this := X Y Z; this
            Equations
            Instances For
              noncomputable def CatCrypt.Core.KlSPComp.lUnit (X : KlSPComp) :
              (have this := Empty X; this) X
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                noncomputable def CatCrypt.Core.KlSPComp.rUnit (X : KlSPComp) :
                (have this := X Empty; this) X
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  noncomputable def CatCrypt.Core.KlSPComp.braidHom (X Y : KlSPComp) :
                  (have this := X Y; this) have this := Y X; this
                  Equations
                  Instances For
                    noncomputable def CatCrypt.Core.KlSPComp.braidIso (X Y : KlSPComp) :
                    (have this := X Y; this) have this := Y X; this
                    Equations
                    Instances For
                      @[implicit_reducible]
                      Equations
                      • One or more equations did not get rendered due to their size.

                      Simp lemmas for class projections #

                      These bridge from Mathlib notation (, , ⊗ₘ, α_, λ_, ρ_) to our concrete definitions (wkL, wkR, assocIso, lUnit, rUnit).

                      @[simp]
                      theorem CatCrypt.Core.KlSPComp.tensorHom_eq {X₁ Y₁ X₂ Y₂ : KlSPComp} (f : X₁ Y₁) (g : X₂ Y₂) :

                      MonoidalCategory #

                      @[implicit_reducible]
                      Equations
                      • One or more equations did not get rendered due to their size.

                      BraidedCategory and SymmetricCategory #

                      @[implicit_reducible]
                      Equations
                      • One or more equations did not get rendered due to their size.