Guarded Traced Categories Sergey Goncharov and Lutz Schr oder - - PowerPoint PPT Presentation

guarded traced categories
SMART_READER_LITE
LIVE PREVIEW

Guarded Traced Categories Sergey Goncharov and Lutz Schr oder - - PowerPoint PPT Presentation

Guarded Traced Categories Sergey Goncharov and Lutz Schr oder Friedrich-Alexander-Universit at Erlangen-N urnberg FoSSaCS 2018, 16-19 April 2018, Thessaloniki, Greece Guarded Traced (Symmetric Monoidal) Categories Sergey Goncharov and


slide-1
SLIDE 1

Guarded Traced Categories

Sergey Goncharov and Lutz Schr¨

  • der

Friedrich-Alexander-Universit¨ at Erlangen-N¨ urnberg FoSSaCS 2018, 16-19 April 2018, Thessaloniki, Greece

slide-2
SLIDE 2

Guarded Traced (Symmetric Monoidal) Categories

Sergey Goncharov and Lutz Schr¨

  • der

Friedrich-Alexander-Universit¨ at Erlangen-N¨ urnberg FoSSaCS 2018, 16-19 April 2018, Thessaloniki, Greece

slide-3
SLIDE 3

Introduction

  • Recursion / iteration
  • order-theoretic / unguarded
  • process-theoretic / guarded
  • Generic categorical models:
  • Total:
  • Axiomatic/synthetic domain theory (Hyland, Fiore, Taylor et al.)
  • let-ccc’s with fixpoint objects (Crole/Pitts, Simpson)
  • Traced monoidal categories (Joyal/Street/Verity, Hasegawa)
  • Elgot monads/theories (Bloom/Esik, Ad´

amek, Milius et al.)

  • Partial:
  • Completely iterative monads/theories (Bloom/Esik,

Ad´ amek, Milius et al.)

  • later-modality (Nakano, Appel, Melli`

es, Benton, Birkedal et al.)

  • Partial traced categories (Heghverdi, Scott, Malherbe, Selinger)
  • Functorial dagger (Milius, Litak)
  • Here: Unifying framework for guarded and unguarded feedback in

monoidal categories

slide-4
SLIDE 4

Guarded Fixpoints: Overview

guarded traced categories guarded iteration guarded complete Elgot monads completely iterative monads process algebra examples complete Elgot monads domain-enriched examples guarded recursion topos of trees, total Conway recursion, complete metric spaces 8-dimensional Hilbert spaces

slide-5
SLIDE 5

Guarded Fixpoints: Overview

FoSSaCS17: G., Schr¨

  • der,

Rauch, Pir´

  • g, Unifying Guarded

and Unguarded Iteration

guarded traced categories guarded iteration guarded complete Elgot monads completely iterative monads process algebra examples complete Elgot monads domain-enriched examples guarded recursion topos of trees, total Conway recursion, complete metric spaces 8-dimensional Hilbert spaces

:-congruent retraction

slide-6
SLIDE 6

Guarded Fixpoints: Overview

FoSSaCS17: G., Schr¨

  • der,

Rauch, Pir´

  • g, Unifying Guarded

and Unguarded Iteration FoSSaCS18: G., Schr¨

  • der, GTC

guarded traced categories guarded iteration guarded complete Elgot monads completely iterative monads process algebra examples complete Elgot monads domain-enriched examples guarded recursion topos of trees, total Conway recursion, complete metric spaces 8-dimensional Hilbert spaces

:-congruent retraction

slide-7
SLIDE 7

Motivating Example: Process Algebra

In process algebra, we solve tail-recursive process definitions, like x “ a. x ` τ. x ` y More abstractly, we involve a monad TΣX “ νγ. TpX ` Σγq of infinite process trees and axiomatize guardedness of f : X Ñ TΣY in a coproduct summand σ : Y 1 Y as follows (in Klesili): (vac`) f : X Ñ Z inl f : X Ñinr Z ` Y (cmp`) f : X Ñinr Y ` Z g : Y Ñσ V h : Z Ñ V rg, hs ˝ f : X Ñσ V (par`) f : X Ñσ Z f : Y Ñσ Z rf , gs : X ` Y Ñσ Z

slide-8
SLIDE 8

Guarded Iteration v.s. Guarded Recursion

Guarded iteration is a (partial) operation f : X Ñ Y ` X f : : X Ñ Y with f guarded in X Dualization should yield guarded recursion: f : X ˆ Y Ñ X f: : Y Ñ X Can we make sense of this intuition? :

a

X Z Y

slide-9
SLIDE 9

Guarded Iteration v.s. Guarded Recursion

Guarded iteration is a (partial) operation f : X Ñ Y ` X f : : X Ñ Y with f guarded in X Dualization should yield guarded recursion: f : X ˆ Y Ñ X f: : Y Ñ X Can we make sense of this intuition? : Pivotal Idea: Keep the notion

  • f guardedness independent of

fixpoint calculations

a

X Z Y

slide-10
SLIDE 10

Going Monoidal

slide-11
SLIDE 11

Going Monoidal

(We only consider symmetric monoidal categories, think of b “ `, ˆ) Identity id: Composition g ˝ f : Tensor g b f : Symmetry:

slide-12
SLIDE 12

Going Monoidal: Additional Structure

Trace trpf : U b A Ñ B b Uq1: A Ñ B Compact closure: unit η : I Ñ A b A‹ and counit ǫ : A‹ b A Ñ I where p-

  • q‹ is a contravariant involutive endofunctor

In compact closed categories, trace is definable and unique, for:

U B C U U U U

* * *

U* 1The twist of input wires is nonstandard, but bear with me

slide-13
SLIDE 13

Iteration and Recursion

Iteration and recursion are typically viewed as corner cases:

  • With b “ `, we obtain pf : A Ñ B ` Aq: “ trpf ˝ ∇q:

A A B

  • With b “ ˆ, we obtain pf : A ˆ B Ñ Aq: “ trp∆ ˝ f q:

A A B

Corresponding converse definitions can also be produced. So, traces and (Conway) fixpoints are equivalent in the requisite cases!

slide-14
SLIDE 14

Guarded Categories

slide-15
SLIDE 15

Partially Guarded Morphisms

A monoidal category is guarded if it is equipped with distinguished families Hom‚pA b B, C b Dq Ď HompA b B, C b Dq, drawn as follows

A C D B

where

  • A is unguarded input
  • B is guarded input
  • C is unguarded output
  • D is guarded output

The idea is to prevent feedback on pA, Dq. Hence we introduce axioms:

slide-16
SLIDE 16

The Axioms

slide-17
SLIDE 17

Some (Easy) Observations

  • There is a greatest notion of guardedness,

Hom‚pA b B, C b Dq “ HompA b B, C b Dq

  • There is a least (vacuous) notion of guardedness,

g h

  • Axioms are stable under 1800-rotations, hence C is guarded iff Cop is

guarded, i.e. we maintain duality of recursion and iteration

slide-18
SLIDE 18

Ideal Guardedness

A particularly common case is ideal guardedness A guarded ideal is a family Hom§pX, Y q Ď HompX, Y q closed under finite tensors and composition with any morphism on both sides The general form of a partially guarded morphism over a guarded ideal is

1 1 1

n n n

p q

slide-19
SLIDE 19

Ideal Guardedness

A particularly common case is ideal guardedness A guarded ideal is a family Hom§pX, Y q Ď HompX, Y q closed under finite tensors and composition with any morphism on both sides The general form of a partially guarded morphism over a guarded ideal is

1 1 1

n n n

p q

In the (co-)Cartesian case this simplifies greatly, generating standard notions, e.g. f : X Ñ2 Y ` Z iff X

h

Ý Ý Ñ Y ` W

rinl,gs

Ý Ý Ý Ý Ý Ñ Y ` Z with some g P Hom§pW , Y ` Zq and h : X Ñ Y ` W

slide-20
SLIDE 20

Guarded Traces

slide-21
SLIDE 21

Guarded Traced Categories

A guarded category is guarded traced if it is equipped with a trace: satisfying a collection of axioms adapted from the standard case Guarded Conway iteration/recursion operators are obtained analogously to the standard case

slide-22
SLIDE 22

Structural Guardedness v.s. Geometric Guardedness

For guarded categories we have coherence of structural and geometric notions: a term is in Hom‚pA b B, C b Dq iff in the corresponding diagram every path from A to D runs through some atomic box via an unguarded input and a guarded output This is no longer true for guarded traces: Geometrically, this is OK but there is no structured way to derive it!

slide-23
SLIDE 23

Structural Guardedness v.s. Geometric Guardedness

For guarded categories we have coherence of structural and geometric notions: a term is in Hom‚pA b B, C b Dq iff in the corresponding diagram every path from A to D runs through some atomic box via an unguarded input and a guarded output This is no longer true for guarded traces: Geometrically, this is OK but there is no structured way to derive it! But: This discrepancy does not arise in the ideal case Conjecture: The same is true for the (co-)Cartesian case

slide-24
SLIDE 24

Non-Ideal Case: Contractive Maps

Consider the category CMS of inhabited complete metric spaces and non-expansive maps Let f : X ˆ Y Ñ Z be guarded in Y if for all x P X, f px, -

  • q is contractive

This makes CMS into a guarded traced monoidal category (fixpoints calculated via Banach’s fixpoint theorem) but not ideally guarded, because a contraction factor depends on x and may not be chosen uniformly

slide-25
SLIDE 25

Unguarded Recursion as Guarded Recursion

  • A standard way to do recursion with monads is in the category CT

with T-algebras as objects and C-morphisms of carriers as morphisms Example: C = point-free dcpo’s and continuous functions; T = lifting monad X ÞÑ XK

  • Alternatively, following [Milius and Litak, 2013], we consider guarded

recursion operators on C where C is ideally guarded over Hom§pX, Y q “ tf ˝ η | f : TX Ñ Y u Example: with C and T as above, we allow only recursion

  • n X of f : XK ˆ Y Ñ X
slide-26
SLIDE 26

Unguarded Recursion as Guarded Recursion

We consider the following axioms:

  • Dinaturality:

A B C A B

g

C B A C B

g

  • Squaring (is not a property of Conway recursion but a property of

Conway uniform recursion):

A B A A B A A B

Theorem: There is a bijective correspondence between guarded squarable dinatural operators on C and unguarded squarable dinatural on CT

slide-27
SLIDE 27

Guarded Traces in Hilbert Spaces

slide-28
SLIDE 28

Finite-Dimensional Hilbert Spaces

Recall the multiplicative compact closed category of relations pRel, ˆ, 1q Relations can be thought of as Boolean matrices, with transposition p-

  • q‹

and (unparamerized) trace being the trace of the square matrices tr ¨ ˚ ˝ b11 ¨ ¨ ¨ b1n ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ bn1 ¨ ¨ ¨ bnn ˛ ‹ ‚“ ÿ

i

bii Analogously, linear operators on finite-dimensional Hilbert spaces can be represented as matrices over a field – we stick to the field of reals Thus, Hilbert spaces are compact closed with tensors pf b gqpx b yq “ f pxq b gpyq, R as tensor unit, X ‹ “ X on objects, f ‹ as the unique adjoint operator xf pxq, yy “ xx, f ‹pyqy and unit/counit induced by inner products

slide-29
SLIDE 29

Infinite-Dimensional Hilbert Spaces

More generally, Hilbert spaces are vector spaces with inner products, complete as a normed spaces under the induced norm | |x| | “ a xx, xy Category Hilb:

  • Objects are Hilbert spaces
  • Morphisms are bounded linear operators, i.e. |

|f pxq| | ď c ¨ | |x| | for a fixed c and every x

  • Monoidal structure as before
  • Adjointness for operators still works and pf b gq‹ “ f ‹ b g ‹,

f ‹‹ “ f , id‹ “ id, pf ˝ gq‹ “ g ‹ ˝ f ‹

slide-30
SLIDE 30

Infinite-Dimensional Hilbert Spaces

More generally, Hilbert spaces are vector spaces with inner products, complete as a normed spaces under the induced norm | |x| | “ a xx, xy Category Hilb:

  • Objects are Hilbert spaces
  • Morphisms are bounded linear operators, i.e. |

|f pxq| | ď c ¨ | |x| | for a fixed c and every x

  • Monoidal structure as before
  • Adjointness for operators still works and pf b gq‹ “ f ‹ b g ‹,

f ‹‹ “ f , id‹ “ id, pf ˝ gq‹ “ g ‹ ˝ f ‹ But there is no (total) trace, because the trace formula trpf q “ ř

ixf peiq, eiy may diverge (teiui is any orthonormal basis)!

E.g. it diverges with f “ id : X Ñ X with infinite-dimensional X

slide-31
SLIDE 31

Nontrivial Trace from Vacuous Guardedness

[Abramsky, Blute, and Panangaden, 1999] already give a construction of unparameterized partial traces in Hilb via nuclear ideals. We generalize and reconcile it with our approach by equipping Hilb with the vacuous guardedness structure:

g h g h

What is nontrivial though is that this is independent of the decomposition into g and h! Morphisms f : X Ñ X from the induced guarded ideal are precisely those for which trpf q “ ř

ixf peiq, eiy absolutely converges for any choice of an

  • rthonormal basis peiqi; the sum is then independent of the basis
slide-32
SLIDE 32

The Diversity of Further Avenues

  • Deepen the theory of guarded traced categories: coherence,

expressiveness, completeness (w.r.t. Hilbert spaces?), Int-construction

  • Elaborate the relationship between guarded ideals and nuclear ideals

ñ further examples

  • Yet more examples: hybrid iteration, neural networks, ...
  • Metalanguages for guarded iteration and recursion
slide-33
SLIDE 33

Questions?

slide-34
SLIDE 34

References I

References

  • S. Abramsky, R. Blute, and P. Panangaden. Nuclear and trace ideals in

tensored *-categories. J. Pure Appl. Algebra, 143:3–47, 1999. Stefan Milius and Tadeusz Litak. Guard your daggers and traces: On the equational properties of guarded (co-)recursion. In Fixed Points in Computer Science, FICS 2013, volume 126 of EPTCS, pages 72–86, 2013.