Backbuild Prove
Mathematical proof that your code is correct: not testing, not linting, proof. Write proof annotations in your documentation comments, verify against a server-side HOL kernel, and ship with cryptographically signed certificates.
Backbuild Prove is coming soon. It includes the HOL kernel and IDE extension; either Backbuild Prove or Backbuild Science on its own unlocks them. Only Backbuild Prove adds the automatic red-squiggle diagnostics in your editor and the full code-analysis engine described below. Join the waitlist and we’ll let you know the moment it’s live.
AI Agents Write Code Fast. They Don’t Write It Right.
Every developer using AI coding agents knows the pattern: the agent generates code that looks plausible, you run it, something breaks. You paste the error back into the chat. The agent “fixes” it and breaks something else. Three rounds later you’re debugging the agent’s output line by line, wondering if it would have been faster to write it yourself.
AI agents go in loops. They can’t identify the issues they’re creating. They fix one bug and introduce two more. They pass the tests they were designed to pass and silently ship logic errors, security vulnerabilities, and contract violations into production. And you, the human, are stuck babysitting every generation pass with follow-up prompts to fix all the issues.
What if the agent could know its code was wrong before you did? What if every function had a mathematical contract that the agent had to satisfy, and the IDE told the agent immediately, with precise diagnostics, when it violated one? No loops. No babysitting. No follow-up prompts.
Backbuild Prove: A Feedback Loop That Keeps AI Honest
Backbuild Prove adds a formal verification layer to your development workflow.
AI coding agents write proof annotations in your documentation comments using
the pf2 proof format; the system teaches them how by
providing examples, documentation references, and instructive error messages.
The Prove IDE extension verifies those annotations automatically against a
server-side HOL (higher-order logic) proof kernel, and returns precise
diagnostics as inline red squiggles, just like type errors.
The AI sees the red squiggles. Reads the error message. Fixes the code. Automatically. No human follow-up prompt needed.
This turns formal verification into an automatic feedback loop that keeps AI agents on track and writing correct code. The agent can’t “hallucinate past” a mathematical proof obligation: either the proof checks out or it doesn’t. The looping stops. The babysitting stops. You get mathematically verified code, written by AI, without the back-and-forth.
Also: Proof for Humans
AI-generated code is the most common use case, but Backbuild Prove works just as well for code written by humans. In safety-critical, financial, cryptographic, and defense systems, “probably correct” isn’t good enough. Testing only covers the inputs you think to try. Formal proof covers all of them.
How It Works
Proof annotations live in your source code comments: block comments in Rust
and C, # comments in Python, -- comments in SQL. The
pf2 format is a structured Lamport-style proof notation using LaTeX
with \begin{pre}, \begin{proof}, and
\step{N} sections that the HOL kernel verifies:
/* prove:pf2("add_safe")
\[
\begin{pre} x > 0 \land y > 0 \end{pre}
\begin{proof}
\step{1}{\text{add\_safe}
= (\lambda\, x\, y.\; x + y)}
\qedstep
\begin{proof} \pf\ By \stepref{1}. \end{proof}
\end{proof}
\]
*/
fn add(x: u64, y: u64) -> u64 {
x + y
} Rendered proof (what the developer sees in the IDE and printouts):
Install the VS Code extension and verification happens automatically as you work. Every time a file is created or changed, the extension scans for pf2 annotations and verifies them in the background. Failed proofs show up as red squiggles and warnings inline, just like type errors. Verified proofs are cached by content hash so unchanged code is never re-verified.
You can also run backbuild prove run from the CLI for
batch verification, CI pipelines, or scripting.
How Verification Works
- Automatic scanning: the IDE extension (or CLI) finds files with pf2 annotations across 20+ supported languages.
- Background verification: annotated code is sent to the verification service automatically, no manual step required.
- HOL kernel verifies: each theorem is checked against the axiom system from first principles.
- Inline results: failures appear as red squiggles with precise diagnostics. Passes show green status indicators. AI agents see these and self-correct.
- Optional Lean 4 cross-check: the kernel exports its work to Lean 4, rebuilding from first principles in Lean 4’s language for independent verification.
- Signed certificates: verified code can be published with cryptographic attestation, verifiable by anyone.
Who Benefits
AI-Generated Code
Stop babysitting AI agents. Proof obligations act as guardrails that prevent agents from looping, introducing regressions, or shipping hallucinated logic. The agent gets instant feedback and self-corrects without human follow-up prompts.
Safety-Critical Systems
Aerospace, automotive, medical devices, and industrial control systems where failures can endanger lives. Formal proof provides evidence for certification requirements.
Financial Infrastructure
Trading systems, settlement engines, payment processors, and risk engines where a single logic error can mean regulatory penalties or catastrophic financial losses.
Cryptography & Security
Prove cryptographic implementations correct. Verify protocol properties, information flow guarantees, and access control invariants with mathematical certainty.
Defense & Government
Mission-critical systems requiring the highest assurance levels. Formal verification provides mathematical evidence for DO-178C, Common Criteria, and similar standards.
Blockchain & Distributed Systems
Smart contracts, consensus protocols, and distributed algorithms where bugs are irrevocable and every node must agree on correctness.
Quick Start
# Install the CLI
pip install backbuild-cli
# Authenticate
backbuild auth login
# Verify your project
backbuild prove run
# Watch for changes (re-verifies on save)
backbuild prove watch
# Publish a signed certification
backbuild prove publish Mathematical Foundations
The proof system is built on a minimal, auditable foundation: 4 axioms, 10 foundational concepts, and 10 primitive inference rules. Every theorem in the library (thousands of individually proven results across dozens of mathematical domains) is derived from this foundation through legitimate inference alone. After bootstrap, the definition context is permanently sealed. No shortcuts. No unverified assumptions. No back doors.
The 4 Foundational Axioms
After these four axioms are admitted, the entire definition context is permanently sealed. No new axioms, constants, type constructors, or definitions can ever be introduced through any mechanism. All subsequent mathematics must be derived through inference alone.
⊢ (λx. f(x)) = f Functions are determined entirely by their input-output behavior.
⊢ P(x) ⇒ P(@ P) If any witness satisfies a property, the Hilbert choice operator selects one.
⊢ (SUC(x) = SUC(y)) = (x = y) Different numbers have different successors.
⊢ SUC(n) ≠ 0 No natural number’s successor is zero.
20+ Supported Languages
Backbuild Prove verifies proof annotations across all major programming languages. The pf2 annotation format works in documentation comments for any language:
Systems & Native
Rust, C, C++, Objective-C, Go, Swift, Ada
Web & Application
TypeScript, JavaScript, Python, Dart
Enterprise & JVM
Java, Kotlin, C#
Functional & Data
Haskell, SQL, Lua
Low-Level
x86_64 Assembly, ARM64 Assembly, WebAssembly
Lean 4 Cross-Check: A Second Opinion
The HOL kernel verifies your proofs from first principles. But how do you know the kernel itself is correct? Lean 4 cross-checking provides the answer.
After the kernel verifies a proof, it exports its work to Lean 4, rebuilding everything from first principles in Lean 4’s own language. A completely separate math engine (different foundations, different implementation, different team) then verifies semantic equivalence between the HOL and Lean 4 representations, and where possible, full theorem equivalence. This is a genuine second opinion from an independent mathematical system, not just the same engine running twice.
Cross-check results are stored alongside the primary verification and included in signed certificates when available.
Signed Proof Certificates
Every verified codebase can be published with a cryptographically signed proof certificate. The certificate binds verified source files and compiled binaries to their proof results, providing third-party-verifiable attestation that the code has been formally verified.
- Certificates are signed locally; your private key never leaves your machine
- Public verification URLs let anyone independently verify your proofs
- Certificates include file hashes, theorem results, and optional Lean 4 cross-validation status
- Revocation support for compromised or superseded certificates
IDE Linter & VS Code Extension
Backbuild Prove isn’t just a CLI tool; it’s an IDE linter that shows red squiggles, warnings, and errors directly in your editor as you write code. When a file is created or changed, proof obligations are automatically checked and violations appear inline, the same way a type error or lint warning would. AI coding agents working in the editor get this feedback automatically, steering them toward correct code without manual intervention.
The VS Code extension is available on both the VS Code Marketplace and Open VSX, so it works with VS Code, Cursor, Windsurf, and other compatible editors.
- Inline diagnostics with red/yellow squiggles on failed proof obligations
- Configurable severity: show as warnings during development, errors in CI
- Verify-on-save: automatic re-verification when files change
- CodeLens above annotated functions showing verification status
- One-click commands for verify, publish, and view contracts
Pricing
Coming soon. The plans and pricing below are final. Free public verification of signed proof certificates across all 20+ languages means anyone can verify that proven code is correct, at no cost. Proof language tiers determine how many languages you can write and run proofs in. Specialized add-ons available for SQL, Solidity, and CUDA/OpenCL.
Pro: $20/seat/mo
2 proof languages, full theorem library, IDE extension, signed certificates. 3-day free trial.
Team: $60/seat/mo
4 proof languages, team license management, shared verification cache. 3-day free trial.
Business: $140/seat/mo
10 proof languages, Lean 4 cross-check, compliance dashboards, priority support.
Enterprise: $280/seat/mo
All proof languages, audit-ready certificates, priority support, custom contracts.
Annual billing saves 50%. Add-ons: SQL ($10 to $200/mo by tier), Solidity (+$200/mo), CUDA/OpenCL (+$100/mo). See full pricing with add-on details →