| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Category.Instance.Cospan
Description
The category of cospans in k: objects are those of k (wrapped in CS), and a morphism
a is a cospan ~> ba -> x <- b, composed by pushout. With the coproduct of k as tensor
every object is a Frobenius monoid, giving a Hypergraph,
compact closed, dagger category. This is the archetypal setting for undirected wiring diagrams.
These are the decorated cospans of Proarrow.Category.Instance.DecoratedCospan without a decoration, which is where their structure comes from.
Synopsis
- type COSPAN k = DECCOSPAN (Undecorated :: k -> Type)
- type CS = 'DC :: k -> DECCOSPAN (Undecorated :: k -> Type)
- type Cospan = DecCospan :: DECCOSPAN (Undecorated :: k -> Type) -> DECCOSPAN (Undecorated :: k -> Type) -> Type
- pattern Cospan :: forall {k} {a} {b} (c :: k) (a' :: k) (b' :: k). () => (a ~ CS a', b ~ CS b') => (a' ~> c) -> (b' ~> c) -> Cospan a b
- data Undecorated (c :: k) = Undecorated
- arr :: forall k (a :: k) (b :: k). CategoryOf k => (a ~> b) -> Cospan (CS a) (CS b)
- coarr :: forall k (a :: k) (b :: k). CategoryOf k => (a ~> b) -> Cospan (CS b) (CS a)
- data family Pushout :: SPAN k +-> COSPAN k
- data family Pullback :: COSPAN k +-> SPAN k
Documentation
type CS = 'DC :: k -> DECCOSPAN (Undecorated :: k -> Type) Source Github #
An object of k as one of COSPAN k.
type Cospan = DecCospan :: DECCOSPAN (Undecorated :: k -> Type) -> DECCOSPAN (Undecorated :: k -> Type) -> Type Source Github #
pattern Cospan :: forall {k} {a} {b} (c :: k) (a' :: k) (b' :: k). () => (a ~ CS a', b ~ CS b') => (a' ~> c) -> (b' ~> c) -> Cospan a b Source Github #
A cospan a -> c <- b.
data Undecorated (c :: k) Source Github #
The decoration that says nothing.
Constructors
| Undecorated |
Instances
| HasBinaryCoproducts k => Alternative (Undecorated :: k -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.Cospan | |
| CategoryOf k => Functor (Undecorated :: k -> Type) Source Github # | |
Defined in Proarrow.Category.Instance.Cospan Methods map :: forall (a :: k) (b :: k). (a ~> b) -> Undecorated a ~> Undecorated b Source Github # | |
| (HasPushouts k, HasCoproducts k, HasPullbacks k) => FunctorForRep (Pullback :: COSPAN k +-> SPAN k) Source Github # | |
| (HasPushouts k, HasCoproducts k, HasPullbacks k) => FunctorForRep (Pushout :: SPAN k +-> COSPAN k) Source Github # | |
| type (Pullback :: COSPAN k +-> SPAN k) @ (CS a :: COSPAN k) Source Github # | |
| type (Pushout :: SPAN k +-> COSPAN k) @ ('SP a :: SPAN k) Source Github # | |
coarr :: forall k (a :: k) (b :: k). CategoryOf k => (a ~> b) -> Cospan (CS b) (CS a) Source Github #