SLIDE 1
Completeness for Cartesian bicategories Relational algebra with - - PowerPoint PPT Presentation
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 2
SLIDE 3
String diagrams
- Idea: Use string diagrams as syntax for relational algebraic
theories
SLIDE 4
String diagrams
- Idea: Use string diagrams as syntax for relational algebraic
theories
- Develop a categorical logic for those theories
SLIDE 5
Relations with string diagrams
The category Rel of sets with relations as morphisms
SLIDE 6
Relations with string diagrams
The category Rel of sets with relations as morphisms
- forms a symmetric monoidal category:
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
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
Relations with string diagrams
- Relations are ordered by inclusion
SLIDE 10
Relations with string diagrams
- Relations are ordered by inclusion
- Every object:
SLIDE 11
Relations with string diagrams
- Relations are ordered by inclusion
- Every object:
- Copying and discarding
SLIDE 12
Relations with string diagrams
- Relations are ordered by inclusion
- Every object:
- Copying and discarding
,
SLIDE 13
Relations with string diagrams
- Relations are ordered by inclusion
- Every object:
- Copying and discarding
,
- Equality and “spawn”
SLIDE 14
Relations with string diagrams
- Relations are ordered by inclusion
- Every object:
- Copying and discarding
,
- Equality and “spawn”
,
SLIDE 15
Observations
Comonoid
= = = =
SLIDE 16
Observations
Comonoid
= = = =
Monoid
= = = =
SLIDE 17
Observations
Comonoid
= = = =
Monoid
= = = =
Frobenius
= =
SLIDE 18
Observations
Comonoid
= = = =
Monoid
= = = =
Frobenius
= =
Adjointness
≤ ≤ ≤ ≤
SLIDE 19
Observations
Comonoid
= = = =
Monoid
= = = =
Frobenius
= =
Adjointness
≤ ≤ ≤ ≤
Lax Comonoid homomorphism
R
≤
R R R
≤
SLIDE 20
Cartesian bicategories
Definition (Carboni & Walters)
A Cartesian bicategory
SLIDE 21
Cartesian bicategories
Definition (Carboni & Walters)
A Cartesian bicategory is a locally ordered
SLIDE 22
Cartesian bicategories
Definition (Carboni & Walters)
A Cartesian bicategory is a locally ordered symmetric monoidal category
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
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
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
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
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
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
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
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
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
Contents
1 Cartesian bicategories 2 Frobenius theories 3 Completeness
SLIDE 33
Frobenius theories
Definition
A Lawvere theory is a finite-product category with objects the natural numbers.
SLIDE 34
Frobenius theories
Definition
A Frobenius theory is a Cartesian bicategory with objects the natural numbers.
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
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
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
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
The syntactic Frobenius theory
Signature Σ
SLIDE 40
The syntactic Frobenius theory
Signature Σ, each σ ∈ Σ equipped with arity and coarity, σ: n → m.
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
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
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
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
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
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
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
Example Frobenius theories
Example
- ≤
R
SLIDE 49
Example Frobenius theories
Example
- ≤
R
ensures that R is reflexive
SLIDE 50
Example Frobenius theories
Example
- ≤
R
ensures that R is reflexive
- R
R ≤ R
SLIDE 51
Example Frobenius theories
Example
- ≤
R
ensures that R is reflexive
- R
R ≤ R
ensures that R is transitive
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
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
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
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
Presentations
Definition
Fix a signature Σ and let E be a set of (well-typed) inequalities
- f morphisms in CBΣ.
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
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
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
Contents
1 Cartesian bicategories 2 Frobenius theories 3 Completeness
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
Σ-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
Σ-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
Σ-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
Σ-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
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
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
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
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
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
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
Connection with Completeness
Theorem (SYCO 1)
The assignment of R: n → m to n
ιR
− → UR
ωR
← − − m is a bijection
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
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
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
The (·)E construction
Idea: Saturate a Σ-structure with respect to the axioms E.
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
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
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
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
Example
Take Σ = ∅, E =
- ≤
SLIDE 82
Example
Take Σ = ∅, E =
- ≤
- , ModCBΣ/E is the category of
non-empty sets.
SLIDE 83
Example
Take Σ = ∅, E =
- ≤
- , ModCBΣ/E is the category of
non-empty sets.
- SE = S + 1
SLIDE 84
Example
Take Σ = ∅, E =
- ≤
- , ModCBΣ/E is the category of
non-empty sets.
- SE = S + 1
- (·)E–algebras are pointed sets
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
The free algebra
(·)E -Alg ModCBΣ ModCBΣ/E
U
SLIDE 87
The free algebra
(·)E -Alg ModCBΣ ModCBΣ/E
U
⊥
SLIDE 88
The free algebra
(·)E -Alg ModCBΣ ModCBΣ/E
U
⊥
(·)Eω
SLIDE 89
The free algebra
(·)E -Alg ModCBΣ ModCBΣ/E
U
⊥
(·)Eω
S SE SE2 · · · SEω
SLIDE 90
The free algebra
(·)E -Alg ModCBΣ ModCBΣ/E
U
⊥
(·)Eω
S SE SE2 · · · SEω
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
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
From semantics to syntax
Proof sketch.
(UR)Eω n m (US)Eω
α
SLIDE 94
From semantics to syntax
Proof sketch.
UR n m (US)Eω
α
SLIDE 95
From semantics to syntax
Proof sketch.
UR n m (US)Eω
α
- UR is compact
SLIDE 96
From semantics to syntax
Proof sketch.
UR n m (US)Ek
α
- UR is compact
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
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
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
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