proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Monoidal.StarAutonomous

Description

Star-autonomous categories: dialogue categories (Proarrow.Category.Monoidal.Dialogue) whose dualizing functor Dual is an involution, so that double negation Dual (Dual a) ≅ a (doubleNeg) and dual is bijective on hom-sets (dualInv). They are closed, with an internal hom ExpSA a b = Dual (a ** Dual b), and are the categorical semantics of multiplicative linear logic.

Synopsis

Documentation

class (Dialogue k, Closed k) => StarAutonomous k where Source Github #

A *-autonomous category: a dialogue category whose dual is an involution, so that Hom(a ** b, Dual c) is symmetric in its three arguments.

Laws: those of Dialogue, and

Stated as code by the Laws instance for StarAutonomousStructures, and checked by Proarrow.Testing.Laws.testStarAutonomous.

Minimal complete definition

dualInv

Methods

dualInv :: forall (a :: k) (b :: k). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

Inverse to dual on hom-sets: recovers the undualized arrow.

doubleNeg :: forall (a :: k). Ob a => Dual (Dual a) ~> a Source Github #

Double-negation elimination. Defaults to doubleNegDefault; an instance whose double dual is the object itself can say so directly.

Instances

Instances details
StarAutonomous Nat Source Github # 
Instance details

Defined in Proarrow.Category.Instance.ZX

Methods

dualInv :: forall (a :: Nat) (b :: Nat). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: Nat). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous BOOL Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.StarAutonomous

Methods

dualInv :: forall (a :: BOOL) (b :: BOOL). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: BOOL). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous FINREL Source Github # 
Instance details

Defined in Proarrow.Category.Instance.FinRel

Methods

dualInv :: forall (a :: FINREL) (b :: FINREL). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: FINREL). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous LINEAR Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Linear

Methods

dualInv :: forall (a :: LINEAR) (b :: LINEAR). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: LINEAR). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous DOT Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Dot

Methods

dualInv :: forall (a :: DOT) (b :: DOT). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: DOT). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous SVG Source Github # 
Instance details

Defined in Proarrow.Tools.Diagrams.Svg

Methods

dualInv :: forall (a :: SVG) (b :: SVG). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: SVG). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous () Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.StarAutonomous

Methods

dualInv :: forall (a :: ()) (b :: ()). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: ()). Ob a => Dual (Dual a) ~> a Source Github #

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

Defined in Proarrow.Category.Instance.IntConstruction

Methods

dualInv :: forall (a :: INT k) (b :: INT k). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

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

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

Defined in Proarrow.Category.Instance.Mat

Methods

dualInv :: forall (a0 :: MatK a) (b :: MatK a). (Ob a0, Ob b) => (Dual a0 ~> Dual b) -> b ~> a0 Source Github #

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

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

Defined in Proarrow.Category.Instance.Span

Methods

dualInv :: forall (a :: SPAN k) (b :: SPAN k). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

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

Scalar e => StarAutonomous (TNET e) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.TensorNetwork

Methods

dualInv :: forall (a :: TNET e) (b :: TNET e). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: TNET e). Ob a => Dual (Dual a) ~> a Source Github #

(HasPushouts k, HasCoproducts k, Alternative f) => StarAutonomous (DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

dualInv :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: DECCOSPAN f). Ob a => Dual (Dual a) ~> a Source Github #

StarAutonomous (KLEISLI (Cont r)) Source Github # 
Instance details

Defined in Proarrow.Promonad.Cont

Methods

dualInv :: forall (a :: KLEISLI (Cont r)) (b :: KLEISLI (Cont r)). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

doubleNeg :: forall (a :: KLEISLI (Cont r)). Ob a => Dual (Dual a) ~> a Source Github #

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

Defined in Proarrow.Category.Instance.Monoid

Methods

dualInv :: forall (a :: MONOID m) (b :: MONOID m). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

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

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

Defined in Proarrow.Category.Monoidal.StarAutonomous

Methods

dualInv :: forall (a :: (j, k)) (b :: (j, k)). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

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

Elems StarAutonomousStructures cs => StarAutonomous (FREE cs p) Source Github # 
Instance details

Defined in Proarrow.Category.Monoidal.StarAutonomous

Methods

dualInv :: forall (a :: FREE cs p) (b :: FREE cs p). (Ob a, Ob b) => (Dual a ~> Dual b) -> b ~> a Source Github #

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

doubleNegDefault :: forall {k} (a :: k). (StarAutonomous k, Ob a) => Dual (Dual a) ~> a Source Github #

doubleNeg from the rest of the structure: dualInv of doubleNegInv at the dual.

doubleNegIso :: forall {k} (a :: k) (a' :: k). (StarAutonomous k, Ob a, Ob a') => PIso a a' (Dual (Dual a)) (Dual (Dual a')) Source Github #

type ExpSA (a :: k) (b :: k) = Dual (a ** Dual b) Source Github #

currySA :: forall {k} (a :: k) (b :: k) (c :: k). (StarAutonomous k, Ob a, Ob b) => ((a ** b) ~> c) -> a ~> ExpSA b c Source Github #

applySA :: forall {k} (b :: k) (c :: k). (StarAutonomous k, Ob b, Ob c) => (ExpSA b c ** b) ~> c Source Github #

expSA :: forall {k} (a :: k) (b :: k) (x :: k) (y :: k). StarAutonomous k => (b ~> y) -> (x ~> a) -> ExpSA a b ~> ExpSA x y Source Github #

type StarAutonomousStructures = '[Monoidal, SymMonoidal, Closed, Dialogue, StarAutonomous] Source Github #

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