Skip to content

Add monotone predicate monad to sdtlib #508

Open
@ajrouvoet

Description

@ajrouvoet

We've developed monotone predicate monads for e.g. monotone typed state.
I was wondering if there is interest in getting such definitions into the standard library.
If so, I can prepare a PR.

One implements a monotone predicate monad by instantiating:

record RawMPMonad (M : Pt I ℓ) : Set (suc ℓ) where
  infixl 1 _≥=_
  field
    return : ∀ {P} → P ⊆ M P
    _≥=_   : ∀ {P Q} → M P ⊆ ((P ↗ M Q) ⇒ M Q)

where (P ↗ M Q) is the kripke function space.
You get an RawPMonad instance for free, as well as monadic strength.
Using monadic strength and appropriate instances of the Monotone typeclass, you can
program with it.

Monotone Predicate Monads
Monotone Typed State
Monotone Type class
An instance
Kripke stuff

Tasks

  • decompose Kripke function space; drop alternative notation
  • What we call Monotone is called Closed in the stdlib

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions