Don't Try This at Home: No-Go Theorems for Distributive Laws

11/15/2018
by   Maaike Zwart, et al.
0

Beck's distributive laws provide sufficient conditions under which two monads can be composed, and monads arising from distributive laws have many desirable theoretical properties. Unfortunately, finding and verifying distributive laws, or establishing if one even exists, can be extremely difficult and error-prone. We develop general-purpose techniques for showing when there can be no distributive law between two monads. Two approaches are presented. The first widely generalizes ideas from a counterexample attributed to Plotkin, yielding general-purpose theorems that recover the previously known situations in which no distributive law can exist. Our second approach is entirely novel, encompassing new practical situations beyond our generalization of Plotkin's approach. It negatively resolves the open question of whether the list monad distributes over itself. Our approach adopts an algebraic perspective throughout, exploiting a syntactic characterization of distributive laws. This approach is key to generalizing beyond what has been achieved by direct calculations in previous work. We show via examples many situations in which our theorems can be applied. This includes a detailed analysis of distributive laws for members of an extension of the Boom type hierarchy, well known to functional programmers.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/27/2020

No-Go Theorems for Distributive Laws

Monads are commonplace in computer science, and can be composed using Be...
research
05/07/2022

Weakening and Iterating Laws using String Diagrams

Distributive laws are a standard way of combining two monads, providing ...
research
10/06/2018

When logic lays down the law

We analyse so-called computable laws, i.e., laws that can be enforced by...
research
10/23/2017

Nauticle: a general-purpose particle-based simulation tool

Nauticle is a general-purpose numerical solver pursuing the easy adoptio...
research
06/30/2023

Abide by the Law and Follow the Flow: Conservation Laws for Gradient Flows

Understanding the geometric properties of gradient descent dynamics is a...
research
11/25/2021

A Remark on the Invariant Energy Quadratization (IEQ) Method for Preserving the Original Energy Dissipation Laws

In this letter, we revisit the IEQ method and provide a new perspective ...
research
04/24/2020

Predicted by Orwell: A discourse on the gradual shift in electronic surveillance law

At some point in the history of most nations, one or more events of ille...

Please sign up or login with your details

Forgot password? Click here to reset