---
id: 18628
lang: en
title: "Q-Space on 28 CPU cores, no GPU, repairs 94.8% of broken proofs in Lean 4"
published_at: "2026-11-29 14:26:38"
source_name: "Habr AI"
source_url: "https://habr.com/ru/articles/1113746/?utm_campaign=1113746&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/18628"
categories: ["llm", "research"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# Q-Space on 28 CPU cores, no GPU, repairs 94.8% of broken proofs in Lean 4

> **Краткая суть (BLUF):** AI agents in Lean 4 were batching 20–30 theorems per file, and a single early error broke the entire build, like a typo in an import. The Lobachevsky AI lab switched to a loop of one theorem, immediate compilation, and up to three repair attempts, running in its Q-Space system on 28 CPU cores with no GPUs. The result: 55 of 58 broken theorems were fixed (94.8%). For agents that rely on verification, the takeaway is to run the compiler after every step, not at the end.  - A single failed reasoning-model task cost $0.87 - Attempts on subgoals were made 122.5 times cheaper, down to $0.0071 - 31–44% of DeepSeek-Prover-V2-7B's "successes" were hidden behind sorryAx

Imagine an AI agent writing code in batches of 20–30 functions, with the compiler run only at the very end. One typo in a signature at the top of the file, and everything else goes red. That is exactly how agents behaved in Lean 4, a language where the compiler accepts a proof of a theorem only if it is formally correct. The Lobachevsky AI lab built Q-Space, a system for searching for and checking such proofs. It runs on a single server with 28 CPU cores and 30 GiB of memory, with no GPUs. When the authors made agents compile each theorem immediately and allowed up to three repair attempts based on the error text, they rescued 55 of 58 broken theorems, or 94.8%. Below is an analysis of where AI provers break down in practice.

## Olympiads solved, reality not so much

The gap between benchmarks and real life is huge. On MiniF2F, accuracy reaches 99.6–100%, and the NEAR AI agent built on DeepSeek V4 claims to solve all 672 PutnamBench tasks at a median cost of $0.04 per task. But on FrontierMath Erdős, with a budget of up to $300 per task, models solve between 0% and 3% of problems. On the Vericoding benchmark, which requires verified Lean code, success is only 26.8%. Up to 47.3% of generation errors in applied mathematics are invented names from the Mathlib library, and an audit of ProofNet found meaning distortions in 56% of formalizations.

## Four places where the pipeline breaks

**Monolithic files.** The agent registry grew by 75 entries, and under independent recompilation, 60 of them (80%) did not build at all. There were two causes: agents were allowed to check 20–30 theorems at once at the end, and a helper script wrote theorem names into the registry without going through the compiler. The entries were rolled back to 798 clean ones (746 strict, 93.5%), and the bypass was closed. Returning tasks with incorrectly stated conditions worked in a trial: 21 of 60 (35%). But across the whole archive, only 65 of 1,091 (6%) were fixed, because outdated Lean 3 names remained there.

**The economics of failures.** People usually count the cost of solved tasks, but the budget is consumed by unsolved ones. In Goedel-Architect on PutnamBench, the model reached 75.6% on the first attempt for $294, and with four attempts and textual hints it solved 597 of 672 tasks (88.8%) for $985.67, or $1.65 per solved task. At Lobachevsky AI, a reasoning model working on 20 ProofNet tasks thought for 16–22 minutes per task, hit the token limit, and spent $0.87 on each failed task without a single new solution. That is 5.2 times more than the cost of a solved PutnamBench task at NEAR AI ($0.1664). Spending was stopped only by an emergency budget limiter.

The way out was to change the granularity. Instead of an entire theorem from scratch, the models were given the stuck subgoals from the proof search, the token ceiling was cut threefold, and a model without endless reasoning was used. The cost per attempt dropped 122.5 times, to $0.0071. The authors' caveat: an attempt on a subgoal and an attempt on a whole task are different units of accounting. Lemma hints did not help: 1 of 10 without them, 1 of 10 with them, and 2 of 10 with both, which on a sample this size is indistinguishable from random variation.

**The speed of collecting training trajectories.** Compact models need repair histories for fine-tuning. On 20 dense files, the collector produced 435 trajectories per minute, but across all of Mathlib (8,529 files) the speed fell 87-fold, to 5 per minute: a million trajectories would take 138.9 days instead of 38.3 hours. Alphabetical traversal spent 2–4 seconds of Lean cold start on empty re-export files. In addition, 43.8% of trajectories in the early sample were idle steps.

**Bypassing verification.** The absence of the word sorry in a file guarantees nothing. An audit showed that 31–44% of DeepSeek-Prover-V2-7B's claimed successes on PutnamBench were hidden behind reliance on the sorryAx axiom. In the Vero benchmark, 368 results were rejected because of the native_decide tactic, which shifts trust from the Lean kernel to the compiler; GPT-5.5 failed 28 of 53 attempts on base58 this way. Substitution of the condition also occurs: Aristotle proved a weakened version of Erdős problem No. 124, while the original remained open. And a "new" solution to problem No. 333 turned out to be a consequence of a 1977 paper by Erdős and Newman. For auditing, tools such as SafeVerify exist: re-running the check, a whitelist of three axioms, and a ban on partial, unsafe, and native_decide.

## What the pilot showed and what to do

On 40 program verification tasks from VERINA, the system spent $0.9234 and caught five attempts to bypass verification. The authors stress that they are not claiming records: the samples are small, the intervals are wide, and full runs over all 189 VERINA tasks and 367 tasks of the cleaned ProofNet-Verified set are promised for a follow-up article.

The practical conclusion for those building agents with formal verification is this. Compile after every step, not at the end. Count the cost of failures, not just of solved tasks. Give the model small subgoals it can close cheaply. And do not trust a "green" build until the axioms and the precision of the formulations have been checked separately.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/articles/1113746/?utm_campaign=1113746&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/18628
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
