Electrolysis
Simple verification of Rust programs via functional purification in Lean 2(!)
Install / Use
/learn @Kha/ElectrolysisREADME
electrolysis
About
A tool for formally verifying Rust programs by transpiling them into definitions in the Lean theorem prover.
- Masters thesis: Simple Verification of Rust Programs via Functional Purification - thesis|presentation
- Official reference and coverage
- Blog post: A Formal Verification of Rust's Binary Search Implementation
Installation
Because electrolysis uses rustc's unstable private API, you need a nightly compiler. Because the API is highly unstable, you need a very specific nightly version, for which you should use rustup.rs. After installing rustup, you can build this project by executing
electrolysis$ rustup override add $(cat rust-nightly-version)
electrolysis$ rustup component add rust-src
electrolysis$ cargo run core
This will build the project and export all code from the core crate necessary for binary_search (see also thys/core/config.toml) into thys/core/generated.lean (this file already exists in case you just want to examine the correctness proof).
Related Skills
node-connect
347.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
