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 Lutz Schr¨ oder Friedrich-Alexander-Universit¨ at Erlangen-N¨ urnberg FoSSaCS 2018, 16-19 April 2018, Thessaloniki, Greece
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
Guarded Fixpoints: Overview guarded traced categories guarded iteration guarded 8 -dimensional recursion Hilbert spaces guarded topos of trees, complete total Conway recursion, Elgot monads complete metric spaces completely complete iterative monads Elgot monads process algebra domain-enriched examples examples
Guarded Fixpoints: Overview FoSSaCS17: G., Schr¨ oder, Rauch, Pir´ og, Unifying Guarded guarded traced and Unguarded Iteration categories guarded iteration guarded 8 -dimensional recursion Hilbert spaces guarded topos of trees, complete total Conway recursion, Elgot monads complete metric spaces : -congruent completely complete iterative monads Elgot monads retraction process algebra domain-enriched examples examples
Guarded Fixpoints: Overview FoSSaCS17: G., Schr¨ oder, Rauch, Pir´ og, Unifying Guarded guarded traced and Unguarded Iteration categories guarded iteration guarded 8 -dimensional recursion Hilbert spaces guarded topos of trees, complete total Conway recursion, Elgot monads complete metric spaces : -congruent completely complete iterative monads Elgot monads retraction FoSSaCS18: G., Schr¨ oder, GTC process algebra domain-enriched examples examples
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 “ νγ. T p X ` Σ γ q of infinite process trees and axiomatize guardedness of f : X Ñ T Σ Y in a coproduct summand σ : Y 1 Y as follows (in Klesili): f : X Ñ inr Y ` Z g : Y Ñ σ V h : Z Ñ V f : X Ñ Z (vac ` ) (cmp ` ) inl f : X Ñ inr Z ` Y r g , h s ˝ f : X Ñ σ V (par ` ) f : X Ñ σ Z f : Y Ñ σ Z r f , g s : X ` Y Ñ σ Z
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 Z Can we make sense of this intuition? : a X Y
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 Z Can we make sense of this intuition? : a X Pivotal Idea: Keep the notion Y of guardedness independent of fixpoint calculations
Going Monoidal
Going Monoidal (We only consider symmetric monoidal categories, think of b “ ` , ˆ ) Identity id: Composition g ˝ f : Tensor g b f : Symmetry:
Going Monoidal: Additional Structure Trace tr p f : U b A Ñ B b U q 1 : A Ñ B Compact closure: unit η : I Ñ A b A ‹ and counit ǫ : A ‹ b A Ñ I - q ‹ is a contravariant involutive endofunctor where p - In compact closed categories, trace is definable and unique, for: * U * U * U U * B U U C 1 The twist of input wires is nonstandard, but bear with me
Iteration and Recursion Iteration and recursion are typically viewed as corner cases: • With b “ ` , we obtain p f : A Ñ B ` A q : “ tr p f ˝ ∇ q : A A B • With b “ ˆ , we obtain p f : A ˆ B Ñ A q : “ tr p ∆ ˝ f q : B A A Corresponding converse definitions can also be produced. So, traces and (Conway) fixpoints are equivalent in the requisite cases!
Guarded Categories
Partially Guarded Morphisms A monoidal category is guarded if it is equipped with distinguished families Hom ‚ p A b B , C b D q Ď Hom p A b B , C b D q , drawn as follows B D A C where • A is unguarded input • B is guarded input • C is unguarded output • D is guarded output The idea is to prevent feedback on p A , D q . Hence we introduce axioms:
The Axioms
Some (Easy) Observations • There is a greatest notion of guardedness, Hom ‚ p A b B , C b D q “ Hom p A b B , C b D q • There is a least (vacuous) notion of guardedness, g h • Axioms are stable under 180 0 -rotations, hence C is guarded iff C op is guarded, i.e. we maintain duality of recursion and iteration
Ideal Guardedness A particularly common case is ideal guardedness A guarded ideal is a family Hom § p X , Y q Ď Hom p X , 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 p 1 n n 1 q n 1
Ideal Guardedness A particularly common case is ideal guardedness A guarded ideal is a family Hom § p X , Y q Ď Hom p X , 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 p 1 n n 1 q n 1 In the (co-)Cartesian case this simplifies greatly, generating standard notions, e.g. f : X Ñ 2 Y ` Z iff r inl , g s h X Ý Ý Ñ Y ` W Ý Ý Ý Ý Ý Ñ Y ` Z with some g P Hom § p W , Y ` Z q and h : X Ñ Y ` W
Guarded Traces
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
Structural Guardedness v.s. Geometric Guardedness For guarded categories we have coherence of structural and geometric notions: a term is in Hom ‚ p A b B , C b D q 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!
Structural Guardedness v.s. Geometric Guardedness For guarded categories we have coherence of structural and geometric notions: a term is in Hom ‚ p A b B , C b D q 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
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 p x , - - 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
Unguarded Recursion as Guarded Recursion • A standard way to do recursion with monads is in the category C T ‹ 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 ÞÑ X K • Alternatively, following [Milius and Litak, 2013], we consider guarded recursion operators on C where C is ideally guarded over Hom § p X , Y q “ t f ˝ η | f : TX Ñ Y u Example: with C and T as above, we allow only recursion on X of f : X K ˆ Y Ñ X
Unguarded Recursion as Guarded Recursion We consider the following axioms: • Dinaturality: B B B B g g A C A C C A • Squaring (is not a property of Conway recursion but a property of Conway uniform recursion): B B B A A A A A Theorem: There is a bijective correspondence between guarded squarable dinatural operators on C and unguarded squarable dinatural on C T ‹
Guarded Traces in Hilbert Spaces
Finite-Dimensional Hilbert Spaces Recall the multiplicative compact closed category of relations p Rel , ˆ , 1 q - q ‹ Relations can be thought of as Boolean matrices, with transposition p - and (unparamerized) trace being the trace of the square matrices ¨ ˛ ¨ ¨ ¨ b 11 b 1 n ÿ tr ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ‚ “ b ii ˚ ‹ ˝ b n 1 ¨ ¨ ¨ b nn i 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 p f b g qp x b y q “ f p x q b g p y q , R as tensor unit, X ‹ “ X on objects, f ‹ as the unique adjoint operator x f p x q , y y “ x x , f ‹ p y qy and unit/counit induced by inner products
Recommend
More recommend