363 research outputs found

    Preservation of Equations by Monoidal Monads

    Get PDF
    If a monad T is monoidal, then operations on a set X can be lifted canonically to operations on TX. In this paper we study structural properties under which T preserves equations between those operations. It has already been shown that any monoidal monad preserves linear equations; affine monads preserve drop equations (where some variable appears only on one side, such as x? y = y) and relevant monads preserve dup equations (where some variable is duplicated, such as x ? x = x). We start the paper by showing a converse: if the monad at hand preserves a drop equation, then it must be affine. From this, we show that the problem whether a given (drop) equation is preserved is undecidable. A converse for relevance turns out to be more subtle: preservation of certain dup equations implies a weaker notion which we call n-relevance. Finally, we identify a subclass of equations such that their preservation is equivalent to relevance

    Layer by layer - Combining Monads

    Full text link
    We develop a method to incrementally construct programming languages. Our approach is categorical: each layer of the language is described as a monad. Our method either (i) concretely builds a distributive law between two monads, i.e. layers of the language, which then provides a monad structure to the composition of layers, or (ii) identifies precisely the algebraic obstacles to the existence of a distributive law and gives a best approximant language. The running example will involve three layers: a basic imperative language enriched first by adding non-determinism and then probabilistic choice. The first extension works seamlessly, but the second encounters an obstacle, which results in a best approximant language structurally very similar to the probabilistic network specification language ProbNetKAT

    Monad Composition via Preservation of Algebras

    Get PDF
    Monads are a central object of category theory and constitute crucial tools for many areas of Computer Science, from semantics of computation to functional programming. An important aspect of monads is their correspondence with algebraic theories (their ‘presentation’). As demonstrated by the history of this field, composing monads is a challenging task: the literature contains numerous mistakes and features no general method. One categorical construct, named ‘distributive law’ allows this composition, but its existence is not guaranteed. This thesis addresses the question of monad composition by presenting a method for the construction of distributive laws. For this purpose, we introduce a notion of preservation of algebraic features: considering an arbitrary algebra for the theory presenting a monad S, we examine whether its structure is preserved when applying another monad T . In the case of success, it allows us to construct a distributive law and to compose our monads into T S. In order to develop a general framework, we focus on the class of monoidal monads. If T is monoidal, the algebraic operations presenting S are preserved in a canonical fashion; it remains to examine whether the equations presenting S are also preserved by T . As it turns out, the preservation of an equation depends on the layout of its variables: if each variable appears once on each side, the considered equation is automatically preserved by a monoidal monad. On the other hand, if a variable is duplicated or only appears on one side, preservation is not systematic. The main results of this thesis connect the preservation of such equations with structural properties of monads. In the case where T does not preserve an equation presenting S, our distributive law cannot be built; we provide a series of methods to slightly modify our monads and overcome this issue, and we investigate some less conventional distributive laws. Finally, we consider the presentations of both S and T and revisit our construction of distributive laws, this time with an algebraic point of view. Overall, this thesis presents a general approach to the problem of monad composition by relating categorical properties of monads with preservation of algebras

    Guard Your Daggers and Traces: On The Equational Properties of Guarded (Co-)recursion

    Full text link
    Motivated by the recent interest in models of guarded (co-)recursion we study its equational properties. We formulate axioms for guarded fixpoint operators generalizing the axioms of iteration theories of Bloom and Esik. Models of these axioms include both standard (e.g., cpo-based) models of iteration theories and models of guarded recursion such as complete metric spaces or the topos of trees studied by Birkedal et al. We show that the standard result on the satisfaction of all Conway axioms by a unique dagger operation generalizes to the guarded setting. We also introduce the notion of guarded trace operator on a category, and we prove that guarded trace and guarded fixpoint operators are in one-to-one correspondence. Our results are intended as first steps leading to the description of classifying theories for guarded recursion and hence completeness results involving our axioms of guarded fixpoint operators in future work.Comment: In Proceedings FICS 2013, arXiv:1308.589

    Not every pseudoalgebra is equivalent to a strict one

    Get PDF
    We describe a finitary 2-monad on a locally finitely presentable 2-category for which not every pseudoalgebra is equivalent to a strict one. This shows that having rank is not a sufficient condition on a 2-monad for every pseudoalgebra to be strictifiable. Our counterexample comes from higher category theory: the strict algebras are strict 3-categories, and the pseudoalgebras are a type of semi-strict 3-category lying in between Gray-categories and tricategories. Thus, the result follows from the fact that not every Gray-category is equivalent to a strict 3-category, connecting 2-categorical and higher-categorical coherence theory. In particular, any nontrivially braided monoidal category gives an example of a pseudoalgebra that is not equivalent to a strict one.Comment: 17 pages; added more explanation; final version, to appear in Adv. Mat

    Enriched Lawvere Theories for Operational Semantics

    Full text link
    Enriched Lawvere theories are a generalization of Lawvere theories that allow us to describe the operational semantics of formal systems. For example, a graph enriched Lawvere theory describes structures that have a graph of operations of each arity, where the vertices are operations and the edges are rewrites between operations. Enriched theories can be used to equip systems with operational semantics, and maps between enriching categories can serve to translate between different forms of operational and denotational semantics. The Grothendieck construction lets us study all models of all enriched theories in all contexts in a single category. We illustrate these ideas with the SKI-combinator calculus, a variable-free version of the lambda calculus.Comment: In Proceedings ACT 2019, arXiv:2009.0633
    • …
    corecore