argumentcomputer / yatima

A zero-knowledge Lean4 compiler and kernel
MIT License
122 stars 9 forks source link

yatima

Yatima is a Lean 4 compiler backend targeting the the Lurk language for recursive zkSNARKs, enabling zero-knowledge proofs of Lean 4 execution. Additionally, Yatima has its own Lean 4 implementation of a kernel for the Lean 4 core language, which can be compiled to Lurk to allow zero-knowledge proofs of Lean 4 typechecking. By verifying a zero knowledge proof that a Lean 4 declaration has passed the typechecker, one can verify that the declaration is type-safe without re-running the typechecker.

Yatima also implements nameless content-addressing for Lean 4, allowing each expression, declaration and environment to receive unique hash identifiers, independent of computationally-irrelevant naming (such as the names of definitions and local variables).

Install

Run lake run setup, which will build the yatima binary and ask you where to place it. You can choose a directory that's already in your path, for example.

Running the setup script will also compile the Yatima typechecker and store it in the FS, under the $HOME/.yatima directory.

Usage

The subcommands planned to be available for the yatima CLI are:

Don't hesitate to call yatima --help for more information.

Constraints: