proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.IsoMix

Description

Isomix categories: *-autonomous categories whose two units agree, Dual Unit, the unit of par, being isomorphic to Unit (dualUnit). Then a dual and its object can be joined into the unit of the tensor, not just into the unit of par. Every compact closed category is isomix, and so is LINEAR, where tensor and par still differ.

Synopsis

Documentation

class StarAutonomous k => IsoMix k where Source Github #

Methods

dualUnit :: Dual (Unit :: k) ~> (Unit :: k) Source Github #

The unit of par is isomorphic to the unit of the tensor.

dualUnitInv :: (Unit :: k) ~> Dual (Unit :: k) Source Github #

The inverse of dualUnit.

dualityCounit :: forall (a :: k). Ob a => (Dual a ** a) ~> (Unit :: k) Source Github #

Join a dual and its object into the unit. dualityCounitDefault gives it from the *-autonomous structure; a compact closed category has a counit of its own. (There is no default method: a occurs only under type families, so GHC could not instantiate one.)

Instances

Instances details
IsoMix Nat Source Github # 
Instance details

Defined in Proarrow.Category.Instance.ZX

Methods

dualUnit :: Dual (Unit :: Nat) ~> (Unit :: Nat) Source Github #

dualUnitInv :: (Unit :: Nat) ~> Dual (Unit :: Nat) Source Github #

dualityCounit :: forall (a :: Nat). Ob a => (Dual a ** a) ~> (Unit :: Nat) Source Github #

IsoMix FINREL Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

IsoMix LINEAR Source Github #

The unit of par is () %1 -> (), which has one value, just like (): apply it to (), or give back the identity. So LINEAR is isomix, while tensor and par still differ.

Instance details

Defined in Proarrow.Category.Instance.Linear

IsoMix DOT Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

dualUnit :: Dual (Unit :: DOT) ~> (Unit :: DOT) Source Github #

dualUnitInv :: (Unit :: DOT) ~> Dual (Unit :: DOT) Source Github #

dualityCounit :: forall (a :: DOT). Ob a => (Dual a ** a) ~> (Unit :: DOT) Source Github #

IsoMix SVG Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Svg

Methods

dualUnit :: Dual (Unit :: SVG) ~> (Unit :: SVG) Source Github #

dualUnitInv :: (Unit :: SVG) ~> Dual (Unit :: SVG) Source Github #

dualityCounit :: forall (a :: SVG). Ob a => (Dual a ** a) ~> (Unit :: SVG) Source Github #

IsoMix () Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.IsoMix

Methods

dualUnit :: Dual (Unit :: ()) ~> (Unit :: ()) Source Github #

dualUnitInv :: (Unit :: ()) ~> Dual (Unit :: ()) Source Github #

dualityCounit :: forall (a :: ()). Ob a => (Dual a ** a) ~> (Unit :: ()) Source Github #

(HasPushouts k, HasCoproducts k) => IsoMix (COSPAN k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cospan

Methods

dualUnit :: Dual (Unit :: COSPAN k) ~> (Unit :: COSPAN k) Source Github #

dualUnitInv :: (Unit :: COSPAN k) ~> Dual (Unit :: COSPAN k) Source Github #

dualityCounit :: forall (a :: COSPAN k). Ob a => (Dual a ** a) ~> (Unit :: COSPAN k) Source Github #

TracedMonoidal k => IsoMix (INT k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.IntConstruction

Methods

dualUnit :: Dual (Unit :: INT k) ~> (Unit :: INT k) Source Github #

dualUnitInv :: (Unit :: INT k) ~> Dual (Unit :: INT k) Source Github #

dualityCounit :: forall (a :: INT k). Ob a => (Dual a ** a) ~> (Unit :: INT k) Source Github #

Num a => IsoMix (MatK a) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Mat

Methods

dualUnit :: Dual (Unit :: MatK a) ~> (Unit :: MatK a) Source Github #

dualUnitInv :: (Unit :: MatK a) ~> Dual (Unit :: MatK a) Source Github #

dualityCounit :: forall (a0 :: MatK a). Ob a0 => (Dual a0 ** a0) ~> (Unit :: MatK a) Source Github #

(HasPullbacks k, HasProducts k) => IsoMix (SPAN k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Span

Methods

dualUnit :: Dual (Unit :: SPAN k) ~> (Unit :: SPAN k) Source Github #

dualUnitInv :: (Unit :: SPAN k) ~> Dual (Unit :: SPAN k) Source Github #

dualityCounit :: forall (a :: SPAN k). Ob a => (Dual a ** a) ~> (Unit :: SPAN k) Source Github #

CommutativeMonoid m => IsoMix (MONOID m) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Monoid

Methods

dualUnit :: Dual (Unit :: MONOID m) ~> (Unit :: MONOID m) Source Github #

dualUnitInv :: (Unit :: MONOID m) ~> Dual (Unit :: MONOID m) Source Github #

dualityCounit :: forall (a :: MONOID m). Ob a => (Dual a ** a) ~> (Unit :: MONOID m) Source Github #

(IsoMix j, IsoMix k) => IsoMix (j, k) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.IsoMix

Methods

dualUnit :: Dual (Unit :: (j, k)) ~> (Unit :: (j, k)) Source Github #

dualUnitInv :: (Unit :: (j, k)) ~> Dual (Unit :: (j, k)) Source Github #

dualityCounit :: forall (a :: (j, k)). Ob a => (Dual a ** a) ~> (Unit :: (j, k)) Source Github #

Elems IsoMixStructures cs => IsoMix (FREE cs p) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.IsoMix

Methods

dualUnit :: Dual (Unit :: FREE cs p) ~> (Unit :: FREE cs p) Source Github #

dualUnitInv :: (Unit :: FREE cs p) ~> Dual (Unit :: FREE cs p) Source Github #

dualityCounit :: forall (a :: FREE cs p). Ob a => (Dual a ** a) ~> (Unit :: FREE cs p) Source Github #

dualityCounitDefault :: forall {k} (a :: k). (IsoMix k, Ob a) => (Dual a ** a) ~> (Unit :: k) Source Github #

dualityCounit from the *-autonomous structure: into the unit of par, then dualUnit.

type IsoMixStructures = '[Monoidal, SymMonoidal, Closed, StarAutonomous, IsoMix] Source Github #

The structures the free category needs for IsoMix, and those its laws are stated for.