Skip to content

project-llzk/llzk-lean

Repository files navigation

llzk-lean

⚠️ Experimental — work in progress. This repository is an early prototype exploring how Lean-backed verification can complement LLZK. Schemas, interfaces, and infrastructure are unstable and may change without notice. Not for production use.

Purpose

llzk-lean is a thin cooperation surface between LLZK and VEIR — a Lean 4 formalization of MLIR — demonstrating two non-disruptive ways to raise the assurance of LLZK's Felt dialect:

  • Strategy A — verified-output oracle (observational). A differential harness runs both llzk-opt and veir-opt -p felt-combine against a shared corpus, normalizes their textual output, and asserts agreement. Divergences are either bugs or documented as expected with cited rationale.

  • Strategy E — proof certificates (runtime). VEIR emits JSON certificates that describe each verified rewrite (LHS/RHS shape, side conditions, parity status). A C++ checker validates that LLZK's actual MLIR rewrites conform to the catalog at runtime, keeping Lean and Mathlib out of LLZK's runtime trusted base.

The current proof basis is the clean VEIR commit d899d95004d4bd988c8456d686c33b11a7a5eb4a, selected from project-llzk/veir branch felt-review-structural-close and pinned through Lake metadata.

Repository contents

LlzkLean/           Lean modules (Cert types, build-time validation)
EmitCerts.lean      JSON certificate emitter
certs/              committed certificate snapshot for regression diffing
checker/            C++ runtime checker + tests (~1000 LoC)
differential/       Strategy A harness + MLIR corpus
docs/               strategy + future-integration documentation

Documentation

The implemented strategies and longer-range integration paths are documented under docs/:

Scope

Current coverage is the LLZK Felt dialect only. Other LLZK dialects are not addressed by this repository.

License

See LICENSE.

About

Lean-backed assurance infrastructure for LLZK's Felt dialect. Differential harness (Strategy A) + proof certificates (Strategy E) bridging LLZK ↔ VEIR's verified rewrites.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors