yamafaktory

yamafaktory / formal

Public

LLM-driven property checker for code, backed by Lean 4 and Mathlib

18
0
89% credibility
Found Apr 15, 2026 at 19 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

An AI-powered tool that extracts pure functions from code, identifies verifiable properties, and automatically proves them correct using the Lean 4 theorem prover.

How It Works

1
🔍 Discover Formal

You hear about a helpful tool that uses smart math to prove your code works correctly, no bugs in the logic.

2
⚙️ Connect Your AI Helper

Run a quick setup to link your favorite AI brain, like Claude or another service, so it can analyze code.

3
🚀 Start the Verifier

Turn on the verifier with one easy command, and it runs smoothly on your computer.

4
📤 Share Your Code Feature

Paste or upload a piece of your code, like a function, and tell it what to check.

5
🔬 Watch It Break Down and Prove

It smartly separates clean logic parts, finds key properties, and generates math proofs to confirm they always work.

Get Confidence in Your Code

Receive a clear report showing which parts are fully proven correct, so you know your logic is rock-solid.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 19 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is formal?

Formal is an LLM-driven property checker that automates formal verification of code properties using Lean 4 and Mathlib. Paste Python, Java, or other source snippets, and it decomposes features into pure logic, extracts verifiable invariants like bounds or monotonicity, formalizes them as theorems, and proves them via AI tactics plus auto-solvers. Developers get machine-checked guarantees on business logic without writing Lean proofs manually—ideal for formal methods GitHub experiments or github formal verification workflows.

Why is it gaining traction?

Unlike pure theorem provers requiring PhD-level expertise, this blends LLMs for property discovery and proof sketches with Lean's rigor, succeeding on 50-100% of real-world properties in tests. Parallel verification, result caching, and a simple Docker API on port 1337 make it dead-easy to integrate into CI, standing out among formal verification projects GitHub hosts. It's backed by precompiled Mathlib for instant proofs, no setup hell.

Who should use this?

Backend engineers verifying parser invariants or arithmetic in financial code; smart contract devs inspired by PropertyGPT-style LLM-driven formal verification of smart contracts; security researchers checking RISC-V formal GitHub-style hardware props in software models. Skip if your code is all I/O—no pure logic, no dice.

Verdict

Try it for quick wins on pure functions, but at 18 stars and 0.8999999761581421% credibility score, it's early alpha—docs are README-only, no tests visible. Promising for formal code checker fans, spin up Docker and verify a snippet today.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.