Giter Site home page Giter Site logo

interactiontrees's Introduction

Interaction Trees Build Status

A Library for Representing Recursive and Impure Programs in Coq

Introduction

For a quick overview of the core features of the library, see examples/ReadmeExample.v.

See also the tutorial.

The coqdoc documentation for this library is available here.

Top-level modules

  • ITree.ITree: Definitions to program with interaction trees.
  • ITree.ITreeFacts: Theorems to reason about interaction trees.
  • ITree.Events: Some standard event types.

Installation

Via opam

opam install coq-itree

Dependencies

See coq-itree.opam for version details.

Axioms

This library currently depends on UIP, functional extensionality, excluded middle, and choice; see also theories/Axioms.v.

UIP

This library depends on UIP for the inversion lemma:

Lemma eqit_inv_Vis
  : eutt eq (Vis e k1) (Vis e k2) ->
    forall x, eutt eq (k1 x) (k2 x).

There are a few more lemmas that depend on it, but you might not actually need it. For example, the compiler proof in tutorial doesn't need it and is axiom-free.

That lemma also has a weaker, but axiom-free version using heterogeneous equality: eqit_inv_Vis_weak.

The axiom that's technically used here is eq_rect_eq (and also JMeq_eq in old versions of Coq), which is equivalent to UIP.

Functional extensionality

The closed category of functions assumes functional_extensionality, in Basics.FunctionFacts.CartesianClosed_Fun.

Excluded middle and choice

The theory of traces (theories/ITrace/)—which Dijkstra monads for ITree depend on (theories/Dijkstra)—assumes excluded middle, to decide whether an itree diverges, and a type-theoretic axiom of choice, which provides a strong excluded middle in propositional contexts:

Theorem classicT_inhabited : inhabited (forall T : Type, T + (T -> False)).

Remark: excluded middle implies UIP, but we still consider UIP as a separate dependency because it's used in a more central part of the library.

Exported: strong bisimulation is propositional equality

The library exports the following axiom for convenience, though it's unlikely you'll need it, and the rest of the library does not depend on it:

Axiom bisimulation_is_eq : t1 ≅ t2 -> t1 = t2.

Contributions welcome

Feel free to open an issue or a pull request!

See also DEV.md for working on this library.

interactiontrees's People

Contributors

lysxia avatar zdancewic avatar yazko avatar gilhur avatar gmalecha avatar liyishuai avatar grain avatar chobbes avatar euisuny avatar lag47 avatar samuelgruetter avatar bollu avatar lephe avatar jeehoonkang avatar mbodin avatar artagnon avatar rgrinberg avatar vzaliva avatar lastland avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.