Inner agent
Reads the current goals and proposes the next proof step.
Shannon Prover automates proof construction across Phases II and III. Earlier Shannon workflows proved individual lemmas supplied by a human. Shannon can now also propose and revise the decomposition of the security argument. You still provide the formal security model and theorem in Phase I.
A coordinator agent develops the security argument and delegates proof tasks to other agents within Shannon Prover, called inner agents. An inner agent returns either a checked proof or feedback about what remains unresolved. The coordinator uses those results to refine the argument and assign further tasks.
Choose intermediate games and lemmas, and delegate proof tasks at different levels of detail to the inner agents.
Proving and feedback — repeat as needed
Work on the assigned task in EasyCrypt. Return a checked proof, or feedback explaining the remaining obstacles, to the coordinator.
Incorporate proved results, use feedback to revise games or auxiliary lemmas, and delegate the next tasks.
For example, feedback from a game-hop proof may prompt a stronger auxiliary lemma and a new proof attempt. This exchange is what we mean by interleaved.
EasyCrypt checks the complete development from start to finish, including the final theorem.
Follow the project-level proving guide to prepare a project and interpret the results. The proof browser below shows individual lemma attempts, not a complete interleaved run.
Given a lemma, an EasyCrypt proof is a sequence of tactics that transforms its current goal until no obligations remain. Here is a complete four-tactic example from the public MEE-CBC development in this repository.
local lemma DQ_Sample_Compute_pr &m:
Pr[INDR_CPA_direct(CBC_Oracle(DoubleQuery(Sample)),A).main() @ &m:
DoubleQuery.bad] =
Pr[INDR_CPA_direct(Compute,A).main() @ &m : Compute.bad]
proof. byequiv=> //=. proc; call (_: ={bad,qs}(DoubleQuery,Compute)). by conseq DQ_Sample_Compute_eq. by inline *; auto.qed.
byequiv=> //=.pre = …
INDR_CPA_direct(…, A).main
~ INDR_CPA_direct(Compute, A).main
post = DoubleQuery.bad{1} = Compute.bad{2}by inline *; auto.No more goalsThe proof is shown exactly from proof. to qed..
The numbered highlights match the EasyCrypt goals shown after those steps.
In the first goal, … abbreviates the precondition and a module argument for readability.
Each inner agent works on a proof task assigned by the coordinator, using the interface below to interact with EasyCrypt. For each lemma, it sees what EasyCrypt still needs to prove, tries a proof step, and reads the resulting goals or error. It can continue, undo a step, or try another approach.
Reads the current goals and proposes the next proof step.
Keeps track of the proof attempt, passes steps to EasyCrypt, and helps the agent use the available declarations and tactic syntax.
Executes tactics and returns the resulting goal or error. Only checker-accepted steps enter the proof.
The agent can consult the allowed EasyCrypt source declarations as it works. EasyCrypt remains responsible for interpreting and checking the mathematics. Before a result is accepted, the proof is checked again independently of the interactive attempt.
Choose how much of the argument you want Shannon Prover to construct. Both workflows use EasyCrypt, but they have different inputs and launch commands.
You need macOS or Linux, Git, opam, Python ≥ 3.12, uv, and the agent CLIs you select. For project-level proving, the defaults use Claude Code for the overall argument and Codex for auxiliary lemmas, with their stored Claude and ChatGPT OAuth logins. Steps 1–2 install the shared tools; steps 3–4 launch a Phase II + III proof.
git clone https://github.com/SkyShannonProver/shannon-prover.git
cd shannon-prover
uv sync
Shannon Prover is locked to EasyCrypt r2026.06. The bootstrap command
creates and verifies the repository-managed opam root and switch:
uv run python tools/bootstrap_easycrypt.py
uv run python tools/bootstrap_easycrypt.py --verify-only
Python entry points select this environment automatically; no ambient opam switch is required.
Create one directory under projects/ with your security model,
final theorem, and local dependencies. Leave the target theorem's proof unfinished.
Add interleaved_project.json using the
project setup guide, then commit these files so the checkout is clean.
projects/
my-proof/
Target.ec
Dependency.ec
interleaved_project.json
From a terminal at the repository root, first check the setup without starting a proof-generating model:
uv run python -m workflow.interleaved \
--project projects/my-proof/interleaved_project.json \
--preflight-only
Once these pass, start the proof attempt:
uv run python -m workflow.interleaved \
--project projects/my-proof/interleaved_project.json
This run works toward the final theorem named in your configuration and constructs
the auxiliary lemmas it needs. To use Codex in both roles, add
--outer-provider codex --inner-provider codex to both commands.
status: "proved" and final_verification_passed: true in
manifest.json. A verified auxiliary lemma alone is not the final theorem.After the shared installation in steps 1–2, put your EasyCrypt file and local
dependencies under projects/, leaving the selected lemma's proof unfinished.
Open Codex or Claude Code from the repository root and enter one of these commands
inside that agent:
# In Codex
$prove my_lemma
# In Claude Code
/prove my_lemma
Replace my_lemma with the declaration's name. These commands target that
one lemma; they do not launch the Phase II + III project workflow or require
interleaved_project.json. The generated proof is written back only after
EasyCrypt verification succeeds.
See the single-lemma proving guide for an example.
Phase III: write the EasyCrypt proof of a lemma you have already stated.
Phases II + III: construct the security argument and its EasyCrypt proofs together.
Explore cryptographic proof developments and recorded agent runs.