AlphaProof Code
A multi-agent AI framework from Google DeepMind for writing Lean specifications and proofs of real software, applied to Signal's libsignal at the machine-code level.
At a Glance
About AlphaProof Code
AlphaProof Code is a multi-agent AI framework from Google DeepMind for formal software specification and verification in Lean. The accompanying repository and reviewers' site contain the Lean specifications, proofs and checks used to verify key security properties of libsignal, the Signal protocol's reference implementation, at the AArch64 machine-code level. The authors report about 6.3 million lines of machine-checked Lean proof code resting on about 27,000 lines of trusted specifications and AArch64 semantics.
What It Is
AlphaProof Code is a framework in which a human user and AI agents collaboratively write Lean specifications of real-world code. Once the user approves a specification, a team of autonomous prover agents proves that the compiled code satisfies it. The repository holds the verification of a command-line harness, libsignal-cli, built from the unmodified libsignal crates with the stock Rust compiler.
How the Workflow Operates
The framework has four components:
- A specification-writing agent drafts Lean theorems and definitions under human guidance, and reviewer agents critique each draft.
- A formal Lean semantics of user-mode AArch64 Linux covers 467 instructions and 32 system calls.
- Prover agents, coordinated by an orchestrator, team leads, architect and integrator roles, synthesize proofs. A team typically had 40 to 80 agents and ran 24 to 72 hours on a single machine.
- A gatekeeper agent accepts a proof only if Lean's kernel checks it and the
comparatortool confirms it proves exactly the approved, held-out specification.
What Is Proved About Signal
The proofs cover Signal's post-quantum PQXDH handshake and Triple Ratchet in two models. The symbolic (Dolev–Yao) proof states ten theorems, including forward secrecy, post-compromise security, authentication, KCI resistance and handshake secrecy. The computational proof bounds an attacker's advantage against message confidentiality and authenticity. The paper lists what is not covered, such as group messaging, multi-device state, and quantum attackers in the computational proof. To test specification strength, the authors re-introduced two historical bugs and built 17 synthetic mutants.
Setup Path
The README describes building with Lean 4 via elan, a pinned Rust toolchain, protoc, LLVM ld.lld and Zig. lake build kernel-checks the proofs, which takes several hours and roughly 15–34 GiB of peak RAM. The comparator check is supported only on Linux.
Collections
Popular collections
- Let Your Agents Talk to Each Other
Collection by @leftchannel
- See What Your Agent Is Doing remix
Collection by @joemseifi
- Let Your AI Read the Document, Not Just the Words
Collection by @priyashah
- Local-First Databases
Collection by @joemseifi
Add AlphaProof Code to one of your collections.
Community Discussions
Be the first to start a conversation about AlphaProof Code
Share your experience with AlphaProof Code, ask questions, or help others learn from your insights.
Pricing
Open Source
Repository code licensed under Apache License 2.0; third-party material keeps its own licenses (e.g., libsignal copies under AGPL-3.0, hashbrown/musl/Rust std under MIT).
- All code licensed under Apache License, Version 2.0
- Third-party material keeps its own license (libsignal-derived files AGPL-3.0; hashbrown, Rust std, musl MIT)
- Self-hosted: build and verify proofs locally with Lean 4
Capabilities
Key Features
- Human-guided agent for writing Lean specifications
- Formal semantics of user-mode AArch64 Linux in Lean
- Team of autonomous prover agents with orchestrator, team leads, architect and integrator roles
- Gatekeeper that accepts proofs only via Lean kernel and comparator checks
- Symbolic and computational security proofs of libsignal's PQXDH and Triple Ratchet
- Specification testing via vacuity checks, historical bug re-injection and synthetic mutants
- Reviewers' site to browse specifications, proofs and checks
