An open API service indexing awesome lists of open source software.

https://github.com/Deducteam/lambdapi

Proof assistant based on the λΠ-calculus modulo rewriting
https://github.com/Deducteam/lambdapi

dependent-types logical-framework proof-assistant proof-checker proof-translator rewriting

Last synced: 11 months ago
JSON representation

Proof assistant based on the λΠ-calculus modulo rewriting

Awesome Lists containing this project

README

          

Lambdapi, a proof assistant based on the λΠ-calculus modulo rewriting
=====================================================================

``>>>>>`` [User Manual](https://lambdapi.readthedocs.io) ``<<<<<``
------------------------------------------------------------------

Issues can be reported on the
[issue tracker](https://github.com/Deducteam/lambdapi/issues).

Questions can be asked on the
[forum](https://github.com/Deducteam/lambdapi/discussions).

User interfaces
---------------

- [Emacs](https://lambdapi.readthedocs.io/en/latest/emacs.html)
- [VSCode](https://lambdapi.readthedocs.io/en/latest/vscode.html)

Libraries
---------

Lambdapi libraries can be found on the [Opam repository of Lambdapi libraries](https://github.com/Deducteam/opam-lambdapi-repository).

Examples
--------

- [tutorial](https://raw.githubusercontent.com/Deducteam/lambdapi/master/tests/OK/tutorial.lp) (learn Lambdapi in 15 minutes)
- [some logic definitions](https://github.com/Deducteam/lambdapi-logics)
- [inductive-recursive type definition](https://github.com/Deducteam/lambdapi/blob/master/tests/OK/indrec.lp)
- [inductive-inductive type definition](https://github.com/Deducteam/lambdapi/blob/master/tests/OK/indind.lp)
- [library on natural numbers, integers and polymorphic lists](https://github.com/Deducteam/lambdapi-stdlib)

Some users
----------

- Melanie Taprogge: extension of the LEO-III automated theorem prover for higher-order logic producing Lambdapi proofs [[github]](https://github.com/melanie-taprogge/Leo-III/tree/LPverification) [[MSc thesis]](https://inria.hal.science/hal-04733263)
- [Alessio Coltellacci](https://github.com/NotBad4U) and [Stephan Merz](https://members.loria.fr/Stephan.Merz/): extension of the Alethe proof verifier Carcara for SMT solvers producing Lambdapi proofs [[github]](https://github.com/NotBad4U/carcara) [[SMT'24]](https://ceur-ws.org/Vol-3725/paper8.pdf)
- [Alessio Coltellacci](https://github.com/NotBad4U) and [Stephan Merz](https://members.loria.fr/Stephan.Merz/): encoding of TLA+ set theory in Lambdapi [[ABZ'23]](https://doi.org/10.1007/978-3-031-33163-3_29)
- [Jean-Paul Bodeveix](https://www.irit.fr/~Jean-Paul.Bodeveix/) and Anne Grieu: certification of Event-B proofs generated by Rodin in Lambdapi
- [Frédéric Blanqui](https://blanqui.gitlabpages.inria.fr/): translation of HOL-Light proofs to Coq [[github]](https://github.com/Deducteam/hol2dk) [[LPAR'24]](https://doi.org/10.29007/6k4x)
- Nicolas Margulies: a formalization of cubical type theory in Lambdapi [[github]](https://github.com/nicomarg/CubicalDk)
- [Thomas Traversié](https://thomastraversie.github.io/): implementation of set theory with pointed graphs [[LFMTP'22]](https://hal.inria.fr/hal-03740004)
- Luc Chabassier: formalization of some category theory [[github]](https://github.com/dwarfmaster/categories-in-lp) and of extensional type theory [[github]](https://github.com/dwarfmaster/ett-in-lambdapi)
- [Quentin Garchery](https://www.lri.fr/~garchery/): certification of Why3 proof task transformations in Lambdapi [[PhD thesis]](https://inria.hal.science/tel-03560564)
- Gabriel Hondet: translation of PVS statements to Lambdapi [[github]](https://github.com/Deducteam/personoj) [[PhD thesis]](https://inria.hal.science/tel-03855351)

Operating systems
-----------------

Lambdapi requires a Unix-like system. It might be possible to make it work on Windows too with Cygwin or "bash on Windows".

Installation via Opam
---------------------

```bash
opam install lambdapi
```
gives you the command ``lambdapi``.

The [Emacs](https://lambdapi.readthedocs.io/en/latest/emacs.html) extension is available on [MELPA](https://melpa.org/#/lambdapi-mode).

The [VSCode](https://lambdapi.readthedocs.io/en/latest/vscode.html) extension is available on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=Deducteam.lambdapi).

To browse the source code documentation, you can do:
```bash
opam install odig
odig doc lambdapi
```

To install Lambdapi libraries, see the [opam-lambdapi-repository](https://github.com/Deducteam/opam-lambdapi-repository).

**Remark:** To install Opam, see [here](https://opam.ocaml.org/).

To make sure that programs installed via opam are in your path, you
should have in your `.bashrc` (or any other shell initial file) the
following line that can be automatically added when you do `opam
init`:

```bash
test -r ~/.opam/opam-init/init.sh && . ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
```

To update your path, you can also do:
```bash
eval `opam env`
```

Compilation from the sources
----------------------------

You can get the sources using `git` as follows:
```bash
git clone https://github.com/Deducteam/lambdapi.git
```

Dependencies are described in `lambdapi.opam`. The command `why3
config detect` must be run for Why3 to know the available provers for
the `why3` tactic.

Using Opam, a suitable OCaml environment can be setup as follows:
```bash
cd lambdapi
opam install .
why3 config detect
```

To compile Lambdapi, just run the command `make` in the source directory.
This produces the `_build/install/default/bin/lambdapi` binary.
Use the `--help` option for more information. Other make targets are:

```bash
make # Build lambdapi
make doc # Build the user documentation (avalaible on readthedocs)
make bnf # Build the BNF grammar
make odoc # Build the developer documentation
make install # Install lambdapi
make install_emacs_mode # Install emacs mode
make install_vim_mode # Install vim mode
```

You can run `lambdapi` without installing it with `dune exec -- lambdapi`.

For running tests, one also needs
[alcotest](https://github.com/mirage/alcotest) and
[alt-ergo](https://alt-ergo.ocamlpro.com/).

For building the source code documentation, one needs
[odoc](https://github.com/ocaml/odoc). The starting file of the source
code html documentation is
`_build/default/_doc/_html/lambdapi/index.html`.

For building the User Manual, see `doc/README.md`.

The following commands can be used to clean up the repository:
```bash
make clean # Removes files generated by OCaml.
make distclean # Same as clean, but also removes library checking files.
make fullclean # Same as distclean, but also removes downloaded libraries.
```