GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - boogie-org/lean-itrees: A Lean implementation of Interaction Trees

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
ITree
ITree
 
 
.gitignore
.gitignore
 
 
Examples.lean
Examples.lean
 
 
ITree.lean
ITree.lean
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
lake-manifest.json
lake-manifest.json
 
 
lakefile.lean
lakefile.lean
 
 
lean-toolchain
lean-toolchain
 
 

Repository files navigation

Interaction Trees in Lean 4

Interaction trees allow expressing potentially non-terminating and effectful programs. The core data structure is the following coinductive type:

coinductive ITree (E : Type -> Type) (R : Type) : Type
| ret : R         -> ITree E R
| tau : ITree E R -> ITree E R
| vis : {A : Type} -> E A -> (A -> ITree E R) -> ITree E R

ITree E forms a monad additionally equipped with iter. We can thus use do-notation:

def main : ITree (Mem & AssumeAssert) Nat := do
  let x <- Mem.read "x"
  assume (x < 10)
  return x

ITree Specifications

In order to be able to express constructs such as assume _; in intermediate verification languages such as Boogie 2, Dijkstra monads for ITrees can be used.

Next Up

  • Not universe-polymorphic, which prevents us from implementing interp.
  • A lot of coinductive theorems are missing.
  • We assume that Quotienting ITrees along Eutt is possible, see QITree.lean.

About

A Lean implementation of Interaction Trees

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

20 stars

Watchers

5 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.