Constructing Categories of Corelations Brendan Fong (MIT)

Octoberfest Carnegie Mellon University 28 October 2017 I. Motivation This is a presentation of the LinRelk x .

( ) This is a presentation of the category LinRelk x .

( ) Consider the following square.

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel

( ) This is a pushout square in the category of props.

Linear relations interpret diagrams of linear maps

where we may compose by←ÐÐ→←ÐÐ→←Ð composition, pullback, and pushout.

This leads to a presentation of LinRel.

How do we prove this? This is a pushout square in the category of props.

Linear relations interpret diagrams of linear maps

where we may compose by←ÐÐ→←ÐÐ→←Ð function composition, pullback, and pushout.

This leads to a presentation of LinRel.

How do we prove this? Consider the following square.

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel

( ) Linear relations interpret diagrams of linear maps

where we may compose by←ÐÐ→←ÐÐ→←Ð function composition, pullback, and pushout.

This leads to a presentation of LinRel.

How do we prove this? Consider the following square.

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel

( ) This is a pushout square in the category of props. This leads to a presentation of LinRel.

How do we prove this? Consider the following square.

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel

( ) This is a pushout square in the category of props.

Linear relations interpret diagrams of linear maps

where we may compose by←ÐÐ→←ÐÐ→←Ð function composition, pullback, and pushout. How do we prove this? Consider the following square.

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel

( ) This is a pushout square in the category of props.

Linear relations interpret diagrams of linear maps

where we may compose by←ÐÐ→←ÐÐ→←Ð function composition, pullback, and pushout.

This leads to a presentation of LinRel. Monoidal categories of cospans allow construction of all finite colimits, via composition (pushout), monoidal product (binary ), and ● monoidal unit (initial object). ● Thus cospan categories provide useful language for system interconnection.● However, combining systems using colimits indiscriminately accumulates information.

Colimits combine systems. composition (pushout), monoidal product (binary coproducts), and ● monoidal unit (initial object). ● Thus cospan categories provide useful language for system interconnection.● However, combining systems using colimits indiscriminately accumulates information.

Colimits combine systems.

Monoidal categories of cospans allow construction of all finite colimits, via Thus cospan categories provide useful language for system interconnection. However, combining systems using colimits indiscriminately accumulates information.

Colimits combine systems.

Monoidal categories of cospans allow construction of all finite colimits, via composition (pushout), monoidal product (binary coproducts), and ● monoidal unit (initial object). ● ● However, combining systems using colimits indiscriminately accumulates information.

Colimits combine systems.

Monoidal categories of cospans allow construction of all finite colimits, via composition (pushout), monoidal product (binary coproducts), and ● monoidal unit (initial object). ● Thus cospan categories provide useful language for system interconnection.● Colimits combine systems.

Monoidal categories of cospans allow construction of all finite colimits, via composition (pushout), monoidal product (binary coproducts), and ● monoidal unit (initial object). ● Thus cospan categories provide useful language for system interconnection.● However, combining systems using colimits indiscriminately accumulates information. If we think about these as circuits, all we care about is the induced equivalence relation on X Y .

+

Consider cospans in FinSet.

X N Y If we think about these as circuits, all we care about is the induced equivalence relation on X Y .

+

Consider cospans in FinSet.

X N Y Consider cospans in FinSet.

X N Y

If we think about these as circuits, all we care about is the induced equivalence relation on X Y .

+ X Z

=

Cospans accumulate internal structure (witnesses for ‘empty equivalence classes’). Corelations forget this.

X N Y M Z Cospans accumulate internal structure (witnesses for ‘empty equivalence classes’). Corelations forget this.

X N Y M Z

X Z

= Corelations forget this.

X N Y M Z

X Z

=

Cospans accumulate internal structure (witnesses for ‘empty equivalence classes’). X N Y M Z

X Z

=

Cospans accumulate internal structure (witnesses for ‘empty equivalence classes’). Corelations forget this. A factorisation system , comprises , such that and contain all(E isomorphismsM) E M every f admits factorisation f m e. ● E M we have the universal property: ● = ○ ● e / m /

u !s v

 /  ∃ /  e′ m′

For example, epi–mono factorisation systems (like in FinSet).

Factorisation hides internal structure. For example, epi–mono factorisation systems (like in FinSet).

Factorisation hides internal structure.

A factorisation system , comprises subcategories , such that and contain all(E isomorphismsM) E M every f admits factorisation f m e. ● E M we have the universal property: ● = ○ ● e / m /

u !s v

 /  ∃ /  e′ m′ Factorisation hides internal structure.

A factorisation system , comprises subcategories , such that and contain all(E isomorphismsM) E M every f admits factorisation f m e. ● E M we have the universal property: ● = ○ ● e / m /

u !s v

 /  ∃ /  e′ m′

For example, epi–mono factorisation systems (like in FinSet). We may represent each corelation by a cospan such that X Y N lies in . When is stable under pushout, composition by pushout defines+ → a categoryE Corel . M (C)

A corelation is an equivalence class of cospans, where two cospans are equivalent if

N

m

N ′

X Y. When is stable under pushout, composition by pushout defines a category Corel . M (C)

A corelation is an equivalence class of cospans, where two cospans are equivalent if

N

m

N ′

X Y.

We may represent each corelation by a cospan such that X Y N lies in . + → E A corelation is an equivalence class of cospans, where two cospans are equivalent if

N

m

N ′

X Y.

We may represent each corelation by a cospan such that X Y N lies in . When is stable under pushout, composition by pushout defines+ → a categoryE Corel . M (C) Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel

( ) So we claim: I. Corelations model system interconnection and II. A universal property is useful for computing presentations. Does this universal construction generalise to other corelation categories?

What is the link? So we claim: I. Corelations model system interconnection and II. A universal property is useful for computing presentations. Does this universal construction generalise to other corelation categories?

What is the link?

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel Corel Vect

( ) ≅ ( ) Does this universal construction generalise to other corelation categories?

What is the link?

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel Corel Vect

( ) ≅ ( ) So we claim: I. Corelations model system interconnection and II. A universal property is useful for computing presentations. What is the link?

Vect Vectop Span Vect

+ ( ) Cospan Vect LinRel Corel Vect

( ) ≅ ( ) So we claim: I. Corelations model system interconnection and II. A universal property is useful for computing presentations. Does this universal construction generalise to other corelation categories? II. A Universal Property for Corelations A Span Corel does not in general exist. Under what conditions might it exist? (C) → (C)

Cospan Corel

(C) (C) A functor Span Corel does not in general exist. Under what conditions might it exist? (C) → (C)

? ?op Span ?

+ ( ) Cospan Corel

(C) (C) ? ?op Span ?

+ ( ) Cospan Corel

A functor Span Corel (Cdoes) not in general(C) exist. Under what conditions might it exist? (C) → (C) These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

When is this functorial?

Define a map Span Corel by taking pushouts.

C(A) → (C) These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C) These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C) These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C) These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C) These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C) Call this the pullback–pushout property (with respect to ).

When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C)

m?

These two cospans represent the same corelation when the canonical map lies in .

M When obeys the pullback–pushout property, then there exists a functor Span Corel . A C(A) → (C)

Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C)

m?

These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M M Define a map Span Corel by taking pushouts. When is this functorial? C(A) → (C)

m?

These two cospans represent the same corelation when the canonical map lies in . Call this the pullback–pushout property (with respect to ). M When obeys the pullback–pushout property, then thereM exists a functor Span Corel . A C(A) → (C) pushouts and pullbacks a factorisation system , with monos, stable un- ● der pushout ● such that obeys the( pullback–pushoutE M) M ⊆ property.

Then● we haveM a pushout square in Cat:

op Span

M +SMS M C(M) Cospan Corel

(C) (C)

Theorem

Suppose a category has

C Then we have a pushout square in Cat:

op Span

M +SMS M C(M) Cospan Corel

(C) (C)

Theorem

Suppose a category has pushouts and pullbacks C a factorisation system , with monos, stable un- ● der pushout ● such that obeys the( pullback–pushoutE M) M ⊆ property.

● M Theorem

Suppose a category has pushouts and pullbacks C a factorisation system , with monos, stable un- ● der pushout ● such that obeys the( pullback–pushoutE M) M ⊆ property.

Then● we haveM a pushout square in Cat:

op Span

M +SMS M C(M) Cospan Corel

(C) (C) Theorem: generalising

M Suppose has pushouts and pullbacks C a factorisation system with monos, stable under ● pushout ● a , stableM under⊆ pullback, obeying the pullback–pushout property. Then● we have a pushoutA ⊇ M square in Cat:

op Span

A +SAS A C(A) Cospan Corel

(C) (C) We have a pushout square in Cat:

op Span

C +SCS C (C) Cospan Corel Rel

(C) (C) ≅ (C)

Corollary: abelian case

Let be an abelian category. This has a (co)stable epi–mono factorisation system. C

The theorem can also be extended to monoidal categories, by requiring that the monoidal product preserve pushouts in and pullbacks in , and that and are closed under the monoidal product. C A M A The theorem can also be extended to monoidal categories, by requiring that the monoidal product preserve pushouts in and pullbacks in , and that and are closed under the monoidal product. C A M A

Corollary: abelian case

Let be an abelian category. This has a (co)stable epi–mono factorisation system. We haveC a pushout square in Cat:

op Span

C +SCS C (C) Cospan Corel Rel

(C) (C) ≅ (C) Corollary: abelian case

Let be an abelian category. This has a (co)stable epi–mono factorisation system. We haveC a pushout square in Cat:

op Span

C +SCS C (C) Cospan Corel Rel

(C) (C) ≅ (C)

The theorem can also be extended to monoidal categories, by requiring that the monoidal product preserve pushouts in and pullbacks in , and that and are closed under the monoidal product. C A M A Examples

Inj Injop Span Inj Corelations (Equivalence +● ( ) relations): Cospan FinSet Corel FinSet

( ) ( )

PInj PInjop Span PInj Partial equivalence +● ( ) relations: Cospan ParFunc PER Corel ParFunc

( ) ≅ ( ) Examples

Vect Vectop Span Vect

Linear relations: +● ( ) Cospan Vect Corel Vect LinRel

( ) ( ) ≅ Discrete time, SpltM SpltMop Span SpltM linear, time-invariant, +● ( ) dynamical Cospan Mat −1 Corel Mat −1 systems over k: k s,s k s,s ( [ ]) ( [ ]) This property is obeyed by the cofree comonad on the double finite power set functor, which has been used to model logic programs.

Examples

Let T be a comonad on Set such that T and T 2 both preserve pullbacks of regular monos. Then the category SetT of coal- gebras over T obeys the theorem with respect to (epis, regular monos). Examples

Let T be a comonad on Set such that T and T 2 both preserve pullbacks of regular monos. Then the category SetT of coal- gebras over T obeys the theorem with respect to (epis, regular monos).

This property is obeyed by the cofree comonad on the double finite power set functor, which has been used to model logic programs. Theorem: dual case

Suppose a category has pushouts and pullbacks C a factorisation system , with epis, stable under ● pullback ● such that obeys the pullback–pushout(E M) E ⊆ property.

Then● we haveE a pushout square in Cat:

op Span

E +SES E (C) Cospan Rel

(E) (C) Not an epi! (We cannot construct Rel Rel FinSet as a pushout.)

= ( )

3

2 2

Non-example: Relations

Surj does not obey pushout–pullback property.

Surj Surjop Span FinSet

+ ( ) Cospan Surj Rel FinSet

( ) ( ) Not an epi! (We cannot construct Rel Rel FinSet as a pushout.)

= ( )

Non-example: Relations

Surj does not obey pushout–pullback property.

Surj Surjop Span FinSet

+ ( ) Cospan Surj Rel FinSet

( ) ( ) 3

2 2 Not an epi! (We cannot construct Rel Rel FinSet as a pushout.)

= ( )

Non-example: Relations

Surj does not obey pushout–pullback property.

Surj Surjop Span FinSet

+ ( ) Cospan Surj Rel FinSet

( ) ( ) 3

2 2

1 Not an epi! (We cannot construct Rel Rel FinSet as a pushout.)

= ( )

Non-example: Relations

Surj does not obey pushout–pullback property.

Surj Surjop Span FinSet

+ ( ) Cospan Surj Rel FinSet

( ) ( ) 3

4

2 2

1 (We cannot construct Rel Rel FinSet as a pushout.)

= ( )

Non-example: Relations

Surj does not obey pushout–pullback property.

Surj Surjop Span FinSet

+ ( ) Cospan Surj Rel FinSet

( ) ( ) 3

4

2 2

1 Not an epi! Non-example: Relations

Surj does not obey pushout–pullback property.

Surj Surjop Span FinSet

+ ( ) Cospan Surj Rel FinSet

( ) ( ) 3

4

2 2

1 Not an epi! (We cannot construct Rel Rel FinSet as a pushout.)

= ( ) To recap: I. Corelations model system interconnection II. Categories of corelations can be constructed as a pushout of span and cospan categories. III. This helps derive presentations. I thank Fabio Zanasi for collaborating on this work. Thank you for listening.

For more: http://www.brendanfong.com/