Completeness for Cartesian bicategories Relational algebra with - - PowerPoint PPT Presentation

completeness for cartesian bicategories
SMART_READER_LITE
LIVE PREVIEW

Completeness for Cartesian bicategories Relational algebra with - - PowerPoint PPT Presentation

Completeness for Cartesian bicategories Relational algebra with string diagrams Filippo Bonchi, Jens Seeber , Pawe l Soboci nski IMT School for Advanced Studies Lucca Glasgow - 18 th December, 2018 Contents 1 Cartesian bicategories 2


slide-1
SLIDE 1

Completeness for Cartesian bicategories

Relational algebra with string diagrams Filippo Bonchi, Jens Seeber, Pawe l Soboci´ nski

IMT School for Advanced Studies Lucca

Glasgow - 18th December, 2018

slide-2
SLIDE 2

Contents

1 Cartesian bicategories 2 Frobenius theories 3 Completeness

slide-3
SLIDE 3

String diagrams

  • Idea: Use string diagrams as syntax for relational algebraic

theories

slide-4
SLIDE 4

String diagrams

  • Idea: Use string diagrams as syntax for relational algebraic

theories

  • Develop a categorical logic for those theories
slide-5
SLIDE 5

Relations with string diagrams

The category Rel of sets with relations as morphisms

slide-6
SLIDE 6

Relations with string diagrams

The category Rel of sets with relations as morphisms

  • forms a symmetric monoidal category:
slide-7
SLIDE 7

Relations with string diagrams

The category Rel of sets with relations as morphisms

  • forms a symmetric monoidal category:

R1 ⊗ R2 = {((a, b), (c, d)) | (a, c) ∈ R1, (b, d) ∈ R2}

R1

a c

R2

b d

slide-8
SLIDE 8

Relations with string diagrams

The category Rel of sets with relations as morphisms

  • forms a symmetric monoidal category:

R1 ⊗ R2 = {((a, b), (c, d)) | (a, c) ∈ R1, (b, d) ∈ R2}

R1

a c

R2

b d

  • Composition:

R1 ; R2 = {(x, z) | ∃y : (x, y) ∈ R1, (y, z) ∈ R2}

R1 R2

x y z

slide-9
SLIDE 9

Relations with string diagrams

  • Relations are ordered by inclusion
slide-10
SLIDE 10

Relations with string diagrams

  • Relations are ordered by inclusion
  • Every object:
slide-11
SLIDE 11

Relations with string diagrams

  • Relations are ordered by inclusion
  • Every object:
  • Copying and discarding
slide-12
SLIDE 12

Relations with string diagrams

  • Relations are ordered by inclusion
  • Every object:
  • Copying and discarding

,

slide-13
SLIDE 13

Relations with string diagrams

  • Relations are ordered by inclusion
  • Every object:
  • Copying and discarding

,

  • Equality and “spawn”
slide-14
SLIDE 14

Relations with string diagrams

  • Relations are ordered by inclusion
  • Every object:
  • Copying and discarding

,

  • Equality and “spawn”

,

slide-15
SLIDE 15

Observations

Comonoid

= = = =

slide-16
SLIDE 16

Observations

Comonoid

= = = =

Monoid

= = = =

slide-17
SLIDE 17

Observations

Comonoid

= = = =

Monoid

= = = =

Frobenius

= =

slide-18
SLIDE 18

Observations

Comonoid

= = = =

Monoid

= = = =

Frobenius

= =

Adjointness

≤ ≤ ≤ ≤

slide-19
SLIDE 19

Observations

Comonoid

= = = =

Monoid

= = = =

Frobenius

= =

Adjointness

≤ ≤ ≤ ≤

Lax Comonoid homomorphism

R

R R R

slide-20
SLIDE 20

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory

slide-21
SLIDE 21

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered

slide-22
SLIDE 22

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category

slide-23
SLIDE 23

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

slide-24
SLIDE 24

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
slide-25
SLIDE 25

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid
slide-26
SLIDE 26

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid

satisfying coherence

slide-27
SLIDE 27

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid

satisfying coherence and the laws on the last slide.

slide-28
SLIDE 28

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid

satisfying coherence and the laws on the last slide. A morphism

slide-29
SLIDE 29

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid

satisfying coherence and the laws on the last slide. A morphism is a monoidal functor

slide-30
SLIDE 30

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid

satisfying coherence and the laws on the last slide. A morphism is a monoidal functor preserving the ordering, the comonoid and the monoid.

slide-31
SLIDE 31

Cartesian bicategories

Definition (Carboni & Walters)

A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with

  • a comonoid
  • a monoid

satisfying coherence and the laws on the last slide. A morphism is a monoidal functor preserving the ordering, the comonoid and the monoid. This captures the “relational algebraic” properties of Rel.

slide-32
SLIDE 32

Contents

1 Cartesian bicategories 2 Frobenius theories 3 Completeness

slide-33
SLIDE 33

Frobenius theories

Definition

A Lawvere theory is a finite-product category with objects the natural numbers.

slide-34
SLIDE 34

Frobenius theories

Definition

A Frobenius theory is a Cartesian bicategory with objects the natural numbers.

slide-35
SLIDE 35

Frobenius theories

Definition

A Frobenius theory is a Cartesian bicategory with objects the natural numbers.

Definition

A model of a Lawvere theory T (in Set) is a morphism of finite-product categories M: T → Set A morphism between models is a natural transformation.

slide-36
SLIDE 36

Frobenius theories

Definition

A Frobenius theory is a Cartesian bicategory with objects the natural numbers.

Definition

A model of a Frobenius theory F (in Rel) is a morphism of Cartesian bicategories M: F → Rel A morphism between models is a lax natural transformation.

slide-37
SLIDE 37

Frobenius theories

Definition

A Frobenius theory is a Cartesian bicategory with objects the natural numbers.

Definition

A model of a Frobenius theory F (in Rel) is a morphism of Cartesian bicategories M: F → Rel A morphism between models is a lax natural transformation.

Theorem (Completeness for Lawvere theories)

If x, y are morphisms in T such that M(x) = M(y) for all models M: T → Set, then x = y.

slide-38
SLIDE 38

Frobenius theories

Definition

A Frobenius theory is a Cartesian bicategory with objects the natural numbers.

Definition

A model of a Frobenius theory F (in Rel) is a morphism of Cartesian bicategories M: F → Rel A morphism between models is a lax natural transformation.

Theorem (Completeness for Frobenius theories)

If x, y are morphisms in F such that M(x) ≤ M(y) for all models M: F → Rel, then x ≤ y.

slide-39
SLIDE 39

The syntactic Frobenius theory

Signature Σ

slide-40
SLIDE 40

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m.

slide-41
SLIDE 41

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms
slide-42
SLIDE 42

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms

Mor(CBΣ) ::= ǫ

  • .

. . . . . S2 . . . . . . S1

  • .

. . . . . S1 . . . S2

slide-43
SLIDE 43

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms

Mor(CBΣ) ::= ǫ

  • .

. . . . . S2 . . . . . . S1

  • .

. . . . . S1 . . . S2

  • .

. . . . . σ

slide-44
SLIDE 44

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms

Mor(CBΣ) ::= ǫ

  • .

. . . . . S2 . . . . . . S1

  • .

. . . . . S1 . . . S2

  • .

. . . . . σ

modulo the laws of Cartesian bicategories.

slide-45
SLIDE 45

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms

Mor(CBΣ) ::= ǫ

  • .

. . . . . S2 . . . . . . S1

  • .

. . . . . S1 . . . S2

  • .

. . . . . σ

modulo the laws of Cartesian bicategories. A model M: CBΣ → Rel consists of

slide-46
SLIDE 46

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms

Mor(CBΣ) ::= ǫ

  • .

. . . . . S2 . . . . . . S1

  • .

. . . . . S1 . . . S2

  • .

. . . . . σ

modulo the laws of Cartesian bicategories. A model M: CBΣ → Rel consists of

  • a set V = M(1)
slide-47
SLIDE 47

The syntactic Frobenius theory

Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m. Freely generated (syntactic) Cartesian bicategory CBΣ has

  • bjects N and morphisms

Mor(CBΣ) ::= ǫ

  • .

. . . . . S2 . . . . . . S1

  • .

. . . . . S1 . . . S2

  • .

. . . . . σ

modulo the laws of Cartesian bicategories. A model M: CBΣ → Rel consists of

  • a set V = M(1)
  • relations M(σ) ⊆ V n × V m for σ ∈ Σ, σ: n → m
slide-48
SLIDE 48

Example Frobenius theories

Example

R

slide-49
SLIDE 49

Example Frobenius theories

Example

R

ensures that R is reflexive

slide-50
SLIDE 50

Example Frobenius theories

Example

R

ensures that R is reflexive

  • R

R ≤ R

slide-51
SLIDE 51

Example Frobenius theories

Example

R

ensures that R is reflexive

  • R

R ≤ R

ensures that R is transitive

slide-52
SLIDE 52

Example Frobenius theories

Example

R

ensures that R is reflexive

  • R

R ≤ R

ensures that R is transitive

  • R

≤ R R

and

R ≤

slide-53
SLIDE 53

Example Frobenius theories

Example

R

ensures that R is reflexive

  • R

R ≤ R

ensures that R is transitive

  • R

≤ R R

and

R ≤

ensure that R is a function.

slide-54
SLIDE 54

Example Frobenius theories

Example

R

ensures that R is reflexive

  • R

R ≤ R

ensures that R is transitive

  • R

≤ R R

and

R ≤

ensure that R is a function.

slide-55
SLIDE 55

Example Frobenius theories

Example

R

ensures that R is reflexive

  • R

R ≤ R

ensures that R is transitive

  • R

≤ R R

and

R ≤

ensure that R is a function.

ensures that the underlying set is nonempty.

slide-56
SLIDE 56

Presentations

Definition

Fix a signature Σ and let E be a set of (well-typed) inequalities

  • f morphisms in CBΣ.
slide-57
SLIDE 57

Presentations

Definition

Fix a signature Σ and let E be a set of (well-typed) inequalities

  • f morphisms in CBΣ.

The Frobenius theory CBΣ/E has the morphisms of CBΣ taken modulo E.

slide-58
SLIDE 58

Presentations

Definition

Fix a signature Σ and let E be a set of (well-typed) inequalities

  • f morphisms in CBΣ.

The Frobenius theory CBΣ/E has the morphisms of CBΣ taken modulo E.

Lemma

A model of CBΣ/E is the same thing as a model of CBΣ satisfying E.

slide-59
SLIDE 59

Presentations

Definition

Fix a signature Σ and let E be a set of (well-typed) inequalities

  • f morphisms in CBΣ.

The Frobenius theory CBΣ/E has the morphisms of CBΣ taken modulo E.

Lemma

A model of CBΣ/E is the same thing as a model of CBΣ satisfying E.

Lemma

Every Frobenius theory is of the shape CBΣ/E for some Σ, E.

slide-60
SLIDE 60

Contents

1 Cartesian bicategories 2 Frobenius theories 3 Completeness

slide-61
SLIDE 61

Σ-structures

  • A model M: CBΣ → Rel consists of
  • a set V = M(1)
  • relations M(σ) ⊆ V n × V m for σ ∈ Σ, σ: n → m
slide-62
SLIDE 62

Σ-structures

  • A model M: CBΣ → Rel consists of
  • a set V = M(1)
  • relations M(σ) ⊆ V n × V m for σ ∈ Σ, σ: n → m
  • In model theory, these are called Σ-structures.
slide-63
SLIDE 63

Σ-structures

  • A model M: CBΣ → Rel consists of
  • a set V = M(1)
  • relations M(σ) ⊆ V n × V m for σ ∈ Σ, σ: n → m
  • In model theory, these are called Σ-structures.
  • A morphism between Σ-structures is a function between

the underlying sets respecting the relations.

slide-64
SLIDE 64

Σ-structures

  • A model M: CBΣ → Rel consists of
  • a set V = M(1)
  • relations M(σ) ⊆ V n × V m for σ ∈ Σ, σ: n → m
  • In model theory, these are called Σ-structures.
  • A morphism between Σ-structures is a function between

the underlying sets respecting the relations.

  • One can view a set as a Σ-structure – with empty relations
slide-65
SLIDE 65

Σ-structures

  • A model M: CBΣ → Rel consists of
  • a set V = M(1)
  • relations M(σ) ⊆ V n × V m for σ ∈ Σ, σ: n → m
  • In model theory, these are called Σ-structures.
  • A morphism between Σ-structures is a function between

the underlying sets respecting the relations.

  • One can view a set as a Σ-structure – with empty relations
  • For S a Σ-structure, a morphism n → S is an n-tuple in S
slide-66
SLIDE 66

Universal models

Example

We can translate a morphism R: n → m in CBΣ to a finite model UR with n

ιR

− → UR

ωR

← − − m (called universal model).

slide-67
SLIDE 67

Universal models

Example

We can translate a morphism R: n → m in CBΣ to a finite model UR with n

ιR

− → UR

ωR

← − − m (called universal model).

σ τ σ

slide-68
SLIDE 68

Universal models

Example

We can translate a morphism R: n → m in CBΣ to a finite model UR with n

ιR

− → UR

ωR

← − − m (called universal model).

σ τ σ x y z

slide-69
SLIDE 69

Universal models

Example

We can translate a morphism R: n → m in CBΣ to a finite model UR with n

ιR

− → UR

ωR

← − − m (called universal model).

σ τ σ x y z

UR(1) = {x, y, z}

slide-70
SLIDE 70

Universal models

Example

We can translate a morphism R: n → m in CBΣ to a finite model UR with n

ιR

− → UR

ωR

← − − m (called universal model).

σ τ σ x y z

UR(1) = {x, y, z} UR(σ) = {(x, y), (y, z)}, UR(τ) = {x}

slide-71
SLIDE 71

Universal models

Example

We can translate a morphism R: n → m in CBΣ to a finite model UR with n

ιR

− → UR

ωR

← − − m (called universal model).

σ τ σ x y z

UR(1) = {x, y, z} UR(σ) = {(x, y), (y, z)}, UR(τ) = {x} ιR = x, ωR = y

slide-72
SLIDE 72

Connection with Completeness

Theorem (SYCO 1)

The assignment of R: n → m to n

ιR

− → UR

ωR

← − − m is a bijection

slide-73
SLIDE 73

Connection with Completeness

Theorem (SYCO 1)

The assignment of R: n → m to n

ιR

− → UR

ωR

← − − m is a bijection between morphisms in CBΣ and discrete cospans of finite Σ-structures.

slide-74
SLIDE 74

Connection with Completeness

Theorem (SYCO 1)

The assignment of R: n → m to n

ιR

− → UR

ωR

← − − m is a bijection between morphisms in CBΣ and discrete cospans of finite Σ-structures. S ≤ R if and only if there is α: UR → US such that UR n m US

α ιR ιS ωR ωS

slide-75
SLIDE 75

Connection with Completeness

Theorem (SYCO 1)

The assignment of R: n → m to n

ιR

− → UR

ωR

← − − m is a bijection between morphisms in CBΣ and discrete cospans of finite Σ-structures. S ≤ R if and only if there is α: UR → US such that UR n m US

α ιR ιS ωR ωS

Connects semantics to syntax.

slide-76
SLIDE 76

The (·)E construction

Idea: Saturate a Σ-structure with respect to the axioms E.

slide-77
SLIDE 77

The (·)E construction

Idea: Saturate a Σ-structure with respect to the axioms E.

Theorem

There is a functor (·)E : ModCBΣ → ModCBΣ with a natural transformation ζS : S → SE with the following property:

slide-78
SLIDE 78

The (·)E construction

Idea: Saturate a Σ-structure with respect to the axioms E.

Theorem

There is a functor (·)E : ModCBΣ → ModCBΣ with a natural transformation ζS : S → SE with the following property: If A ≤ B is an axiom in E, and (x, y) ∈ S(A) then (ζ(x), ζ(y)) ∈ SE(B).

slide-79
SLIDE 79

The (·)E construction

Idea: Saturate a Σ-structure with respect to the axioms E.

Theorem

There is a functor (·)E : ModCBΣ → ModCBΣ with a natural transformation ζS : S → SE with the following property: If A ≤ B is an axiom in E, and (x, y) ∈ S(A) then (ζ(x), ζ(y)) ∈ SE(B).

Definition

An algebra for the pointed endofunctor (·)E is a Σ-structure S with a morphism α: SE → S such that α ◦ ζS = idS

slide-80
SLIDE 80

The (·)E construction

Idea: Saturate a Σ-structure with respect to the axioms E.

Theorem

There is a functor (·)E : ModCBΣ → ModCBΣ with a natural transformation ζS : S → SE with the following property: If A ≤ B is an axiom in E, and (x, y) ∈ S(A) then (ζ(x), ζ(y)) ∈ SE(B).

Definition

An algebra for the pointed endofunctor (·)E is a Σ-structure S with a morphism α: SE → S such that α ◦ ζS = idS

Lemma

(·)E-algebras are models for CBΣ/E.

slide-81
SLIDE 81

Example

Take Σ = ∅, E =

slide-82
SLIDE 82

Example

Take Σ = ∅, E =

  • , ModCBΣ/E is the category of

non-empty sets.

slide-83
SLIDE 83

Example

Take Σ = ∅, E =

  • , ModCBΣ/E is the category of

non-empty sets.

  • SE = S + 1
slide-84
SLIDE 84

Example

Take Σ = ∅, E =

  • , ModCBΣ/E is the category of

non-empty sets.

  • SE = S + 1
  • (·)E–algebras are pointed sets
slide-85
SLIDE 85

Example

Take Σ = ∅, E =

  • , ModCBΣ/E is the category of

non-empty sets.

  • SE = S + 1
  • (·)E–algebras are pointed sets

The category of (·)E–algebras is better behaved than ModCBΣ/E.

slide-86
SLIDE 86

The free algebra

(·)E -Alg ModCBΣ ModCBΣ/E

U

slide-87
SLIDE 87

The free algebra

(·)E -Alg ModCBΣ ModCBΣ/E

U

slide-88
SLIDE 88

The free algebra

(·)E -Alg ModCBΣ ModCBΣ/E

U

(·)Eω

slide-89
SLIDE 89

The free algebra

(·)E -Alg ModCBΣ ModCBΣ/E

U

(·)Eω

S SE SE2 · · · SEω

slide-90
SLIDE 90

The free algebra

(·)E -Alg ModCBΣ ModCBΣ/E

U

(·)Eω

S SE SE2 · · · SEω

slide-91
SLIDE 91

From semantics to syntax

Theorem

S ≤ R in CBΣ if and only if there is α: UR → US such that UR n m US

α ιR ιS ωR ωS

slide-92
SLIDE 92

From semantics to syntax

Theorem

S ≤ R in CBΣ/E if and only if there is α: (UR)Eω → (US)Eω such that (UR)Eω n m (US)Eω

α

slide-93
SLIDE 93

From semantics to syntax

Proof sketch.

(UR)Eω n m (US)Eω

α

slide-94
SLIDE 94

From semantics to syntax

Proof sketch.

UR n m (US)Eω

α

slide-95
SLIDE 95

From semantics to syntax

Proof sketch.

UR n m (US)Eω

α

  • UR is compact
slide-96
SLIDE 96

From semantics to syntax

Proof sketch.

UR n m (US)Ek

α

  • UR is compact
slide-97
SLIDE 97

From semantics to syntax

Proof sketch.

UR n m (US)Ek

α

  • UR is compact
  • n → (US)Ei ← m correspond to string diagrams Si
slide-98
SLIDE 98

From semantics to syntax

Proof sketch.

UR n m (US)Ek

α

  • UR is compact
  • n → (US)Ei ← m correspond to string diagrams Si
  • Sk ≤ R in CBΣ, hence in CBΣ/E
slide-99
SLIDE 99

From semantics to syntax

Proof sketch.

UR n m (US)Ek

α

  • UR is compact
  • n → (US)Ei ← m correspond to string diagrams Si
  • Sk ≤ R in CBΣ, hence in CBΣ/E
  • Si+1 is obtained by blindly applying all axioms to Si
slide-100
SLIDE 100

From semantics to syntax

Proof sketch.

UR n m (US)Ek

α

  • UR is compact
  • n → (US)Ei ← m correspond to string diagrams Si
  • Sk ≤ R in CBΣ, hence in CBΣ/E
  • Si+1 is obtained by blindly applying all axioms to Si
  • S = S0 ≤ S1 ≤ S2 ≤ · · · ≤ Sk ≤ R in CBΣ/E
slide-101
SLIDE 101

The completeness result

Theorem

Frobenius theories are complete with respect to relational interpretations.