New reasoning techniques for monoidal algebra Aleks Kissinger - - PowerPoint PPT Presentation

new reasoning techniques for monoidal algebra
SMART_READER_LITE
LIVE PREVIEW

New reasoning techniques for monoidal algebra Aleks Kissinger - - PowerPoint PPT Presentation

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies New reasoning techniques for monoidal algebra Aleks Kissinger November 4, 2015 Q UANTUM G ROUP Intro Monoidal algebras Diagrammatic reasoning Semantic-driven


slide-1
SLIDE 1

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

New reasoning techniques for monoidal algebra

Aleks Kissinger November 4, 2015

QUANTUM GROUP

slide-2
SLIDE 2

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and rewriting

slide-3
SLIDE 3

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and rewriting

  • Consider a monoid (A, ·, e):

(a · b) · c = a · (b · c) and a · e = a = e · a

slide-4
SLIDE 4

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and rewriting

  • Consider a monoid (A, ·, e):

(a · b) · c = a · (b · c) and a · e = a = e · a

  • Normally, mathematical tools, e.g. automated theorem provers

would use these equations as rewrite rules: (a · b) · c a · (b · c) a · e a e · a a

slide-5
SLIDE 5

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and rewriting

  • Consider a monoid (A, ·, e):

(a · b) · c = a · (b · c) and a · e = a = e · a

  • Normally, mathematical tools, e.g. automated theorem provers

would use these equations as rewrite rules: (a · b) · c a · (b · c) a · e a e · a a

  • It is also possible to write these equations as trees:

= a b c b c a = = a a a

slide-6
SLIDE 6

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and rewriting

  • Since these equations are (left- and right-) linear in the free variables,

we can drop them: = a b c b c a ⇒ =

slide-7
SLIDE 7

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and rewriting

  • Since these equations are (left- and right-) linear in the free variables,

we can drop them: = a b c b c a ⇒ =

  • The role of variables is replaced by the notion that the LHS and RHS

have a shared boundary

slide-8
SLIDE 8

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagram substitution

  • One could apply the rule “(a · b) · c → a · (b · c)” using the usual

“instantiate, match, replace” style: w · ((x · (y · e)) · z) w · (x · ((y · e) · z))

slide-9
SLIDE 9

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagram substitution

  • One could apply the rule “(a · b) · c → a · (b · c)” using the usual

“instantiate, match, replace” style: w · ((x · (y · e)) · z) w · (x · ((y · e) · z))

  • ...or by cutting the LHS directly out of the tree and gluing in the RHS:

w x y z x z w y ⇒ z w x y ⇒

slide-10
SLIDE 10

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagram substitution

  • One could apply the rule “(a · b) · c → a · (b · c)” using the usual

“instantiate, match, replace” style: w · ((x · (y · e)) · z) w · (x · ((y · e) · z))

  • ...or by cutting the LHS directly out of the tree and gluing in the RHS:

w x y z x z w y ⇒ z w x y ⇒

  • This treats inputs and outputs symmetrically
slide-11
SLIDE 11

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and coalgebra

  • We can consider structures with many outputs as well as inputs.
slide-12
SLIDE 12

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and coalgebra

  • We can consider structures with many outputs as well as inputs.
  • Coalgebraic structures: algebraic structures “upside-down”
slide-13
SLIDE 13

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and coalgebra

  • We can consider structures with many outputs as well as inputs.
  • Coalgebraic structures: algebraic structures “upside-down”
  • E.g. comonoids, which consist of a comultiplication operation

and a counit satisfying: = = =

slide-14
SLIDE 14

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebra and coalgebra

  • We can consider structures with many outputs as well as inputs.
  • Coalgebraic structures: algebraic structures “upside-down”
  • E.g. comonoids, which consist of a comultiplication operation

and a counit satisfying: = = =

  • Algebra and coalgebra can interact in many interesting ways:

= = . . .

slide-15
SLIDE 15

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Equational reasoning with diagram substitution

  • As before, we can use graphical identities to perform substitutions,

but on graphs, rather than trees =

slide-16
SLIDE 16

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Equational reasoning with diagram substitution

  • As before, we can use graphical identities to perform substitutions,

but on graphs, rather than trees =

  • For example:

⇒ ⇒

slide-17
SLIDE 17

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Equational reasoning with diagram substitution

  • As before, we can use graphical identities to perform substitutions,

but on graphs, rather than trees =

  • For example:

⇒ ⇒

  • This style of rewriting works for any (co)algebraic structure in a

monoidal category, a.k.a. monoidal algebras.

slide-18
SLIDE 18

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebraic structures in SMCs

  • A (single-sorted) monoidal algebra A consists of an object A and a set
  • f morphisms whose inputs/outputs have type A:

A A A A A A A A

. . . called the generators of A,

slide-19
SLIDE 19

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Algebraic structures in SMCs

  • A (single-sorted) monoidal algebra A consists of an object A and a set
  • f morphisms whose inputs/outputs have type A:

A A A A A A A A

. . . called the generators of A,

  • and some equations:

= = = . . .

slide-20
SLIDE 20

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Frobenius algebras

  • A commutative Frobenius algebra consists of a tuple (A,

, , , ) such that:

  • (A,

, ) forms a commutative monoid: = = = =

  • (A,

, ) forms a commutative comonoid: = = = =

  • The Frobenius law is satisfied:

= =

slide-21
SLIDE 21

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Bialgebras

  • A (bi)commutative bialgebra consists of a tuple (A,

, , , ) such that:

  • (A,

, ) forms a monoid: = = = =

  • (A,

, ) forms a comonoid: = = = =

  • The bialgebra laws are satisfied:

= = =

slide-22
SLIDE 22

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
slide-23
SLIDE 23

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
  • 1. Define a theory category T whose objects are natural numbers (i.e.

arities) and: m ⊗ n := m + n For SMCs, this is called a PROduct category with Permutations (PROP).

slide-24
SLIDE 24

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
  • 1. Define a theory category T whose objects are natural numbers (i.e.

arities) and: m ⊗ n := m + n For SMCs, this is called a PROduct category with Permutations (PROP).

  • 2. Fix another SMC C (e.g. functions, relations, linear maps, etc.).
slide-25
SLIDE 25

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
  • 1. Define a theory category T whose objects are natural numbers (i.e.

arities) and: m ⊗ n := m + n For SMCs, this is called a PROduct category with Permutations (PROP).

  • 2. Fix another SMC C (e.g. functions, relations, linear maps, etc.).
  • 3. T-algebras in C are then symmetric monoidal functors:

− : T → C

slide-26
SLIDE 26

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
  • 1. Define a theory category T whose objects are natural numbers (i.e.

arities) and: m ⊗ n := m + n For SMCs, this is called a PROduct category with Permutations (PROP).

  • 2. Fix another SMC C (e.g. functions, relations, linear maps, etc.).
  • 3. T-algebras in C are then symmetric monoidal functors:

− : T → C

  • PROPs come in two flavours:
slide-27
SLIDE 27

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
  • 1. Define a theory category T whose objects are natural numbers (i.e.

arities) and: m ⊗ n := m + n For SMCs, this is called a PROduct category with Permutations (PROP).

  • 2. Fix another SMC C (e.g. functions, relations, linear maps, etc.).
  • 3. T-algebras in C are then symmetric monoidal functors:

− : T → C

  • PROPs come in two flavours:
  • 1. Syntactic PROPs have as morphisms diagrams of generators, modulo

some set of diagram equations. Deciding equality ⇔ solving a word problem.

slide-28
SLIDE 28

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

PROPs

  • Monoidal algebras can also be defined via functorial semantics:
  • 1. Define a theory category T whose objects are natural numbers (i.e.

arities) and: m ⊗ n := m + n For SMCs, this is called a PROduct category with Permutations (PROP).

  • 2. Fix another SMC C (e.g. functions, relations, linear maps, etc.).
  • 3. T-algebras in C are then symmetric monoidal functors:

− : T → C

  • PROPs come in two flavours:
  • 1. Syntactic PROPs have as morphisms diagrams of generators, modulo

some set of diagram equations. Deciding equality ⇔ solving a word problem.

  • 2. Semantic PROPs have morphisms with a concrete description (functions,

relations, finite matrices, etc.). Equality is usually (easily) decidable.

slide-29
SLIDE 29

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Commutative monoids are functions

  • Let F be the PROP whose morphisms f : m → n are functions

between finite sets: f : {0, . . . , m − 1} → {0, . . . , n − 1}

slide-30
SLIDE 30

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Commutative monoids are functions

  • Let F be the PROP whose morphisms f : m → n are functions

between finite sets: f : {0, . . . , m − 1} → {0, . . . , n − 1}

  • f ⊗ g : m + m′ → n + n′ is given by disjoint union of functions:

(f ⊗ g)(i) =

  • f(i)

if i < m g(i − m) + n if i ≥ m

slide-31
SLIDE 31

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Commutative monoids are functions

  • Let F be the PROP whose morphisms f : m → n are functions

between finite sets: f : {0, . . . , m − 1} → {0, . . . , n − 1}

  • f ⊗ g : m + m′ → n + n′ is given by disjoint union of functions:

(f ⊗ g)(i) =

  • f(i)

if i < m g(i − m) + n if i ≥ m

  • This whole category is generated by identities, swaps, and a single

commutative monoid: := := ∅

slide-32
SLIDE 32

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Commutative monoids are functions

  • Pretty easy to see, just consider n-ary trees of

: ... ... :=

slide-33
SLIDE 33

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Commutative monoids are functions

  • Pretty easy to see, just consider n-ary trees of

: ... ... :=

  • Then, any diagram of

and can be put in normal form, and those normal forms are classified by functions: ↔

slide-34
SLIDE 34

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Commutative monoids are functions

  • Pretty easy to see, just consider n-ary trees of

: ... ... :=

  • Then, any diagram of

and can be put in normal form, and those normal forms are classified by functions: ↔

  • Similarly, Fop is the PROP for cocommutative comonoids.
slide-35
SLIDE 35

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Distributive laws

  • What happens when we combine two monoidal algebras, e.g.

( , ) and ( , )?

slide-36
SLIDE 36

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Distributive laws

  • What happens when we combine two monoidal algebras, e.g.

( , ) and ( , )?

  • ...not much!
slide-37
SLIDE 37

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Distributive laws

  • What happens when we combine two monoidal algebras, e.g.

( , ) and ( , )?

  • ...not much! Until we add a distributive law.
slide-38
SLIDE 38

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Distributive laws

  • What happens when we combine two monoidal algebras, e.g.

( , ) and ( , )?

  • ...not much! Until we add a distributive law.
  • This is a distributive law of monads in the bicategory of monoids in

spans of categories

slide-39
SLIDE 39

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Distributive laws

  • What happens when we combine two monoidal algebras, e.g.

( , ) and ( , )?

  • ...not much! Until we add a distributive law.
  • This is a distributive law of monads in the bicategory of monoids in

spans of categories ...or something like that...

slide-40
SLIDE 40

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Distributive laws

  • More concretely, give us the means to move two pieces of structure

past each other: ⇒

  • So, normal forms for each of the individual theories become normal

forms for the composed theory: ⇒ ⇒

slide-41
SLIDE 41

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Bialgebras are matrices

  • Bialgebras consist of a monoid (

, ), a comonoid ( , ), and a distributive law: = = = =

slide-42
SLIDE 42

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Bialgebras are matrices

  • Bialgebras consist of a monoid (

, ), a comonoid ( , ), and a distributive law: = = = =

  • So, normal forms look like this:
slide-43
SLIDE 43

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Bialgebras are matrices

  • These are classified by matrices over N:

↔      

1 0 1 1 2 0

     

slide-44
SLIDE 44

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Bialgebras are matrices

  • These are classified by matrices over N:

↔      

1 0 1 1 2 0

     

slide-45
SLIDE 45

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Example: Bialgebras are matrices

  • These are classified by matrices over N:

↔      

1 0 1 1 2 0

     

slide-46
SLIDE 46

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Many of these theorems have something in common: the deal with

repreated structures, like trees and cotrees: ... ... := ... ... :=

slide-47
SLIDE 47

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Many of these theorems have something in common: the deal with

repreated structures, like trees and cotrees: ... ... := ... ... :=

  • ...and tree/cotrees, a.k.a. spiders:

... ... := ... ...

slide-48
SLIDE 48

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Individual rules can by meta-rules
slide-49
SLIDE 49

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Individual rules can by meta-rules
  • For example, the rules of commutative monoids can be all be

expressed by letting trees fuse: ... = ... ...

slide-50
SLIDE 50

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Individual rules can by meta-rules
  • For example, the rules of commutative monoids can be all be

expressed by letting trees fuse: ... = ... ...

  • Similarly, the rules of commutative Frobenius algebras are expressed

by letting spiders fuse: ... = ... ... ... ... ...

slide-51
SLIDE 51

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Others are harder to say. For instance, bialgebras have several

meta-rules.

slide-52
SLIDE 52

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Others are harder to say. For instance, bialgebras have several

meta-rules.

  • The most general is the path counting rule, but this has some

intriguing consequences, e.g.: ... ... = ... ... ... ... ... ... where the RHS is a connected bipartite graph.

slide-53
SLIDE 53

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrams with repetition

  • Others are harder to say. For instance, bialgebras have several

meta-rules.

  • The most general is the path counting rule, but this has some

intriguing consequences, e.g.: ... ... = ... ... ... ... ... ... where the RHS is a connected bipartite graph.

  • These three examples have something in common: they rely on your

brain, and some “blah blah” to fill in the “· · · ”

slide-54
SLIDE 54

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrammatic meta-language

  • Can we develop a meta-language for diagrams which is...
slide-55
SLIDE 55

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrammatic meta-language

  • Can we develop a meta-language for diagrams which is...
  • easy enough to use by hand,
slide-56
SLIDE 56

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrammatic meta-language

  • Can we develop a meta-language for diagrams which is...
  • easy enough to use by hand,
  • expressive enough to talk about lots of different kinds of families of

diagrams,

slide-57
SLIDE 57

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrammatic meta-language

  • Can we develop a meta-language for diagrams which is...
  • easy enough to use by hand,
  • expressive enough to talk about lots of different kinds of families of

diagrams,

  • formal enough to produce machine-checkable proofs,
slide-58
SLIDE 58

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrammatic meta-language

  • Can we develop a meta-language for diagrams which is...
  • easy enough to use by hand,
  • expressive enough to talk about lots of different kinds of families of

diagrams,

  • formal enough to produce machine-checkable proofs,
  • and comes with a bag of tricks for building those proofs?
slide-59
SLIDE 59

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Diagrammatic meta-language

  • Can we develop a meta-language for diagrams which is...
  • easy enough to use by hand,
  • expressive enough to talk about lots of different kinds of families of

diagrams,

  • formal enough to produce machine-checkable proofs,
  • and comes with a bag of tricks for building those proofs?
  • One answer is the !-box langauge
slide-60
SLIDE 60

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-boxes

  • We can formalise families of diagrams (with variable-arity

generators) using some graphical syntax: ⇒ ...

slide-61
SLIDE 61

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-boxes

  • We can formalise families of diagrams (with variable-arity

generators) using some graphical syntax: ⇒ ...

  • The blue boxes are called !-boxes. A graph with !-boxes is called a

!-graph. Can be interpreted as a set of concrete graphs: = · · · , , , ,

slide-62
SLIDE 62

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-boxes

  • The diagrams represented by a !-graph are all those obtained by

performing EXPAND and KILL operations on !-boxes

EXPANDb

= ⇒

KILLb

= ⇒

slide-63
SLIDE 63

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-boxes

  • The diagrams represented by a !-graph are all those obtained by

performing EXPAND and KILL operations on !-boxes

EXPANDb

= ⇒

KILLb

= ⇒

  • We can also introduce equations involving !-boxes:

... = ... ... ... ... ... ⇒ =

slide-64
SLIDE 64

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-boxes: matching

  • !-boxes on the LHS are in 1-to-1 correspondence with RHS

=

slide-65
SLIDE 65

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-boxes: matching

  • !-boxes on the LHS are in 1-to-1 correspondence with RHS

=

  • EXPAND and KILL operations applied to both sides simultaneously

to instantiate a rule.

slide-66
SLIDE 66

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to concrete graph rewriting

  • Rewriting concrete diagrams: find an instantiation of the rule such

that the LHS matches the diagram: = ⇒ =

slide-67
SLIDE 67

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to concrete graph rewriting

  • Rewriting concrete diagrams: find an instantiation of the rule such

that the LHS matches the diagram: = ⇒ =

  • Then apply it as usual:

⇒ ⇒

slide-68
SLIDE 68

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to concrete graph rewriting

  • Rewriting concrete diagrams: find an instantiation of the rule such

that the LHS matches the diagram: = ⇒ =

  • Then apply it as usual:

⇒ ⇒

  • Sound and complete, in the absence of “wild” !-boxes
slide-69
SLIDE 69

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • The real power comes from applying !-box rewrite rules on !-graphs

themselves.

slide-70
SLIDE 70

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • The real power comes from applying !-box rewrite rules on !-graphs

themselves.

  • To define a more powerful notion of instantiation, we decompose

EXPAND as two new operations:

COPYb

= ⇒

DROPb′

= ⇒

slide-71
SLIDE 71

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • The real power comes from applying !-box rewrite rules on !-graphs

themselves.

  • To define a more powerful notion of instantiation, we decompose

EXPAND as two new operations:

COPYb

= ⇒

DROPb′

= ⇒

  • These operations are sound w.r.t. concrete instantiation, i.e. they

don’t produce any new concrete instances.

slide-72
SLIDE 72

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • The real power comes from applying !-box rewrite rules on !-graphs

themselves.

  • To define a more powerful notion of instantiation, we decompose

EXPAND as two new operations:

COPYb

= ⇒

DROPb′

= ⇒

  • These operations are sound w.r.t. concrete instantiation, i.e. they

don’t produce any new concrete instances.

  • Now, rewriting !-graphs is just the same as rewriting concrete graphs,

with one extra restriction:

slide-73
SLIDE 73

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • The real power comes from applying !-box rewrite rules on !-graphs

themselves.

  • To define a more powerful notion of instantiation, we decompose

EXPAND as two new operations:

COPYb

= ⇒

DROPb′

= ⇒

  • These operations are sound w.r.t. concrete instantiation, i.e. they

don’t produce any new concrete instances.

  • Now, rewriting !-graphs is just the same as rewriting concrete graphs,

with one extra restriction:

  • If any part of an edge is in a !-box, we must cut through it.
slide-74
SLIDE 74

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • !-graph rewriting: first instantiate:

= ⇒ =

slide-75
SLIDE 75

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

!-graph to !-graph rewriting

  • !-graph rewriting: first instantiate:

= ⇒ =

  • Then apply:

⇒ ⇒

slide-76
SLIDE 76

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Recursive definition

  • Once we have !-boxes around, we can make recursive definitions:

                   t := t := t

slide-77
SLIDE 77

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Recursive definition

  • Once we have !-boxes around, we can make recursive definitions:

                   t := t := t

  • And, as usual, recursive definition goes hand-in-hand with inductive

proof...

slide-78
SLIDE 78

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction principle for !-graphs

  • Let FIXb(G = H) be the same as G = H, but !-box b cannot be

expanded

slide-79
SLIDE 79

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction principle for !-graphs

  • Let FIXb(G = H) be the same as G = H, but !-box b cannot be

expanded

  • Using FIX, we can define induction

KILLb(G = H) FIXb(G = H) = ⇒ EXPANDb(G = H) G = H ind

slide-80
SLIDE 80

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction principle for !-graphs

  • Let FIXb(G = H) be the same as G = H, but !-box b cannot be

expanded

  • Using FIX, we can define induction

KILLb(G = H) FIXb(G = H) = ⇒ EXPANDb(G = H) G = H ind

  • By (normal) induction over proofs involving concrete graphs, we can

prove admissibility.

slide-81
SLIDE 81

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction principle for !-graphs

  • Using !-box induction, we can now prove standard things like:

=

slide-82
SLIDE 82

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction principle for !-graphs

  • Using !-box induction, we can now prove standard things like:

=

  • But this just looks like something in term-land. We can actually prove

much more interesting things like: ... ... = ... ... ... ... ... ... ⇒ =

slide-83
SLIDE 83

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction example

  • First apply induction to get two sub-goals:

= = (empty) = = ⇒ =

slide-84
SLIDE 84

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction example

  • First apply induction to get two sub-goals:

= = (empty) = = ⇒ =

  • The base case is an assumption, step case by rewriting:

= =

i.h.

=

slide-85
SLIDE 85

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction Example

Lemma

=

Proof.

Base:

=

Step:

= =

i.h.

= =

slide-86
SLIDE 86

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Induction Example

Theorem

=

Proof.

Base: (by lemma) Step:

= = =

i.h.

=

slide-87
SLIDE 87

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • Before, we considered algebras with nice, well-understood n.f.’s.
slide-88
SLIDE 88

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • Before, we considered algebras with nice, well-understood n.f.’s.
  • Now, lets kick things up a notch, and study something whose

algebraic behaviour is less well-understood.

slide-89
SLIDE 89

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • Before, we considered algebras with nice, well-understood n.f.’s.
  • Now, lets kick things up a notch, and study something whose

algebraic behaviour is less well-understood.

  • Consider two bi-algebras which interact with each other as Frobenius

algebras:

slide-90
SLIDE 90

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • Before, we considered algebras with nice, well-understood n.f.’s.
  • Now, lets kick things up a notch, and study something whose

algebraic behaviour is less well-understood.

  • Consider two bi-algebras which interact with each other as Frobenius

algebras:

  • This theory is known as IB, or the phase-free fragment of the

ZX-calculus.

slide-91
SLIDE 91

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • Before, we considered algebras with nice, well-understood n.f.’s.
  • Now, lets kick things up a notch, and study something whose

algebraic behaviour is less well-understood.

  • Consider two bi-algebras which interact with each other as Frobenius

algebras:

  • This theory is known as IB, or the phase-free fragment of the

ZX-calculus.

  • Its pops up all over the place: signal-flow networks, Petri nets with

boundaries, quantum circuits...

slide-92
SLIDE 92

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • The simplest example also assumes:

= := = =

slide-93
SLIDE 93

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • The simplest example also assumes:

= := = =

  • The first essentially means we can ignore directions in diagrams, and

the second means these bialgebras are actually Hopf algebras, with trivial antipode.

slide-94
SLIDE 94

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras

  • The simplest example also assumes:

= := = =

  • The first essentially means we can ignore directions in diagrams, and

the second means these bialgebras are actually Hopf algebras, with trivial antipode.

  • Last year, Sobocinski and Bonchi showed (using non-rewriting

techniques) that the PROP for this thing is VecRelZ2, the category of linear relations.

slide-95
SLIDE 95

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras are linear relations

  • A linear relation from V to W is just a subspace of V × W. They are

composed relation-style.

slide-96
SLIDE 96

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras are linear relations

  • A linear relation from V to W is just a subspace of V × W. They are

composed relation-style.

  • In VecRelZ2, maps f : m → n are subspaces of Zm

2 × Zn 2.

slide-97
SLIDE 97

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras are linear relations

  • A linear relation from V to W is just a subspace of V × W. They are

composed relation-style.

  • In VecRelZ2, maps f : m → n are subspaces of Zm

2 × Zn 2.

  • This gives us a natural notion of pseudo-normal form for diagrams:
slide-98
SLIDE 98

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras are linear relations

  • A linear relation from V to W is just a subspace of V × W. They are

composed relation-style.

  • In VecRelZ2, maps f : m → n are subspaces of Zm

2 × Zn 2.

  • This gives us a natural notion of pseudo-normal form for diagrams:
  • white dots are place-holders
slide-99
SLIDE 99

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Interacting bialgebras are linear relations

  • A linear relation from V to W is just a subspace of V × W. They are

composed relation-style.

  • In VecRelZ2, maps f : m → n are subspaces of Zm

2 × Zn 2.

  • This gives us a natural notion of pseudo-normal form for diagrams:
  • white dots are place-holders
  • grey dots are vectors spanning the subspace
slide-100
SLIDE 100

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Lets see how this works...

  • Subspaces can be represented as:

     1 1 1       ,       1 1      

  • The 1’s indicate where edges appear for each vector.
slide-101
SLIDE 101

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Lets see how this works...

  • Subspaces can be represented as:

     1 1 1       ,       1 1      

  • The 1’s indicate where edges appear for each vector.
slide-102
SLIDE 102

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Lets see how this works...

  • Subspaces can be represented as:

     1 1 1       ,       1 1      

  • The 1’s indicate where edges appear for each vector.
slide-103
SLIDE 103

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Lets see how this works...

  • However, this is not unique. We can always add or remove a vector

that is the sum of two other spanning vectors and get the same space: ↔

     1 1 1       ,       1 1       ,       1 1 1      

slide-104
SLIDE 104

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Addition is a !-box rule

  • This ‘addition’ operation can be written as a !-box rule:

=

slide-105
SLIDE 105

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Addition is a !-box rule

  • This ‘addition’ operation can be written as a !-box rule:

=

  • We can also apply this forward then backward to get a ‘rotation’ rule:

=

slide-106
SLIDE 106

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Addition is a !-box rule

  • This ‘addition’ operation can be written as a !-box rule:

=

  • We can also apply this forward then backward to get a ‘rotation’ rule:

=

  • Note this rule decreases the arity of the white dot on the left by 1.
slide-107
SLIDE 107

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

A reduction strategy...

  • This gives a reduction strategy for IB-diagrams.
slide-108
SLIDE 108

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

A reduction strategy...

  • This gives a reduction strategy for IB-diagrams.
  • First, write diagram as a layer of interior white dots, then interior

grey dots, then boundary white dots.

slide-109
SLIDE 109

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

A reduction strategy...

  • This gives a reduction strategy for IB-diagrams.
  • First, write diagram as a layer of interior white dots, then interior

grey dots, then boundary white dots.

  • To get to pseudo-normal form, we just need to get rid of the interior

white dots: ... ... ... ... ... ... ... ⇒ ... ... ... ...

slide-110
SLIDE 110

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

A reduction strategy...

  • We do this by applying a rule to reduce the arity of a single white dot,

until the arity is 1, then copy through: ... ... ... ... ... ... ... ⇒ ... ... ... ... ... ... ... ... ⇒ ... ... ... ... ... ... ...

slide-111
SLIDE 111

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

A reduction strategy...

  • We do this by applying a rule to reduce the arity of a single white dot,

until the arity is 1, then copy through: ... ... ... ... ... ... ... ⇒ ... ... ... ... ... ... ... ... ⇒ ... ... ... ... ... ... ...

  • Time to fire up Quantomatic!
slide-112
SLIDE 112

Intro Monoidal algebras Diagrammatic reasoning Semantic-driven strategies

Thanks!

  • Joint work with Lucas Dixon, Alex Merry, Ross Duncan, Vladimir

Zamdzhiev, David Quick, and others

  • See: quantomatic.github.io