Analysis updated 2026-05-18
Study whether AI self-improvement claims hold up under a rigorous, unforgeable verifier
Compare an LLM-driven code rewriting loop against random parameter mutation
Learn how a formal kernel can ground an AI agent's claims of progress
Reproduce the prime certification experiment with a different proposer model
| byin-cwi/kernel-rsi | trailofbits/scroll-fv | tripp-smith/lean-lfse | |
|---|---|---|---|
| Stars | 0 | — | 0 |
| Language | Lean | Lean | Lean |
| Last pushed | — | 2026-05-14 | — |
| Maintenance | — | Maintained | — |
| Setup difficulty | hard | hard | moderate |
| Complexity | 5/5 | 5/5 | 4/5 |
| Audience | researcher | researcher | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Lean 4 (pure core, no mathlib) plus the Claude Code CLI for the AI-driven condition.
Kernel rsi is an experiment that tests whether an AI coding agent can improve its own code in a way that is actually verified as correct, rather than just claiming to improve. The project asks an AI agent to write a small Python program that proves a number is a prime number, with the proof checked by a separate tool called the Lean kernel. The agent is then allowed to rewrite its own program over and over, each time trying to prove a bigger prime number. The key idea is that nothing here can be faked. Every proof the agent produces is independently rechecked by the Lean kernel, a program that either accepts a proof as valid or rejects it, with no partial credit and no shortcuts allowed. If the agent tries to cheat, its score simply becomes zero. This is different from many AI self improvement experiments, where success is judged by a fixed benchmark score that can sometimes be gamed. Here the target, the digit count of a certified prime, has no upper limit, so there is nothing for the agent to memorize in advance. The experiment compared two approaches over 15 rounds. One let an AI agent read its own code and rewrite it to fix problems it found, and the other made small random changes to settings without any AI involved. Starting from a program that could certify a 128 digit prime, the AI powered version worked its way up to a 4096 digit prime, while the random mutation approach got stuck at 256 digits because it hit a structural limitation in the code that no simple setting could fix. The AI noticed the underlying code problem, rewrote it using a more efficient method, and kept improving from there. The project requires Python and Lean 4, plus the Claude Code command line tool to run the AI powered condition. It includes scripts to verify the checking system itself is trustworthy, run either experimental condition, and regenerate the result charts. The repository is written mostly in Lean and currently has no stars on GitHub. It offers a plain look at how the two conditions behaved round by round, plus an explicit account of what the results do and do not prove about AI self improvement.
An experiment where an AI agent rewrites its own proof-generating code to certify ever-larger prime numbers, verified step by step by the Lean theorem prover.
Mainly Lean. The stack also includes Lean, Python, Lean 4 kernel.
No license information was found in the README.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.