Relative Monads Formalised

نویسندگان

  • Thorsten Altenkirch
  • James Chapman
  • Tarmo Uustalu
چکیده

Relative monads (Altenkirch, Chapman, and Uustalu 2010) are a recent generalisation of ordinary monads to cover similar structures where the underlying functor need not be an endofunctor. Our interest in this generalisation was triggered by some structures from programming theory that, in many ways, are strikingly similar to monads (even respecting the same laws), have similar programming applications, but nonetheless fail to be monads. Some examples of relative monads include untyped and typed λ-terms, finite-dimensional vector spaces, Hughes’s arrows. Our research effort on relative monads is ongoing. In this paper, we describe a formalisation of the basic theory of relative monads in the interactive theorem prover and dependently typed programming language Agda (Agda team 2010). This formalisation work is motivated by a number of basic observations. First of all, by moving from a conventional functional programming language like Haskell (The Haskell Team 2010) to a dependently typed language like Agda (Agda team 2010), we gain the opportunity to formally certify our programs. Indeed, we are able to move from programs to “deliverables”, which contain partial specifications of programs as types; and the correctness of the assertions can be automatically verified by a type checker.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Probabilities, distribution monads, and convex categories

Probabilities are understood abstractly as forming a monoid in the category of effect algebras. They can be added, via a partial operation, and multiplied. This generalises key properties of the unit interval [0, 1]. Such effect monoids can be used to define a probability distribution monad, again generalising the situation for [0, 1]-probabilities. It will be shown that there are translations ...

متن کامل

Monads Need Not Be Endofunctors

We introduce a generalisation of monads, called relative monads, allowing for underlying functors between different categories. Examples include finite-dimensional vector spaces, untyped and typed λ-calculus syntax and indexed containers. We show that the Kleisli and Eilenberg-Moore constructions carry over to relative monads and are related to relative adjunctions. Under reasonable assumptions...

متن کامل

An Algebraic Basis for Specifying and Enforcing Access Control in Security Systems

Security services in a multi-user environment are often based on access control mechanisms. Static aspects of an access control policy can be formalised using abstract algebraic models. We integrate these static aspects into a dynamic framework considering requesting access to resources as a process aiming at the prevention of access control violations when a program is executed. We use another...

متن کامل

Leibniz’s Monads and Mulla Sadra’s Hierarchy of Being: A Comparative Study

Mulla Sadra and Leibniz, the two philosophers from the East and the West, belong to two different worlds. Though they were unaware of the ideas of each other, their philosophical systems share certain common points that are comparable. Monads constitute the basis of Leibniz's thought and he refers to their features in his various works. On the other side, Mulla Sadra's philosophy is also based ...

متن کامل

19th International Conference on Types for Proofs and Programs

We introduce update monads as a generalization of state monads. Update monads are thecompatible compositions of reader and writer monads given by a set and a monoid. Distributivelaws between such monads are given by actions of the monoid on the set.We also discuss a dependently typed generalization of update monads. Unlike simple updatemonads, they cannot be factored into a ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • J. Formalized Reasoning

دوره 7  شماره 

صفحات  -

تاریخ انتشار 2014