Cloak and dagger

Chris Heunen

1 / 34 Algebra and coalgebra

Increasing generality:

I with bilinear (co)multiplication

I (Co) in monoidal

I (Co)monad: (co)monoid in category

I (Co)algebras for a (co)monad

Interaction between algebra and coalgebra?

2 / 34 I Purpose of cloak is to obscure presence or movement of dagger

I Dagger, a concealable and silent weapon: dagger categories

I Cloak, worn to hide identity: Frobenius law

Cloak and dagger

I Situation involving secrecy or mystery

3 / 34 I Dagger, a concealable and silent weapon: dagger categories

I Cloak, worn to hide identity: Frobenius law

Cloak and dagger

I Situation involving secrecy or mystery

I Purpose of cloak is to obscure presence or movement of dagger

3 / 34 Cloak and dagger

I Situation involving secrecy or mystery

I Purpose of cloak is to obscure presence or movement of dagger

I Dagger, a concealable and silent weapon: dagger categories

I Cloak, worn to hide identity: Frobenius law

3 / 34 Dagger

4 / 34 † Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: , f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

5 / 34 † −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

5 / 34 † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f

5 / 34 I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

5 / 34 † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections

5 / 34 † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f

5 / 34 † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f

5 / 34 I Unitary representations:[G, Hilb]†

Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

5 / 34 Dagger Method to turn algebra into coalgebra: self-duality Cop ' C

† Dagger: functor Cop → C with A† = A on objects, f †† = f on maps

f f † A −→ BB −→ A

Dagger category: category equipped with dagger

† −1 I Invertible computing: groupoid, f = f † op I Possibilistic computing: sets and relations, R = R

I Partial invertible computing: sets and partial injections † T I Probabilistic computing: doubly stochastic maps, f = f † T I Quantum computing: Hilbert spaces, f = f † † I Second order: dagger functors F (f) = F (f )

I Unitary representations:[G, Hilb]†

5 / 34 † I Evil: demand equality A = A of objects

I Dagger different beast: isomorphism is not the correct notion of ‘sameness’

“Homotopy type theory” Univalent foundations program, 2013

Never bring a knife to a gun fight

I Terminology after (physics) notation (but beats identity-on-objects-involutive-contravariant-functor)

6 / 34 I Dagger category theory different beast: isomorphism is not the correct notion of ‘sameness’

Never bring a knife to a gun fight

I Terminology after (physics) notation (but beats identity-on-objects-involutive-contravariant-functor)

† I Evil: demand equality A = A of objects

“Homotopy type theory” Univalent foundations program, 2013

6 / 34 Never bring a knife to a gun fight

I Terminology after (physics) notation (but beats identity-on-objects-involutive-contravariant-functor)

† I Evil: demand equality A = A of objects

I Dagger category theory different beast: isomorphism is not the correct notion of ‘sameness’

“Homotopy type theory” Univalent foundations program, 2013

6 / 34 −1 † I dagger isomorphism (unitary): f = f

† I dagger monic (isometry): f ◦ f = id

I dagger equalizer / / biproduct

† † † −1 † I monoidal dagger category: (f ⊗ g) = f ⊗ g , α = α

What about ??

Way of the dagger

Motto: “everything in sight ought to cooperate with the dagger”

7 / 34 I dagger equalizer / kernel / biproduct

† † † −1 † I monoidal dagger category: (f ⊗ g) = f ⊗ g , α = α

What about monoids??

Way of the dagger

Motto: “everything in sight ought to cooperate with the dagger”

−1 † I dagger isomorphism (unitary): f = f

† I dagger monic (isometry): f ◦ f = id

7 / 34 † † † −1 † I monoidal dagger category: (f ⊗ g) = f ⊗ g , α = α

What about monoids??

Way of the dagger

Motto: “everything in sight ought to cooperate with the dagger”

−1 † I dagger isomorphism (unitary): f = f

† I dagger monic (isometry): f ◦ f = id

I dagger equalizer / kernel / biproduct

7 / 34 What about monoids??

Way of the dagger

Motto: “everything in sight ought to cooperate with the dagger”

−1 † I dagger isomorphism (unitary): f = f

† I dagger monic (isometry): f ◦ f = id

I dagger equalizer / kernel / biproduct

† † † −1 † I monoidal dagger category: (f ⊗ g) = f ⊗ g , α = α

7 / 34 Way of the dagger

Motto: “everything in sight ought to cooperate with the dagger”

−1 † I dagger isomorphism (unitary): f = f

† I dagger monic (isometry): f ◦ f = id

I dagger equalizer / kernel / biproduct

† † † −1 † I monoidal dagger category: (f ⊗ g) = f ⊗ g , α = α

What about monoids??

7 / 34 Cloaks are worn

8 / 34 I algebra A with finitely many minimal right ideals

I algebra A with nondegenerate A ⊗ A → k with [ab, c] = [a, bc]

I algebra A with comultiplication δ : A → A ⊗ A satisfying

(id ⊗ µ) ◦ (δ ⊗ id) = (µ ⊗ id) ◦ (id ⊗ δ)

I algebra A with equivalent left and right regular representations

“Theorie der hyperkomplexen Gr¨oßen I” Sitzungsberichte der Preussischen Akademie der Wissenschaften 504–537, 1903

“On Frobeniusean algebras II” Annals of 42(1):1–21, 1941

Frobenius algebra Many definitions over a field k:

I algebra A with functional A → k, kernel without left ideals

9 / 34 I algebra A with nondegenerate A ⊗ A → k with [ab, c] = [a, bc]

I algebra A with comultiplication δ : A → A ⊗ A satisfying

(id ⊗ µ) ◦ (δ ⊗ id) = (µ ⊗ id) ◦ (id ⊗ δ)

I algebra A with equivalent left and right regular representations

“Theorie der hyperkomplexen Gr¨oßen I” Sitzungsberichte der Preussischen Akademie der Wissenschaften 504–537, 1903

“On Frobeniusean algebras II” Annals of Mathematics 42(1):1–21, 1941

Frobenius algebra Many definitions over a field k:

I algebra A with functional A → k, kernel without left ideals

I algebra A with finitely many minimal right ideals

9 / 34 I algebra A with comultiplication δ : A → A ⊗ A satisfying

(id ⊗ µ) ◦ (δ ⊗ id) = (µ ⊗ id) ◦ (id ⊗ δ)

I algebra A with equivalent left and right regular representations

“Theorie der hyperkomplexen Gr¨oßen I” Sitzungsberichte der Preussischen Akademie der Wissenschaften 504–537, 1903

“On Frobeniusean algebras II” Annals of Mathematics 42(1):1–21, 1941

Frobenius algebra Many definitions over a field k:

I algebra A with functional A → k, kernel without left ideals

I algebra A with finitely many minimal right ideals

I algebra A with nondegenerate A ⊗ A → k with [ab, c] = [a, bc]

9 / 34 I algebra A with equivalent left and right regular representations

“Theorie der hyperkomplexen Gr¨oßen I” Sitzungsberichte der Preussischen Akademie der Wissenschaften 504–537, 1903

“On Frobeniusean algebras II” Annals of Mathematics 42(1):1–21, 1941

Frobenius algebra Many definitions over a field k:

I algebra A with functional A → k, kernel without left ideals

I algebra A with finitely many minimal right ideals

I algebra A with nondegenerate A ⊗ A → k with [ab, c] = [a, bc]

I algebra A with comultiplication δ : A → A ⊗ A satisfying

(id ⊗ µ) ◦ (δ ⊗ id) = (µ ⊗ id) ◦ (id ⊗ δ)

9 / 34 Frobenius algebra Many definitions over a field k:

I algebra A with functional A → k, kernel without left ideals

I algebra A with finitely many minimal right ideals

I algebra A with nondegenerate A ⊗ A → k with [ab, c] = [a, bc]

I algebra A with comultiplication δ : A → A ⊗ A satisfying

(id ⊗ µ) ◦ (δ ⊗ id) = (µ ⊗ id) ◦ (id ⊗ δ)

I algebra A with equivalent left and right regular representations

“Theorie der hyperkomplexen Gr¨oßen I” Sitzungsberichte der Preussischen Akademie der Wissenschaften 504–537, 1903

“On Frobeniusean algebras II” Annals of Mathematics 42(1):1–21, 1941

9 / 34 P −1 I comultiplication g 7→ h gh ⊗ h P −1 I both sides of Frobenius law evaluate to k gk ⊗ kh on g ⊗ h

So Frobenius algebra incorporates finite

Frobenius law in algebra

Any finite group G induces Frobenius group algebra A:

I A has orthonormal basis {g ∈ G}

I multiplication g ⊗ h 7→ gh

I unit e

10 / 34 Frobenius law in algebra

Any finite group G induces Frobenius group algebra A:

I A has orthonormal basis {g ∈ G}

I multiplication g ⊗ h 7→ gh

I unit e

P −1 I comultiplication g 7→ h gh ⊗ h P −1 I both sides of Frobenius law evaluate to k gk ⊗ kh on g ⊗ h

So Frobenius algebra incorporates finite group representation theory

10 / 34 I Frobenius property is independent of base field k!

I Extension of scalars: if l extends k, then A Frobenius over k iff l ⊗k A Frobenius over l

I Restriction of scalars: if l extends k, then A Frobenius over l iff A Frobenius over k

Frobenius law in algebra

Frobenius algebras are wonderful:

I left and right Artinian

I left and right self-injective

11 / 34 Frobenius law in algebra

Frobenius algebras are wonderful:

I left and right Artinian

I left and right self-injective

I Frobenius property is independent of base field k!

I Extension of scalars: if l extends k, then A Frobenius over k iff l ⊗k A Frobenius over l

I Restriction of scalars: if l extends k, then A Frobenius over l iff A Frobenius over k

11 / 34 I Coding theory:

I Hamming weight of linear code and dual code related I code isomorphism that preserves Hamming weight is monomial

I Geometry: cohomology rings of compact oriented are Frobenius

“Combinatorial properties of elementary abelian groups” Radcliffe College, Cambridge, 1962

Frobenius law in mathematics

I : commutative Frobenius algebras are Gorenstein

“Modular elliptic curves and Fermat’s last theorem” Annals of Mathematics 142(3):443–551, 1995

12 / 34 I Geometry: cohomology rings of compact oriented manifolds are Frobenius

Frobenius law in mathematics

I Number theory: commutative Frobenius algebras are Gorenstein

I Coding theory:

I Hamming weight of linear code and dual code related I code isomorphism that preserves Hamming weight is monomial

“Modular elliptic curves and Fermat’s last theorem” Annals of Mathematics 142(3):443–551, 1995

“Combinatorial properties of elementary abelian groups” Radcliffe College, Cambridge, 1962

12 / 34 Frobenius law in mathematics

I Number theory: commutative Frobenius algebras are Gorenstein

I Coding theory:

I Hamming weight of linear code and dual code related I code isomorphism that preserves Hamming weight is monomial

I Geometry: cohomology rings of compact oriented manifolds are Frobenius

“Modular elliptic curves and Fermat’s last theorem” Annals of Mathematics 142(3):443–551, 1995

“Combinatorial properties of elementary abelian groups” Radcliffe College, Cambridge, 1962

12 / 34 Computes invariants via Pachner moves:

⇐⇒

I Topological quantum field theory depends only on topology 2d TQFTs ' commutative Frobenius algebras

I RT construction turns modular tensor category into 3d TQFT

“A geometric approach to two-dimensional conformal field theory” University of Utrecht, 1989

“Invariants of 3-manifolds via link polynomials and quantum groups” Inventiones Mathematicae 103(3):547–597, 1991

“P. L. homeomorphic manifolds are equivalent by elementary shellings” European Journal of 12(2):129–145, 1991

Frobenius law in physics Quantum field theory: replace particles by fields; state space varies over space-time

13 / 34 Computes manifold invariants via Pachner moves:

⇐⇒

I RT construction turns modular tensor category into 3d TQFT

“Invariants of 3-manifolds via link polynomials and quantum groups” Inventiones Mathematicae 103(3):547–597, 1991

“P. L. homeomorphic manifolds are equivalent by elementary shellings” European Journal of Combinatorics 12(2):129–145, 1991

Frobenius law in physics Quantum field theory: replace particles by fields; state space varies over space-time

I Topological quantum field theory depends only on topology 2d TQFTs ' commutative Frobenius algebras

“A geometric approach to two-dimensional conformal field theory” University of Utrecht, 1989

13 / 34 Computes manifold invariants via Pachner moves:

⇐⇒

“P. L. homeomorphic manifolds are equivalent by elementary shellings” European Journal of Combinatorics 12(2):129–145, 1991

Frobenius law in physics Quantum field theory: replace particles by fields; state space varies over space-time

I Topological quantum field theory depends only on topology 2d TQFTs ' commutative Frobenius algebras

I RT construction turns modular tensor category into 3d TQFT

“A geometric approach to two-dimensional conformal field theory” University of Utrecht, 1989

“Invariants of 3-manifolds via link polynomials and quantum groups” Inventiones Mathematicae 103(3):547–597, 1991

13 / 34 Frobenius law in physics Quantum field theory: replace particles by fields; state space varies over space-time

I Topological quantum field theory depends only on topology 2d TQFTs ' commutative Frobenius algebras

I RT construction turns modular tensor category into 3d TQFT Computes manifold invariants via Pachner moves:

⇐⇒

“A geometric approach to two-dimensional conformal field theory” University of Utrecht, 1989

“Invariants of 3-manifolds via link polynomials and quantum groups” Inventiones Mathematicae 103(3):547–597, 1991

“P. L. homeomorphic manifolds are equivalent by elementary shellings” European Journal of Combinatorics 12(2):129–145, 1991 13 / 34 Cloak

14 / 34 Equivalently: a monoid (A, µ, η) such that µ† is a homomorphism of (A, µ, η)-modules (in braided )

It can be:

I commutative: µ ◦ β = µ (in braided monoidal category) † † I symmetric: η ◦ µ ◦ β = η ◦ µ (in braided monoidal category) † I special / strongly separable: µ ◦ µ = id † I normalizable: µ ◦ µ invertible, positive, and central

Dagger Frobenius structures: definition In a dagger monoidal category: a dagger Frobenius structure consists of an object A and maps µ: A ⊗ A → A and η : I → A satisfying

(µ ⊗ id) ◦ µ = (id ⊗ µ) ◦ µ µ ⊗ (id ⊗ η) = id = µ ⊗ (η ⊗ id) (µ ⊗ id) ◦ (id ⊗ µ†) = (id ⊗ µ) ◦ (µ† ⊗ id)

15 / 34 It can be:

I commutative: µ ◦ β = µ (in braided monoidal category) † † I symmetric: η ◦ µ ◦ β = η ◦ µ (in braided monoidal category) † I special / strongly separable: µ ◦ µ = id † I normalizable: µ ◦ µ invertible, positive, and central

Dagger Frobenius structures: definition In a dagger monoidal category: a dagger Frobenius structure consists of an object A and maps µ: A ⊗ A → A and η : I → A satisfying

(µ ⊗ id) ◦ µ = (id ⊗ µ) ◦ µ µ ⊗ (id ⊗ η) = id = µ ⊗ (η ⊗ id) (µ ⊗ id) ◦ (id ⊗ µ†) = (id ⊗ µ) ◦ (µ† ⊗ id)

Equivalently: a monoid (A, µ, η) such that µ† is a homomorphism of (A, µ, η)-modules (in braided monoidal category)

15 / 34 Dagger Frobenius structures: definition In a dagger monoidal category: a dagger Frobenius structure consists of an object A and maps µ: A ⊗ A → A and η : I → A satisfying

(µ ⊗ id) ◦ µ = (id ⊗ µ) ◦ µ µ ⊗ (id ⊗ η) = id = µ ⊗ (η ⊗ id) (µ ⊗ id) ◦ (id ⊗ µ†) = (id ⊗ µ) ◦ (µ† ⊗ id)

Equivalently: a monoid (A, µ, η) such that µ† is a homomorphism of (A, µ, η)-modules (in braided monoidal category)

It can be:

I commutative: µ ◦ β = µ (in braided monoidal category) † † I symmetric: η ◦ µ ◦ β = η ◦ µ (in braided monoidal category) † I special / strongly separable: µ ◦ µ = id † I normalizable: µ ◦ µ invertible, positive, and central

15 / 34 “Frobenius algebras and 2D topological quantum field theories” Cambridge University Press, 2003

is free symmetric monoidal category on a Frobenius algebra

(2d TQFT is just a monoidal functor (Cob, +) → (FHilb, ⊗))

Frobenius algebra example: Category of cobordisms:

I objects are 1-dimensional compact manifolds

I arrows are 2-dimensional compact manifolds with boundary

=

16 / 34 (2d TQFT is just a monoidal functor (Cob, +) → (FHilb, ⊗))

“Frobenius algebras and 2D topological quantum field theories” Cambridge University Press, 2003

Frobenius algebra example: cobordisms Category of cobordisms:

I objects are 1-dimensional compact manifolds

I arrows are 2-dimensional compact manifolds with boundary

=

is free symmetric monoidal category on a Frobenius algebra

16 / 34 Frobenius algebra example: cobordisms Category of cobordisms:

I objects are 1-dimensional compact manifolds

I arrows are 2-dimensional compact manifolds with boundary

=

is free symmetric monoidal category on a Frobenius algebra

(2d TQFT is just a monoidal functor (Cob, +) → (FHilb, ⊗))

“Frobenius algebras and 2D topological quantum field theories” Cambridge University Press, 2003

16 / 34 I direct sums of Frobenius structures are Frobenius structures, so L all finite-dimensional C*-algebras i Mni are Frobenius

I conversely: all normalizable Frobenius structures are C* L I in particular: commutative Frobenius structures are i M1 that is, choice of orthonormal basis

“Categorical formulation of finite-dimensional quantum algebras” Communications in Mathematical Physics 304(3):765–796, 2011

“A new description of orthogonal bases” Mathematical Structures in Computer Science 23(3):555–567, 2013

Frobenius algebra example: C*-algebras In the category of finite-dimensional Hilbert spaces:

I Mn is a monoid under µ: eij ⊗ ekl 7→ δjkeil † P I µ : eij 7→ k eik ⊗ ekj satisfies Frobenius law: X eij ⊗ ekl 7→ δjk eim ⊗ eml m

17 / 34 I conversely: all normalizable Frobenius structures are C* L I in particular: commutative Frobenius structures are i M1 that is, choice of orthonormal basis

“Categorical formulation of finite-dimensional quantum algebras” Communications in Mathematical Physics 304(3):765–796, 2011

“A new description of orthogonal bases” Mathematical Structures in Computer Science 23(3):555–567, 2013

Frobenius algebra example: C*-algebras In the category of finite-dimensional Hilbert spaces:

I Mn is a monoid under µ: eij ⊗ ekl 7→ δjkeil † P I µ : eij 7→ k eik ⊗ ekj satisfies Frobenius law: X eij ⊗ ekl 7→ δjk eim ⊗ eml m

I direct sums of Frobenius structures are Frobenius structures, so L all finite-dimensional C*-algebras i Mni are Frobenius

17 / 34 L I in particular: commutative Frobenius structures are i M1 that is, choice of orthonormal basis

“A new description of orthogonal bases” Mathematical Structures in Computer Science 23(3):555–567, 2013

Frobenius algebra example: C*-algebras In the category of finite-dimensional Hilbert spaces:

I Mn is a monoid under µ: eij ⊗ ekl 7→ δjkeil † P I µ : eij 7→ k eik ⊗ ekj satisfies Frobenius law: X eij ⊗ ekl 7→ δjk eim ⊗ eml m

I direct sums of Frobenius structures are Frobenius structures, so L all finite-dimensional C*-algebras i Mni are Frobenius

I conversely: all normalizable Frobenius structures are C*

“Categorical formulation of finite-dimensional quantum algebras” Communications in Mathematical Physics 304(3):765–796, 2011

17 / 34 Frobenius algebra example: C*-algebras In the category of finite-dimensional Hilbert spaces:

I Mn is a monoid under µ: eij ⊗ ekl 7→ δjkeil † P I µ : eij 7→ k eik ⊗ ekj satisfies Frobenius law: X eij ⊗ ekl 7→ δjk eim ⊗ eml m

I direct sums of Frobenius structures are Frobenius structures, so L all finite-dimensional C*-algebras i Mni are Frobenius

I conversely: all normalizable Frobenius structures are C* L I in particular: commutative Frobenius structures are i M1 that is, choice of orthonormal basis

“Categorical formulation of finite-dimensional quantum algebras” Communications in Mathematical Physics 304(3):765–796, 2011

“A new description of orthogonal bases” Mathematical Structures in Computer Science 23(3):555–567, 2013

17 / 34 † −1 I µ = {(h, (h ◦ f, f)) | cod(h) = cod(f)} satisfies Frobenius law

I conversely: all dagger Frobenius structures are

Frobenius algebra example: groupoids

In the category of sets and relations:

I set of groupoid G is monoid under µ = {((g, f), g ◦ f) | dom(g) = cod(f)}

η = {idx | x object of G}

“Relative Frobenius algebras are groupoids” Journal of Pure and Applied Algebra 217:114–124, 2013

“Quantum and classical structures in nondeterministic computation” Quantum Interaction, LNAI 5494:143–157, 2009

18 / 34 I conversely: all dagger Frobenius structures are groupoids

Frobenius algebra example: groupoids

In the category of sets and relations:

I Morphism set of groupoid G is monoid under µ = {((g, f), g ◦ f) | dom(g) = cod(f)}

η = {idx | x object of G}

† −1 I µ = {(h, (h ◦ f, f)) | cod(h) = cod(f)} satisfies Frobenius law

“Relative Frobenius algebras are groupoids” Journal of Pure and Applied Algebra 217:114–124, 2013

“Quantum and classical structures in nondeterministic computation” Quantum Interaction, LNAI 5494:143–157, 2009

18 / 34 Frobenius algebra example: groupoids

In the category of sets and relations:

I Morphism set of groupoid G is monoid under µ = {((g, f), g ◦ f) | dom(g) = cod(f)}

η = {idx | x object of G}

† −1 I µ = {(h, (h ◦ f, f)) | cod(h) = cod(f)} satisfies Frobenius law

I conversely: all dagger Frobenius structures are groupoids

“Relative Frobenius algebras are groupoids” Journal of Pure and Applied Algebra 217:114–124, 2013

“Quantum and classical structures in nondeterministic computation” Quantum Interaction, LNAI 5494:143–157, 2009

18 / 34 Cloak hides dagger

19 / 34 B

I f : A → B depicted as boxes f A I Composition: stack boxes vertically

I : stack boxes horizontally

I Dagger: turn box upside-down

Coherence isomorphisms melt away

Graphical calculus “Notation which is useful in private must be given a public value and that it should be provided with a firm theoretical foundation”

“The geometry of tensor calculus I” Advances in Mathematics 88(1):55–112, 1991

20 / 34 Coherence isomorphisms melt away

Graphical calculus “Notation which is useful in private must be given a public value and that it should be provided with a firm theoretical foundation”

B

I Morphisms f : A → B depicted as boxes f A I Composition: stack boxes vertically

I Tensor product: stack boxes horizontally

I Dagger: turn box upside-down

“The geometry of tensor calculus I” Advances in Mathematics 88(1):55–112, 1991

20 / 34 Graphical calculus “Notation which is useful in private must be given a public value and that it should be provided with a firm theoretical foundation”

B

I Morphisms f : A → B depicted as boxes f A I Composition: stack boxes vertically

I Tensor product: stack boxes horizontally

I Dagger: turn box upside-down

Coherence isomorphisms melt away

“The geometry of tensor calculus I” Advances in Mathematics 88(1):55–112, 1991

20 / 34 Complete: diagrams isotopic iff equal in category of Hilbert spaces

“Finite-dimensional Hilbert spaces are complete for dagger compact categories” Logical Methods in Computer Science 8(3:6):1–12, 2012

Graphical calculus

Sound: isotopic diagrams represent equal morphisms

k k g h h = (k ⊗ id) ◦ (g ⊗ h†) ◦ f = g f f

“A survey of graphical languages for monoidal categories” New Structures for Physics, LNP 813:289–355, 2011

21 / 34 Graphical calculus

Sound: isotopic diagrams represent equal morphisms

k k g h h = (k ⊗ id) ◦ (g ⊗ h†) ◦ f = g f f

Complete: diagrams isotopic iff equal in category of Hilbert spaces

“A survey of graphical languages for monoidal categories” New Structures for Physics, LNP 813:289–355, 2011

“Finite-dimensional Hilbert spaces are complete for dagger compact categories” Logical Methods in Computer Science 8(3:6):1–12, 2012 21 / 34 Frobenius law becomes:

=

“Ordinal sums and equational doctrines” Seminar on triples and categorical homology theory, LNCS 80:141–155, 1966

“Two-dimensional topological quantum field theories and Frobenius algebras” Journal of Knot Theory and its Ramifications 5:569–587, 1996

Frobenius law graphically Instead of box, will draw for multiplication A ⊗ A → A of monoid.

= = =

22 / 34 Frobenius law graphically Instead of box, will draw for multiplication A ⊗ A → A of monoid.

= = =

Frobenius law becomes:

=

“Ordinal sums and equational doctrines” Seminar on triples and categorical homology theory, LNCS 80:141–155, 1966

“Two-dimensional topological quantum field theories and Frobenius algebras” Journal of Knot Theory and its Ramifications 5:569–587, 1996

22 / 34 In particular:

= =

Spider theorem Any connected diagram built from the components of a special ( = ) Frobenius algebra equals the following normal form:

23 / 34 Spider theorem Any connected diagram built from the components of a special ( = ) Frobenius algebra equals the following normal form:

In particular:

= =

23 / 34 Hence any Frobenius structure is self-dual

A

A∗ =

A

Dual objects

Note:

= =

24 / 34 Dual objects

Note:

= =

Hence any Frobenius structure is self-dual

A

A∗ =

A

24 / 34 † I on Mn is precisely a 7→ a In category of sets and relations:

I Canonical duals: : 1 → X × X given by {(∗, (x, x)) | x ∈ X} −1 I Involution on groupoid is precisely {(g, g ) | g ∈ G}

I Decorated graphical calculus:

h ◦ g f h ◦ g f f idx f idx

−1 (h ◦ g) ◦ f f −1 g = = h ◦ (g ◦ f) = f

h g ◦ f h g ◦ f idy f idy f

Dual objects: examples In category of finite-dimensional Hilbert spaces: ∗ P ∗ I Canonical duals: : C → H ⊗ H given by 1 7→ i ei ⊗ ei

25 / 34 In category of sets and relations:

I Canonical duals: : 1 → X × X given by {(∗, (x, x)) | x ∈ X} −1 I Involution on groupoid is precisely {(g, g ) | g ∈ G}

I Decorated graphical calculus:

h ◦ g f h ◦ g f f idx f idx

−1 (h ◦ g) ◦ f f −1 g = = h ◦ (g ◦ f) = f

h g ◦ f h g ◦ f idy f idy f

Dual objects: examples In category of finite-dimensional Hilbert spaces: ∗ P ∗ I Canonical duals: : C → H ⊗ H given by 1 7→ i ei ⊗ ei

† I Involution on Mn is precisely a 7→ a

25 / 34 −1 I Involution on groupoid is precisely {(g, g ) | g ∈ G}

I Decorated graphical calculus:

h ◦ g f h ◦ g f f idx f idx

−1 (h ◦ g) ◦ f f −1 g = = h ◦ (g ◦ f) = f

h g ◦ f h g ◦ f idy f idy f

Dual objects: examples In category of finite-dimensional Hilbert spaces: ∗ P ∗ I Canonical duals: : C → H ⊗ H given by 1 7→ i ei ⊗ ei

† I Involution on Mn is precisely a 7→ a In category of sets and relations:

I Canonical duals: : 1 → X × X given by {(∗, (x, x)) | x ∈ X}

25 / 34 I Decorated graphical calculus:

h ◦ g f h ◦ g f f idx f idx

−1 (h ◦ g) ◦ f f −1 g = = h ◦ (g ◦ f) = f

h g ◦ f h g ◦ f idy f idy f

Dual objects: examples In category of finite-dimensional Hilbert spaces: ∗ P ∗ I Canonical duals: : C → H ⊗ H given by 1 7→ i ei ⊗ ei

† I Involution on Mn is precisely a 7→ a In category of sets and relations:

I Canonical duals: : 1 → X × X given by {(∗, (x, x)) | x ∈ X} −1 I Involution on groupoid is precisely {(g, g ) | g ∈ G}

25 / 34 Dual objects: examples In category of finite-dimensional Hilbert spaces: ∗ P ∗ I Canonical duals: : C → H ⊗ H given by 1 7→ i ei ⊗ ei

† I Involution on Mn is precisely a 7→ a In category of sets and relations:

I Canonical duals: : 1 → X × X given by {(∗, (x, x)) | x ∈ X} −1 I Involution on groupoid is precisely {(g, g ) | g ∈ G}

I Decorated graphical calculus:

h ◦ g f h ◦ g f f idx f idx

−1 (h ◦ g) ◦ f f −1 g = = h ◦ (g ◦ f) = f

h g ◦ f h g ◦ f idy f idy f

25 / 34 I is embedding: = =

I preserves multiplication: = =

I preserves unit: = =

“On the theory of groups as depending on the equation θn = 1” Philosophical Magazine 7(42):40–47, 1854

: one size fits all

Any monoid (A, ) embeds into A∗ ⊗ A by e :=

Pairs of pants If an object A has a dual, then A∗ ⊗ A is a monoid A∗ ⊗ A

A∗ ⊗ A := :=

A∗ ⊗ A A∗ ⊗ A

26 / 34 I is embedding: = =

I preserves multiplication: = =

I preserves unit: = =

Pairs of pants: one size fits all If an object A has a dual, then A∗ ⊗ A is a monoid A∗ ⊗ A

A∗ ⊗ A := :=

A∗ ⊗ A A∗ ⊗ A

Any monoid (A, ) embeds into A∗ ⊗ A by e :=

“On the theory of groups as depending on the equation θn = 1” Philosophical Magazine 7(42):40–47, 1854 26 / 34 I preserves multiplication: = =

I preserves unit: = =

Pairs of pants: one size fits all If an object A has a dual, then A∗ ⊗ A is a monoid A∗ ⊗ A

A∗ ⊗ A := :=

A∗ ⊗ A A∗ ⊗ A

Any monoid (A, ) embeds into A∗ ⊗ A by e :=

I is embedding: = =

“On the theory of groups as depending on the equation θn = 1” Philosophical Magazine 7(42):40–47, 1854 26 / 34 I preserves unit: = =

Pairs of pants: one size fits all If an object A has a dual, then A∗ ⊗ A is a monoid A∗ ⊗ A

A∗ ⊗ A := :=

A∗ ⊗ A A∗ ⊗ A

Any monoid (A, ) embeds into A∗ ⊗ A by e :=

I is embedding: = =

I preserves multiplication: = =

“On the theory of groups as depending on the equation θn = 1” Philosophical Magazine 7(42):40–47, 1854 26 / 34 Pairs of pants: one size fits all If an object A has a dual, then A∗ ⊗ A is a monoid A∗ ⊗ A

A∗ ⊗ A := :=

A∗ ⊗ A A∗ ⊗ A

Any monoid (A, ) embeds into A∗ ⊗ A by e :=

I is embedding: = =

I preserves multiplication: = =

I preserves unit: = =

“On the theory of groups as depending on the equation θn = 1” Philosophical Magazine 7(42):40–47, 1854 26 / 34 Theorem in a monoidal dagger category: a monoid is Frobenius ⇔ its Cayley embedding is involutive

e e = = = i

“Reversible monadic computing” MFPS 2015

“Geometry of abstraction in quantum computation” Dagstuhl Seminar Proceedings 09311, 2010

Why the Frobenius law? Maps I → A∗ ⊗ A correspond to maps A → A. So in presence of dagger, A∗ ⊗ A is involutive monoid!

∗ A A∗

i :=

A A

27 / 34 e e = = = i

Why the Frobenius law? Maps I → A∗ ⊗ A correspond to maps A → A. So in presence of dagger, A∗ ⊗ A is involutive monoid!

∗ A A∗

i :=

A A

Theorem in a monoidal dagger category: a monoid is Frobenius ⇔ its Cayley embedding is involutive

“Reversible monadic computing” MFPS 2015

“Geometry of abstraction in quantum computation” Dagstuhl Seminar Proceedings 09311, 2010 27 / 34 Why the Frobenius law? Maps I → A∗ ⊗ A correspond to maps A → A. So in presence of dagger, A∗ ⊗ A is involutive monoid!

∗ A A∗

i :=

A A

Theorem in a monoidal dagger category: a monoid is Frobenius ⇔ its Cayley embedding is involutive

e e = = = i

“Reversible monadic computing” MFPS 2015

“Geometry of abstraction in quantum computation” Dagstuhl Seminar Proceedings 09311, 2010 27 / 34 Dagger likes cloak

28 / 34 dagger

Frobenius Frobenius † Frobenius unitary

Frobenius Frobenius

Frobenius monads

I Let C be a monoidal category

I A monad is a monoid in [C, C]

I A monad T on a C is strong when equipped with a natural transformation A ⊗ T (B) → T (A ⊗ B)

I Theorem: There is an adjunction between monoids in C and strong monads on C.

A 7→ − ⊗ A T (I) ← T [

29 / 34 Frobenius monads

I Let C be a monoidal dagger category

I A Frobenius monad is a Frobenius monoid in [C, C]†

I A Frobenius monad T on a C is strong when equipped with a unitary natural transformation A ⊗ T (B) → T (A ⊗ B)

I Theorem: There is an equivalence between Frobenius monoids in C and strong Frobenius monads on C.

A 7→ − ⊗ A T (I) ← T [

29 / 34 dagger dagger Frobenius

F

Conversely, if a monad on C is Frobenius then it is of this form.

Algebras

Let C and D be categories, F : C → D and G: D → C be functors with F a G. Then GF is monad with:

Kl(GF ) D EM(GF ) a a a C

“Frobenius monads and pseudomonoids” Journal of Mathematical Physics 45:3930-3940, 2004

“Frobenius algebras and ambidextrous adjunctions” Theory and Applications of Categories 16:84–122, 2006

30 / 34 Conversely, if a monad on C is Frobenius then it is of this form.

Algebras

Let C and D be dagger categories, F : C → D and G: D → C be dagger functors with F a G. Then GF is Frobenius monad with:

Kl(GF ) D F EM(GF ) a a a C

“Frobenius monads and pseudomonoids” Journal of Mathematical Physics 45:3930-3940, 2004

“Frobenius algebras and ambidextrous adjunctions” Theory and Applications of Categories 16:84–122, 2006

30 / 34 Algebras

Let C and D be dagger categories, F : C → D and G: D → C be dagger functors with F a G. Then GF is Frobenius monad with:

Kl(GF ) D F EM(GF ) a a a C

Conversely, if a monad on C is Frobenius then it is of this form.

“Frobenius monads and pseudomonoids” Journal of Mathematical Physics 45:3930-3940, 2004

“Frobenius algebras and ambidextrous adjunctions” Theory and Applications of Categories 16:84–122, 2006

30 / 34 They form the largest subcategory of EM(T ) that inherits dagger.

Frobenius-Eilenberg-Moore algebras A Frobenius-Eilenberg-Moore algebra for a Frobenius monad T is an Eilenberg-Moore algebra (A, a) with

T (a)† T (A) T 2(A) µ† µ T 2(A) T (A) T (a)

For T = − ⊗ A, looks like:

=

31 / 34 Frobenius-Eilenberg-Moore algebras A Frobenius-Eilenberg-Moore algebra for a Frobenius monad T is an Eilenberg-Moore algebra (A, a) with

T (a)† T (A) T 2(A) µ† µ T 2(A) T (A) T (a)

For T = − ⊗ A, looks like:

=

They form the largest subcategory of EM(T ) that inherits dagger. 31 / 34 I “Cloak is everywhere”: Frobenius is omnipotent sweet spot between interesting and not general enough

I “Cloak hides dagger”: Frobenius law is coherence condition between dagger and closure

I “Dagger likes cloak”: Frobenius monads are dagger adjunctions (free) algebra categories again have dagger

Summary

What have we learnt?

I “Cloak and dagger”: Frobenius law and dagger categories both relate algebra and coalgebra

32 / 34 I “Cloak hides dagger”: Frobenius law is coherence condition between dagger and closure

I “Dagger likes cloak”: Frobenius monads are dagger adjunctions (free) algebra categories again have dagger

Summary

What have we learnt?

I “Cloak and dagger”: Frobenius law and dagger categories both relate algebra and coalgebra

I “Cloak is everywhere”: Frobenius is omnipotent sweet spot between interesting and not general enough

32 / 34 I “Dagger likes cloak”: Frobenius monads are dagger adjunctions (free) algebra categories again have dagger

Summary

What have we learnt?

I “Cloak and dagger”: Frobenius law and dagger categories both relate algebra and coalgebra

I “Cloak is everywhere”: Frobenius is omnipotent sweet spot between interesting and not general enough

I “Cloak hides dagger”: Frobenius law is coherence condition between dagger and closure

32 / 34 Summary

What have we learnt?

I “Cloak and dagger”: Frobenius law and dagger categories both relate algebra and coalgebra

I “Cloak is everywhere”: Frobenius is omnipotent sweet spot between interesting and not general enough

I “Cloak hides dagger”: Frobenius law is coherence condition between dagger and closure

I “Dagger likes cloak”: Frobenius monads are dagger adjunctions (free) algebra categories again have dagger

32 / 34 Any Kleisli morphism? No, only FEM-coalgebras A → T (A)! Consider exception monad T = − + E

“Classical and quantum structuralism” Semantic Techniques in Quantum Computation 29–69, 2009

“Handling algebraic effects” Logical Methods in Computer Science 9(4):23, 2013

Quantum measurement

n n Fix orthonormal basis on C so T = − ⊗ C is Frobenius monad on category of Hilbert spaces. Measurement is map A → T (A).

33 / 34 Consider exception monad T = − + E

“Handling algebraic effects” Logical Methods in Computer Science 9(4):23, 2013

Quantum measurement

n n Fix orthonormal basis on C so T = − ⊗ C is Frobenius monad on category of Hilbert spaces. Measurement is map A → T (A). Any Kleisli morphism? No, only FEM-coalgebras A → T (A)!

“Classical and quantum structuralism” Semantic Techniques in Quantum Computation 29–69, 2009

33 / 34 Quantum measurement

n n Fix orthonormal basis on C so T = − ⊗ C is Frobenius monad on category of Hilbert spaces. Measurement is map A → T (A). Any Kleisli morphism? No, only FEM-coalgebras A → T (A)! Consider exception monad T = − + E A η f

A + E (A, a)

I intercept exception e: execute fe, or f if no exception I handler for T specifies EM-algebra (A, a) and f : A → A I vertical arrows are Kleisli maps, dashed one EM-map

“Classical and quantum structuralism” Semantic Techniques in Quantum Computation 29–69, 2009

“Handling algebraic effects” Logical Methods in Computer Science 9(4):23, 2013 33 / 34 Consider exception monad T = − + E

Quantum measurement

n n Fix orthonormal basis on C so T = − ⊗ C is Frobenius monad on category of Hilbert spaces. Measurement is map A → T (A). Any Kleisli morphism? No, only FEM-coalgebras A → T (A)!

A η f

n A ⊗ C (A, a)

I “handle outcome x: execute fx, or f if no measurement” I handler for T specifies EM-algebra (A, a) and f : A → A I vertical arrows are Kleisli maps, dashed one EM-map

“Classical and quantum structuralism” Semantic Techniques in Quantum Computation 29–69, 2009

“Handling algebraic effects” Logical Methods in Computer Science 9(4):23, 2013 33 / 34 Consider exception monad T = − + E

Quantum measurement

n n Fix orthonormal basis on C so T = − ⊗ C is Frobenius monad on category of Hilbert spaces. Measurement is map A → T (A). Any Kleisli morphism? No, only FEM-coalgebras A → T (A)!

A η f

n A ⊗ C (A, a)

I Kleisli maps A → T (B) ‘build’ effectful computation I FEM-algebras T (B) → B are destructors ‘handling’ the effects I Effectful computation for Frobenius monad happens in FEM(T )

“Classical and quantum structuralism” Semantic Techniques in Quantum Computation 29–69, 2009

“Handling algebraic effects” Logical Methods in Computer Science 9(4):23, 2013 33 / 34 34 / 34