Lean circuit DSL
See the code
clean is an embedded Lean DSL for writing zk circuits, targeting popular arithmetizations like AIR, PLONK and R1CS.
Check out the Clean Website for more information
The clean framework is developed by zkSecurity, currently funded by the Verified-zkEVM grant.
The Clean website explains how anyone can get started with Clean.
If you have questions, or want to contribute, please join our Public Telegram group t.me/clean_zk. We are happy to answer any questions or just discuss!
We love contributors! Check out our good first issues.
Follow official instructions to install elan (the package manager) and Lean4.
Clone this repo, and test that everything works by building:
lake build
After that, we recommend open the repo in VSCode to get immediate inline feedback from the compiler while writing theorems.
Make sure to install the lean4 extension for VSCode!
We are actively working on creating proper documentation for clean.
In the meantime, we recommend checking out our AI-generated DeepWiki.
⚠️ Disclaimer: The wiki may contain inaccuracies or outdated details. Please take all information with a grain of salt until the official documentation is released.
We follow standard Lean/Mathlib conventions with some local variations. See doc/conventions.md for details.
Some heuristics for finding proofs are in doc/proving-guide.md.
The following is a rough, longer-term roadmap for clean. Note that some of the bullets below could be multi-month projects!
Reach out on TG if you are looking for long-term contribution opportunities and you are interested in any of these!
circuit_proof_start should handle vectors and general ProvableTypescircuit_proof_start could detect subcircuits to unfold (in the right places)localLength_eq, subcircuitsConsistent etcThe Lean name and logo are trademarks of Lean FRO.
Lean
93.9%
Rust
4.2%
Python
1.3%
Lean circuit DSL
See the code
clean is an embedded Lean DSL for writing zk circuits, targeting popular arithmetizations like AIR, PLONK and R1CS.
Check out the Clean Website for more information
The clean framework is developed by zkSecurity, currently funded by the Verified-zkEVM grant.
The Clean website explains how anyone can get started with Clean.
If you have questions, or want to contribute, please join our Public Telegram group t.me/clean_zk. We are happy to answer any questions or just discuss!
We love contributors! Check out our good first issues.
Follow official instructions to install elan (the package manager) and Lean4.
Clone this repo, and test that everything works by building:
lake build
After that, we recommend open the repo in VSCode to get immediate inline feedback from the compiler while writing theorems.
Make sure to install the lean4 extension for VSCode!
We are actively working on creating proper documentation for clean.
In the meantime, we recommend checking out our AI-generated DeepWiki.
⚠️ Disclaimer: The wiki may contain inaccuracies or outdated details. Please take all information with a grain of salt until the official documentation is released.
We follow standard Lean/Mathlib conventions with some local variations. See doc/conventions.md for details.
Some heuristics for finding proofs are in doc/proving-guide.md.
The following is a rough, longer-term roadmap for clean. Note that some of the bullets below could be multi-month projects!
Reach out on TG if you are looking for long-term contribution opportunities and you are interested in any of these!
circuit_proof_start should handle vectors and general ProvableTypescircuit_proof_start could detect subcircuits to unfold (in the right places)localLength_eq, subcircuitsConsistent etcThe Lean name and logo are trademarks of Lean FRO.
Lean
93.9%
Rust
4.2%
Python
1.3%