proarrow
Safe HaskellNone
LanguageGHC2024

Proarrow.Category.Instance.DecoratedCospan

Description

Decorated cospans in k: a morphism a ~> b is a cospan a -> x <- b together with a decoration of its apex, a value of f x. Composition glues along a pushout and joins the two decorations on the glued apex, using the Alternative structure of f, which takes decorations on two objects to one on their coproduct. As for Proarrow.Category.Instance.Cospan, the coproduct of k is the tensor and every object is a Frobenius monoid, so this is a Hypergraph category.

With labelled boxes as the decoration, a morphism is an open hypergraph: see Proarrow.Category.Instance.OpenHypergraph.

Synopsis

Documentation

data DECCOSPAN (f :: k -> Type) Source Github #

Constructors

DC k 

Instances

Instances details
(HasPushouts k, HasCoproducts k, HasPullbacks k) => FunctorForRep (Pullback :: COSPAN k +-> SPAN k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cospan

Methods

fmap :: forall (a :: COSPAN k) (b :: COSPAN k). (a ~> b) -> ((Pullback :: COSPAN k +-> SPAN k) @ a) ~> ((Pullback :: COSPAN k +-> SPAN k) @ b) Source Github #

(HasPushouts k, HasCoproducts k, HasPullbacks k) => FunctorForRep (Pushout :: SPAN k +-> COSPAN k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cospan

Methods

fmap :: forall (a :: SPAN k) (b :: SPAN k). (a ~> b) -> ((Pushout :: SPAN k +-> COSPAN k) @ a) ~> ((Pushout :: SPAN k +-> COSPAN k) @ b) Source Github #

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Associated Types

type Unit 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type Unit = 'DC (InitialObject :: k) :: DECCOSPAN f

Methods

withOb2 :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) r. (Ob a, Ob b) => (Ob (a ** b) => r) -> r Source Github #

leftUnitor :: forall (a :: DECCOSPAN f). Ob a => ((Unit :: DECCOSPAN f) ** a) ~> a Source Github #

leftUnitorInv :: forall (a :: DECCOSPAN f). Ob a => a ~> ((Unit :: DECCOSPAN f) ** a) Source Github #

rightUnitor :: forall (a :: DECCOSPAN f). Ob a => (a ** (Unit :: DECCOSPAN f)) ~> a Source Github #

rightUnitorInv :: forall (a :: DECCOSPAN f). Ob a => a ~> (a ** (Unit :: DECCOSPAN f)) Source Github #

associator :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) (c :: DECCOSPAN f). (Ob a, Ob b, Ob c) => ((a ** b) ** c) ~> (a ** (b ** c)) Source Github #

associatorInv :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) (c :: DECCOSPAN f). (Ob a, Ob b, Ob c) => (a ** (b ** c)) ~> ((a ** b) ** c) Source Github #

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

swap :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f). (Ob a, Ob b) => (a ** b) ~> (b ** a) Source Github #

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

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

curry :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) (c :: DECCOSPAN f). (Ob a, Ob b) => ((a ** b) ~> c) -> a ~> (b ~~> c) Source Github #

apply :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f). (Ob a, Ob b) => ((a ~~> b) ** a) ~> b Source Github #

(^^^) :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) (x :: DECCOSPAN f) (y :: DECCOSPAN f). (b ~> y) -> (x ~> a) -> (a ~~> b) ~> (x ~~> y) Source Github #

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

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

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

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

copy :: forall (a :: DECCOSPAN f). Ob a => a ~> (a ** a) Source Github #

discard :: forall (a :: DECCOSPAN f). Ob a => a ~> (Unit :: DECCOSPAN f) Source Github #

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

withObDual :: forall (a :: DECCOSPAN f) r. Ob a => (Ob (Dual a) => r) -> r Source Github #

dual :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f). (a ~> b) -> Dual b ~> Dual a Source Github #

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

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

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

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

Defined in Proarrow.Category.Instance.DecoratedCospan

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

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

sizeOf :: forall (a :: DECCOSPAN f). Ob a => Int Source Github #

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

Defined in Proarrow.Category.Instance.DecoratedCospan

(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 #

(HasPushouts k, Alternative f) => CategoryOf (DECCOSPAN f) Source Github #

The category of decorated cospans in k: an arrow DC a ~> DC b is a pair of arrows a ~> x and b ~> x into a common object, with a decoration of x.

Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Associated Types

type (~>) 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type (~>) = DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type
(HasPushouts k, Alternative f) => DaggerProfunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

dagger :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f). DecCospan a b -> DecCospan b a Source Github #

(HasPushouts k, Alternative f) => Promonad (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

id :: forall (a :: DECCOSPAN f). Ob a => DecCospan a a Source Github #

(.) :: forall (b :: DECCOSPAN f) (c :: DECCOSPAN f) (a :: DECCOSPAN f). DecCospan b c -> DecCospan a b -> DecCospan a c Source Github #

(HasPushouts k, HasCoproducts k, Alternative f, MonoidalAction t) => Costrong (t :: (DECCOSPAN f, DECCOSPAN f) +-> DECCOSPAN f) (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

coact :: forall (a :: DECCOSPAN f) (x :: DECCOSPAN f) (y :: DECCOSPAN f). (Ob a, Ob x, Ob y) => DecCospan (Act t a x) (Act t a y) -> DecCospan x y Source Github #

(HasPushouts k, HasCoproducts k, Alternative f) => MonoidalProfunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

one :: DecCospan (Unit :: DECCOSPAN f) (Unit :: DECCOSPAN f) Source Github #

(**) :: forall (x1 :: DECCOSPAN f) (x2 :: DECCOSPAN f) (y1 :: DECCOSPAN f) (y2 :: DECCOSPAN f). DecCospan x1 x2 -> DecCospan y1 y2 -> DecCospan (x1 ** y1) (x2 ** y2) Source Github #

(HasPushouts k, Alternative f) => Profunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

dimap :: forall (c :: DECCOSPAN f) (a :: DECCOSPAN f) (b :: DECCOSPAN f) (d :: DECCOSPAN f). (c ~> a) -> (b ~> d) -> DecCospan a b -> DecCospan c d Source Github #

lmap :: forall (c :: DECCOSPAN f) (a :: DECCOSPAN f) (b :: DECCOSPAN f). (c ~> a) -> DecCospan a b -> DecCospan c b Source Github #

rmap :: forall (b :: DECCOSPAN f) (d :: DECCOSPAN f) (a :: DECCOSPAN f). (b ~> d) -> DecCospan a b -> DecCospan a d Source Github #

(\\) :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) r. ((Ob a, Ob b) => r) -> DecCospan a b -> r Source Github #

(HasPushouts k, HasCoproducts k, Alternative f, Ob a) => Frobenius ('DC a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

(HasPushouts k, HasCoproducts k, Alternative f, Ob a) => CocommutativeComonoid ('DC a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

(HasPushouts k, HasCoproducts k, Alternative f, Ob a) => CommutativeMonoid ('DC a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

(HasPushouts k, HasCoproducts k, Alternative f, Ob a) => Comonoid ('DC a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

counit :: ('DC a :: DECCOSPAN f) ~> (Unit :: DECCOSPAN f) Source Github #

comult :: ('DC a :: DECCOSPAN f) ~> (('DC a :: DECCOSPAN f) ** ('DC a :: DECCOSPAN f)) Source Github #

(HasPushouts k, HasCoproducts k, Alternative f, Ob a) => Monoid ('DC a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

mempty :: (Unit :: DECCOSPAN f) ~> ('DC a :: DECCOSPAN f) Source Github #

mappend :: (('DC a :: DECCOSPAN f) ** ('DC a :: DECCOSPAN f)) ~> ('DC a :: DECCOSPAN f) Source Github #

type (Pullback :: COSPAN k +-> SPAN k) @ (CS a :: COSPAN k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cospan

type (Pullback :: COSPAN k +-> SPAN k) @ (CS a :: COSPAN k) = 'SP a
type (Pushout :: SPAN k +-> COSPAN k) @ ('SP a :: SPAN k) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.Cospan

type (Pushout :: SPAN k +-> COSPAN k) @ ('SP a :: SPAN k) = CS a
type Unit Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type Unit = 'DC (InitialObject :: k) :: DECCOSPAN f
type (~>) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type (~>) = DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type
type Dual (a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type Dual (a :: DECCOSPAN f) = a
type Ob (a :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type Ob (a :: DECCOSPAN f) = WrappedOb ('DC :: k -> DECCOSPAN f) a
type (a :: DECCOSPAN f) ~~> (b :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type (a :: DECCOSPAN f) ~~> (b :: DECCOSPAN f) = ExpHG a b
type ('DC a :: DECCOSPAN f) ** ('DC b :: DECCOSPAN f) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

type ('DC a :: DECCOSPAN f) ** ('DC b :: DECCOSPAN f) = 'DC (a || b) :: DECCOSPAN f

data DecCospan (a :: DECCOSPAN f) (b :: DECCOSPAN f) where Source Github #

Constructors

DecCospan :: forall {k} {f :: k -> Type} (c :: k) (a1 :: k) (b1 :: k). (a1 ~> c) -> (b1 ~> c) -> f c -> DecCospan ('DC a1 :: DECCOSPAN f) ('DC b1 :: DECCOSPAN f) 

Instances

Instances details
(HasPushouts k, Alternative f) => DaggerProfunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

dagger :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f). DecCospan a b -> DecCospan b a Source Github #

(HasPushouts k, Alternative f) => Promonad (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

id :: forall (a :: DECCOSPAN f). Ob a => DecCospan a a Source Github #

(.) :: forall (b :: DECCOSPAN f) (c :: DECCOSPAN f) (a :: DECCOSPAN f). DecCospan b c -> DecCospan a b -> DecCospan a c Source Github #

(HasPushouts k, HasCoproducts k, Alternative f, MonoidalAction t) => Costrong (t :: (DECCOSPAN f, DECCOSPAN f) +-> DECCOSPAN f) (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

coact :: forall (a :: DECCOSPAN f) (x :: DECCOSPAN f) (y :: DECCOSPAN f). (Ob a, Ob x, Ob y) => DecCospan (Act t a x) (Act t a y) -> DecCospan x y Source Github #

(HasPushouts k, HasCoproducts k, Alternative f) => MonoidalProfunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

one :: DecCospan (Unit :: DECCOSPAN f) (Unit :: DECCOSPAN f) Source Github #

(**) :: forall (x1 :: DECCOSPAN f) (x2 :: DECCOSPAN f) (y1 :: DECCOSPAN f) (y2 :: DECCOSPAN f). DecCospan x1 x2 -> DecCospan y1 y2 -> DecCospan (x1 ** y1) (x2 ** y2) Source Github #

(HasPushouts k, Alternative f) => Profunctor (DecCospan :: DECCOSPAN f -> DECCOSPAN f -> Type) Source Github # 
Instance details

Defined in Proarrow.Category.Instance.DecoratedCospan

Methods

dimap :: forall (c :: DECCOSPAN f) (a :: DECCOSPAN f) (b :: DECCOSPAN f) (d :: DECCOSPAN f). (c ~> a) -> (b ~> d) -> DecCospan a b -> DecCospan c d Source Github #

lmap :: forall (c :: DECCOSPAN f) (a :: DECCOSPAN f) (b :: DECCOSPAN f). (c ~> a) -> DecCospan a b -> DecCospan c b Source Github #

rmap :: forall (b :: DECCOSPAN f) (d :: DECCOSPAN f) (a :: DECCOSPAN f). (b ~> d) -> DecCospan a b -> DecCospan a d Source Github #

(\\) :: forall (a :: DECCOSPAN f) (b :: DECCOSPAN f) r. ((Ob a, Ob b) => r) -> DecCospan a b -> r Source Github #

arr :: forall {k} (f :: k -> Type) (a :: k) (b :: k). Alternative f => (a ~> b) -> DecCospan ('DC a :: DECCOSPAN f) ('DC b :: DECCOSPAN f) Source Github #

A morphism of k as a cospan with the empty decoration.

coarr :: forall {k} (f :: k -> Type) (a :: k) (b :: k). Alternative f => (a ~> b) -> DecCospan ('DC b :: DECCOSPAN f) ('DC a :: DECCOSPAN f) Source Github #

A morphism of k as a cospan the other way round, with the empty decoration.