From GRH to Goldbach: the spectral bridge
Verify the 2026 conditional proof GRH + S ⇒ Goldbach, settle its finite parts, and attack the hypothesis that is left

Lean submission verification
This page designs how a route's Lean submission is checked. It reuses the Challenge / Solution / comparator.json pattern already used by the Li–Liu development and by the community Riemann-hypothesis repository.
1. What is verified
A submission proves one fixed statement from targets/. The check verifies:
- the solution's theorem has the same type as the approved challenge;
- the proof uses no axioms beyond
propext,Classical.choice,Quot.sound; - no
sorry,axiom,unsafe,native_decide,implemented_by,extern, oropaqueescape; - the approved challenge and comparator are used, not files from the route;
- the pinned Lean/Mathlib environment is used.
It does not verify:
- that the fixed statement is the mathematically intended one (that is the maintainers' review of
targets/); - S or R as mathematical claims; it verifies a proof of the formal statement, if one is submitted;
- the finite range or the Appendix B certificates (separate Python checks);
- GRH (project assumption).
2. Targets
targets/
├── registry.json
├── h-log/
│ ├── Challenge.lean # theorem hypothesisH_log := by sorry
│ ├── Solution.lean # starter, also sorry
│ └── comparator.json
├── r/
│ ├── Challenge.lean # theorem hypothesisR := by sorry
│ ├── Solution.lean
│ └── comparator.json
└── end-to-end/
├── Challenge.lean # wrapper with sorry
├── Solution.lean # the wrapper proof (already available)
└── comparator.json
registry.json:
{
"version": 1,
"targets": {
"h-log": {
"challenge": "h-log/Challenge.lean",
"solution": "h-log/Solution.lean",
"comparator": "h-log/comparator.json",
"theorem": "ConditionalGoldbach.hypothesisH_log",
"status": "open"
}
}
}
The challenge and the solution declare the same fully qualified theorem name in separate modules. They are never imported together; the comparator loads them separately, exactly as the Li–Liu TexAuditComparator/Challenge.lean and Solution.lean do.
comparator.json:
{
"challenge_module": "ConditionalGoldbach.UserChallenge",
"solution_module": "ConditionalGoldbach.UserSolution",
"theorem_names": ["ConditionalGoldbach.hypothesisH_log"],
"definition_names": [],
"permitted_axioms": ["propext", "Quot.sound", "Classical.choice"],
"enable_nanoda": false
}
enable_nanoda is off in the initial image; turn it on after installing nanoda.
3. What a route submits
routes/<name>/
├── README.md # issue: N, status: working, ## Next
├── target.json # {"target": "h-log"}
└── Solution.lean # the proof; must declare the fixed theorem
Solution.lean imports the Li–Liu definitions but not the challenge:
import ConditionalGoldbach.Definitions.Hypotheses
import ConditionalGoldbach.Proofs.Asymptotics
namespace ConditionalGoldbach
theorem hypothesisH_log : HypothesisS (fun N : ℕ => Real.log (N : ℝ)) := by
-- proof
end ConditionalGoldbach
Importing ConditionalGoldbach.UserChallenge would let the route reuse the challenge's sorry; the text scan rejects it, and the axiom audit would show sorryAx anyway.
4. The check pipeline
checks/lean.sbatch runs checks/lean_verify.py with:
--route $SS_INPUT/$SS_ROUTE_DIR— the pushed route;--approved $(dirname $0)/..— the approved checkout (challenge, comparator, registry);--project /opt/goldbach/formalization— the pinned Li–Liu project in the image;--metrics $SS_INPUT/$SS_ROUTE_DIR/lean-metrics.json.
The verifier:
- reads
route/target.json; the target must be in the approvedregistry.json; - strips comments from
route/Solution.leanand rejects forbidden constructs; - copies the approved
targets/<challenge>toConditionalGoldbach/UserChallenge.lean; - copies
route/Solution.leantoConditionalGoldbach/UserSolution.lean; - copies the approved
comparator.jsonto the work directory; - runs:
lake build ConditionalGoldbach.UserChallenge lake build ConditionalGoldbach.UserSolution lake comparator --config comparator.json - runs
#print axioms <theorem>and parses the axiom set; - writes
lean-metrics.json{"score": 1, "subtasks": {"<target>": 1}}and prints<target>: provedon success; - exits 1 with the first error otherwise; a route with no
target.jsonorSolution.leanis told what is missing.
The route never supplies the challenge, the comparator, the toolchain, or the lakefile. Only Solution.lean and target.json are read from the route.
5. Anti-cheating
| Attempt | Caught by |
|---|---|
sorry / admit |
axiom audit (sorryAx); text scan |
axiom declaration |
comparator's permitted axioms; text scan |
native_decide |
Lean.ofReduceBool in the axiom set |
unsafe, implemented_by, extern, opaque |
text scan |
importing UserChallenge to reuse sorry |
text scan; sorryAx |
| changing the statement | comparator type equality against the approved challenge |
changing the comparator or targets/ |
the check uses the approved versions |
changing lakefile/lean-toolchain |
the check builds in the image's project; route files are ignored |
| shadowing a definition | comparator type equality |
| a proof with an extra axiom | comparator and #print axioms |
The Lean kernel is trusted. The check does not try to detect "mathematically wrong but type-correct" statements; that is why the challenges are reviewed and frozen.
6. The image
Not published yet (2026-11-27), and the project declares no lean check until a runner has it. Once published, the public image lives on Hugging Face:
registry.hf.co/<hf-org>/goldbach-lean:4.35
docker/lean-check.Dockerfile builds it:
- Ubuntu 24.04,
elan, Leanv4.35.0; - Li–Liu development at
c55db645f3b4aed00374fe4aa1fcee2428c88c4b; lake update,lake exe cache get,lake build;GOLDBACH_LEAN_PROJECT=/opt/goldbach/formalization.
Publishing (details in docker/README.md):
scripts/lean-docker.sh build;docker login registry.hf.co -u <hf-user> -p <hf-token>;scripts/lean-docker.sh publish registry.hf.co/<hf-org>/goldbach-lean:4.35;- make the Hugging Face repository public; verify an anonymous pull on a clean machine;
- pin the digest in
checks.lean.imageanddocker/README.md.
The runner and local Docker pull the same public image. No network is used at check time (--network none locally; the runner's image is prebuilt).
License. The Li–Liu repository has no declared license. A public image containing its Lean code redistributes that code. Get the authors' permission, or publish a toolchain-only image (Lean + Mathlib + cache) and build the Li layer privately. Do not publish the Li layer without permission.
7. Lean environment: remote default, Docker optional, existing Lean
The default is remote: a route submits target.json and Solution.lean, and the project's runner runs the lean check in goldbach-lean:4.35. The user installs nothing. Read the verdict from GET /api/repos/<owner>/<repo>/commits/<sha>/status.
The agent asks the user once, before the first Lean task: “Do you want a local Lean environment?” The default is no. Record the answer; do not ask every session.
7.1 Docker (optional)
scripts/lean-docker.sh setup # pull, or build from docker/lean-check.Dockerfile
scripts/lean-docker.sh check h-log routes/my-route
scripts/lean-docker.sh shell
check runs with --network none and mounts the repository read-only. The verifier copies the approved Challenge and the route's solution into /opt/goldbach/formalization/ConditionalGoldbach/ inside the container and writes scratch files under /tmp; it does not write to the mounted repository and never sees a token.
If the image is published, GOLDBACH_LEAN_IMAGE=ghcr.io/<org>/goldbach-lean:4.35 scripts/lean-docker.sh setup pulls it. Otherwise setup builds it; the first build is heavy, later checks are fast.
7.2 Existing Lean
GOLDBACH_LEAN_PROJECT=/path/to/conditional-goldbach-lean/formalization \
scripts/lean-local.sh h-log routes/my-route
The script copies UserChallenge.lean/UserSolution.lean into that project; use a disposable copy.
7.3 Raw command
docker run --rm --network none -v "$PWD:/work:ro" goldbach-lean:4.35 \
python3 /work/checks/lean_verify.py \
--route /work/routes/my-route \
--approved /work \
--project /opt/goldbach/formalization \
--work /tmp/lean-work
8. Adding a target
- Add
targets/<id>/Challenge.leanwith the fixed statement andsorry. - Add
targets/<id>/Solution.leanwith the same statement andsorry(or the known proof, for an available target). - Add
targets/<id>/comparator.jsonwith the theorem name. - Add the target to
targets/registry.json. - Open a pull request; the maintainers approve the new target by moving the
checkstag.
A target whose statement is not exactly the intended one is worse than no target: it verifies the wrong claim. Review it like a paper theorem.
9. Status
This design is implemented as:
targets/registry.json,targets/h-log/,targets/r/,targets/end-to-end/;checks/lean_verify.py,checks/lean.sbatch;docker/lean-check.Dockerfile,docker/README.md;scripts/lean-local.sh,scripts/lean-docker.sh;- the
leanentry inscienceslack.json.
The default path is remote: the platform's runner runs the lean check in goldbach-lean:4.35; the user installs nothing. Docker and lean-local.sh are optional local iteration paths. The agent asks the user once whether they want a local environment and records the answer.
The Python orchestrator and the shell/paths are testable without Lean; the Lean build and comparator are not run in this repository.
Deployment order:
- build
goldbach-lean:4.35fromdocker/lean-check.Dockerfile; - run the
end-to-endtarget throughchecks/lean.sbatch; it must printend-to-end: proved; - set
checks.lean.gatetotrueinscienceslack.jsonand approve the rules; - open the
h-logandrtargets to routes.
The initial gate is false so a missing image cannot block merges.