Graphical Conjunctive Queries A completeness theorem for Cartesian bicategories Filippo Bonchi, Jens Seeber , Pawe� l Soboci´ nski IMT School for Advanced Studies Lucca Birmingham - 21 st September, 2018
Contents 1 Cartesian bicategories 2 Conjunctive queries 3 Completeness 4 Summary
String diagrams • A graphical way of reasoning about monoidal categories
String diagrams • A graphical way of reasoning about monoidal categories • 2-dimensional diagrams manipulated according to algebraic rules – hot research topic
String diagrams • A graphical way of reasoning about monoidal categories • 2-dimensional diagrams manipulated according to algebraic rules – hot research topic • ZX calculus (Coecke, Duncan)
String diagrams • A graphical way of reasoning about monoidal categories • 2-dimensional diagrams manipulated according to algebraic rules – hot research topic • ZX calculus (Coecke, Duncan) • Signal flow graphs (Bonchi, Sobocinski, Zanasi)
String diagrams • A graphical way of reasoning about monoidal categories • 2-dimensional diagrams manipulated according to algebraic rules – hot research topic • ZX calculus (Coecke, Duncan) • Signal flow graphs (Bonchi, Sobocinski, Zanasi) • Monoidal computer (Pavlovic)
String diagrams • A graphical way of reasoning about monoidal categories • 2-dimensional diagrams manipulated according to algebraic rules – hot research topic • ZX calculus (Coecke, Duncan) • Signal flow graphs (Bonchi, Sobocinski, Zanasi) • Monoidal computer (Pavlovic) • . . .
Relations with string diagrams The category Rel of sets with relations as morphisms
Relations with string diagrams The category Rel of sets with relations as morphisms • forms a symmetric monoidal category:
Relations with string diagrams The category Rel of sets with relations as morphisms • forms a symmetric monoidal category: R 1 ⊗ R 2 = { (( a, b ) , ( c, d )) | ( a, c ) ∈ R 1 , ( b, d ) ∈ R 2 } a c R 1 b d R 2
Relations with string diagrams The category Rel of sets with relations as morphisms • forms a symmetric monoidal category: R 1 ⊗ R 2 = { (( a, b ) , ( c, d )) | ( a, c ) ∈ R 1 , ( b, d ) ∈ R 2 } a c R 1 b d R 2 • Composition: R 1 ; R 2 = { ( x, z ) | ∃ y : ( x, y ) ∈ R 1 , ( y, z ) ∈ R 2 } y x z R 1 R 2
Relations with string diagrams • Relations are ordered by inclusion
Relations with string diagrams • Relations are ordered by inclusion • Every object:
Relations with string diagrams • Relations are ordered by inclusion • Every object: • Copying and discarding
Relations with string diagrams • Relations are ordered by inclusion • Every object: • Copying and discarding ,
Relations with string diagrams • Relations are ordered by inclusion • Every object: • Copying and discarding , • Equality and “spawn”
Relations with string diagrams • Relations are ordered by inclusion • Every object: • Copying and discarding , • Equality and “spawn” ,
Observations = = = = Comonoid
Observations = = = = Comonoid = = = = Monoid
Observations = = = = Comonoid = = = = Monoid = = Frobenius
Observations = = ≤ = = ≤ Comonoid ≤ ≤ = Adjointness = = = Monoid = = Frobenius
Observations = = ≤ = = ≤ Comonoid ≤ ≤ = Adjointness = R ≤ R = = R ≤ Monoid R Lax Comonoid homomorphism = = Frobenius
Cartesian bicategories Definition (Carboni & Walters) A Cartesian bicategory
Cartesian bicategories Definition (Carboni & Walters) A Cartesian bicategory is a locally ordered
Cartesian bicategories Definition (Carboni & Walters) A Cartesian bicategory is a locally ordered symmetric monoidal category
Cartesian bicategories Definition (Carboni & Walters) A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with
Cartesian bicategories Definition (Carboni & Walters) A Cartesian bicategory is a locally ordered symmetric monoidal category where every object is equipped with • a comonoid
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
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
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.
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
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
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.
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. Idea: Do categorical logic with Cartesian bicategories.
Categorical logic with Cartesian bicategories Definition A model of B (in Rel ) is a morphism M : B → Rel
Categorical logic with Cartesian bicategories Definition A model of B (in Rel ) is a morphism M : B → Rel Problem (Completeness) For morphisms x, y in B such that M ( x ) ⊆ M ( y ) for all models M , is x ≤ y ?
Categorical logic with Cartesian bicategories Definition A model of B (in Rel ) is a morphism M : B → Rel Problem (Completeness) For morphisms x, y in B such that M ( x ) ⊆ M ( y ) for all models M , is x ≤ y ? Not to be confused with “functional completeness”!
The syntactic Cartesian bicategory Signature Σ
The syntactic Cartesian bicategory Signature Σ, each R ∈ Σ equipped with arity and coarity R : n → m .
The syntactic Cartesian bicategory Signature Σ, each R ∈ Σ equipped with arity and coarity R : n → m . Freely generated (syntactic) Cartesian bicategory CB Σ has objects N and morphisms
The syntactic Cartesian bicategory Signature Σ, each R ∈ Σ equipped with arity and coarity R : n → m . Freely generated (syntactic) Cartesian bicategory CB Σ has objects N and morphisms . . . . S 1 � � � . . � . . . Mor( CB Σ ) ::= ǫ . . . � � � � S 1 S 2 . . . . . � � � � . . S 2 . .
The syntactic Cartesian bicategory Signature Σ, each R ∈ Σ equipped with arity and coarity R : n → m . Freely generated (syntactic) Cartesian bicategory CB Σ has objects N and morphisms . . . . S 1 � � � . . � � . . . Mor( CB Σ ) ::= ǫ . . . � � � � � S 1 S 2 . . . . . � � � � � . . S 2 . . � � � � . . . . � � � � R . . � � � �
The syntactic Cartesian bicategory Signature Σ, each R ∈ Σ equipped with arity and coarity R : n → m . Freely generated (syntactic) Cartesian bicategory CB Σ has objects N and morphisms . . . . S 1 � � � . . � � . . . Mor( CB Σ ) ::= ǫ . . . � � � � � S 1 S 2 . . . . . � � � � � . . S 2 . . � � � � . . . . � � � � R . . � � � � modulo the laws of Cartesian bicategories.
Cartesian bicategories and logic CB Σ can emulate regular logic.
Cartesian bicategories and logic CB Σ can emulate regular logic. Example ∃ z 0 , z 1 : R ( x 0 , z 0 ) ∧ R ( x 1 , z 0 ) ∧ R ( x 0 , z 1 ) ∧ R ( x 1 , z 1 ) ,
Cartesian bicategories and logic CB Σ can emulate regular logic. Example ∃ z 0 , z 1 : R ( x 0 , z 0 ) ∧ R ( x 1 , z 0 ) ∧ R ( x 0 , z 1 ) ∧ R ( x 1 , z 1 ) , R R R R
Cartesian bicategories and logic CB Σ can emulate regular logic. Example ∃ z 0 , z 1 : R ( x 0 , z 0 ) ∧ R ( x 1 , z 0 ) ∧ R ( x 0 , z 1 ) ∧ R ( x 1 , z 1 ) , R R R R One-to-one correspondence between string diagrams and regular logic.
Contents 1 Cartesian bicategories 2 Conjunctive queries 3 Completeness 4 Summary
Conjunctive queries • Conjunctive queries: logical formulas made of ∃ , ∧ , ⊤ , = and symbols from the signature Σ.
Recommend
More recommend