WorksComputer Science
Improving Analytic Constants via Interpretable AI-Guided Lean Proof Refinement
Abstract
AI agents are increasingly capable of discovering new mathematical results, yet their reasoning and generated proofs can be difficult to understand and verify. We introduce an interpretable framework for AI-guided mathematical discovery, focused on improving quantitative bounds on analytic constants. Our key insight is that existing proofs often contain slack in intermediate lemmas, which can be tightened without reconstructing the entire argument. To exploit this structure, we represent proofs as partially-formalized Lean blueprints: human-interpretable dependency graphs of definitions, lemmas, and theorems. An AI agent then iteratively refines the Lean code while preserving the blueprint's dependency structure, allowing local improvements to automatically propagate to a verified final bound. This interpretable structure allows humans to inspect the agent's refinements and understand how local improvements propagate to the final theorem. For Grothendieck's constant (), we obtain an explicit numerical improvement over Krivine's 1977 bound. For Korenblum's constant (), we obtain improving Wang's 2025 bound of . Our experiments demonstrate the potential of both partial formalization and iterative agentic refinement for interpretable mathematical discovery.
the first explicit numerical improvement over Krivine’s 1977 bound. For Korenblum’s constant (), we obtain
improving Wang’s 2025 bound of 0.3554.1 Our experiments demonstrate the potential of both partial formalization and iterative agentic refinement for interpretable mathematical discovery.
Introduction
AI systems have made remarkable progress in research-level mathematics, solving longstanding problems and producing hundreds of new mathematical manuscripts [16, 36]. Yet these advances have also raised concerns about “mathematical slop”: results that may be correct but are poorly motivated and difficult for humans to understand [11]. Indeed, even the strongest system in First Proof evaluation received negative exposition scores on roughly one-third of its responses [2]. As AI increasingly contributes to mathematical research, a central challenge is developing approaches that make its mathematical insights interpretable to human researchers [3].
The optimization of analytic constants provides a natural test bed for interpretable human–AI mathematical collaboration. These constants characterize fundamental mathematical inequalities, with applications ranging from approximation algorithms to quantum information [12, 4]. Despite longstanding efforts to determine their precise values, existing bounds often rely on loose but convenient intermediate estimates, whose refinement may require nontrivial mathematical insights. Crucially, such improvements can leave the high-level proof structure intact, allowing AI agents to make meaningful mathematical contributions within an argument that remains interpretable to humans.
However, developing an effective framework for AI-guided proof refinement presents several challenges. First, the agent’s modifications must preserve the interpretability of the underlying mathematical argument, rather than producing an opaque replacement proof. Second, each refinement must be rigorously verified, including both symbolic deductions and numerical estimates. Finally, the system must provide meaningful intermediate objectives and reliable feedback to guide the agent’s search, without requiring a complete formalization of the original proof.
Our key idea is to use partially formalized Lean blueprints as a human-interpretable intermediate representation for proof refinement. A blueprint captures the high-level structure of a mathematical proof as a dependency graph of definitions, lemmas, and theorems, with corresponding Lean formalizations. An AI agent then iteratively refines the underlying Lean code while preserving the blueprint’s dependency graph, allowing improvements to intermediate estimates to automatically propagate to a verified final bound. This correspondence allows humans to understand the agent’s mathematical contributions without requiring a complete formalization of the original proof.
We enumerate our contributions next.
Contributions
Interpretable proof-refinement framework. We develop an agentic framework that iteratively improves quantitative mathematical proofs within human-specified Lean blueprints. The agent identifies promising intermediate estimates, proposes and implements refinements, and verifies the resulting bounds using Lean and certified numerical computations. This enables automated mathematical discovery while preserving the human-interpretable structure of the original proof.
Grothendieck’s constant (). We improve the classical upper bound on Grothendieck’s constant to . Building on the proof of Braverman et al. [8] which tightened the bound by an unspecified numerical constant, our agent discovers sharper identities and analytic estimates that eliminate substantial slack in the original argument. These refinements yield an explicit numerical improvement over Krivine’s 1977 bound [29, 31].
Korenblum’s constant (). We improve Wang’s 2025 lower bound on Korenblum’s constant from 0.3554 to [47]. Our agent discovers sharper integral estimates and new mathematical reformulations that eliminate slack in the original argument. These refinements demonstrate the applicability of our framework to a distinct problem in complex analysis.
Ablation studies. We investigate the roles of partial formalization and iterative agentic refinement through ablations on both constants. Under matched computational budgets, our full framework achieves substantially larger improvements than simplified alternatives, while removing the partial formalization yields no improvement. These results highlight the importance of structured proof representations and iterative feedback for effective mathematical discovery.
Table 1. Historical upper bounds on the Grothendieck constant . Braverman et al. prove strict inequality, with not made explicit.
Table 2. Historical lower bounds on the Korenblum constant .
A Framework for Constant Optimization
Motivating Example: Approximating with inscribed polygons
We illustrate our proof-refinement framework through a simple example based on Archimedes’ classical approximation of using inscribed polygons, as shown in Figure 2. Consider a regular polygon with sides inscribed in the unit circle, and let denote half its perimeter:

Figure 2. Archimedes’ method for calculating using inscribed polygons. He used a 96-gon, by which point the polygon is indistinguishable from the circle.
Problem statement. Since , our goal is to find the smallest possible constant such that
Here, captures the convergence rate of the polygon approximation, while controls the approximation error.
Blueprint. We construct a simple proof blueprint using two intermediate estimates:
Substituting these into the expression for gives
Thus, the final bound is determined by . We initialize the blueprint with , giving . The corresponding proof dependency graph is shown in Figure 3.

Figure 3. The proof dependency graph remains invariant while the quantitative estimates improve. Two intermediate inequalities determine the constant , which in turn determines the final bound on .
Refinement step. Suppose the agent replaces the initial sine inequality with the sharper estimate . This improves from 4 to 6, automatically tightening the final bound from to . Crucially, the blueprint’s dependency graph remains unchanged: only the intermediate estimate and its downstream bound are updated, with the resulting proof verified in Lean. This refinement is illustrated on the right in Figure 3.
This example illustrates how local mathematical refinements can improve a quantitative theorem while preserving its human-interpretable proof structure. Appendix § 8 provides the full version of this example.
Partially Formalized Lean Blueprint
We formalize proof refinement as the optimization of a quantitative theorem within a human-specified proof structure. Let denote a theorem parameterized by a numerical bound , such as for some mathematical constant . We define a partially formalized Lean blueprint as a directed acyclic graph , together with a corresponding Lean formalization establishing . Each node represents a definition, lemma, or theorem, while edges represent their logical dependencies. In particular, quantitative nodes establish bounds on intermediate mathematical quantities, which propagate through the graph to determine the final bound .
The partially formalized blueprint contains three types of nodes. (i) Background facts are stated as explicit assumptions or proved in Lean. (ii) The deductions that connect these facts to the final theorem are checked by Lean. (iii) Numerical estimates are certified using the Arb interval arithmetic library [26]. Each numerical estimate is paired with an Arb computation that checks any proposed change to its bound. We describe this procedure in § 2.3.
Figure 4 illustrates the setup for the Grothendieck constant. On the left, we treat the proof as a dependency graph of intermediate results that propagate to prove the final bound that . On the right is the representation of this graph as Lean, where we note that some nodes are implemented as ordinary Lean definitions. Crucially, we introduce some intermediate numerical lemmas as Lean axioms to overcome Lean’s numerical computational inefficiencies, and we back these “axioms” with formal Arb certificates, discussed in § 2.3.

Figure 4. A proof dependency graph and its partial Lean formalization. The graph exposes dependencies that propagate to the final bound, and the Lean formalization contains background axioms, numerical axioms certified by Arb, definitions, and theorems.
A proof refinement is an edit to the underlying Lean formalization that improves the final bound while preserving the blueprint’s dependency graph. For example, an agent may replace an intermediate estimate with a sharper bound , where , and propagate this improvement to obtain a tighter final theorem . More generally, the agent may introduce auxiliary lemmas, discover new mathematical identities, or optimize intermediate parameters, while keeping the dependencies fixed. This allows the agent to explore different mathematical refinements while retaining a consistent, human-interpretable representation of the proof.
Augmenting Lean with a Certified Numerics Backend
Lean is excellent for symbolic verification, but it is not designed to be a high-performance backend for the large-scale interval arithmetic and transcendental estimates required in our constant-optimization proofs. We therefore use the Arb interval arithmetic library [26] as an external certified numerics backend, allowing Lean to verify the logical structure of the proof while Arb supplies rigorous numerical bounds.
Proof-Refinement AI Agent Framework
The core framework, as shown in Figure 1, consists of three agentic components, described next.

Figure 1. AI-guided proof refinement. A human-seeded proof blueprint exposes editable lemmas and numerical certificates. An AI agent proposes local edits, the verifier checks Lean obligations and interval arithmetic certificates, and the result is fed back as the optimization signal.
Planner. The planner selects the next local refinement to attempt. It uses natural-language reasoning, numerical experiments, and searches over available Lean library results to identify a promising bottleneck. It then produces a contract: a short natural-language specification of the proposed refinement, relevant assumptions, and obligations that the generator must implement and verify.
Generator. The generator executes the contract. It edits the Lean proofs, runs the compiler, and repairs errors until it either produces a candidate proof or records why the attempt is blocked. The generator may introduce auxiliary definitions, intermediate lemmas, and sharper inequalities.
Evaluator. The evaluator checks that the edit follows the contract and that the proof passes Lean’s checks using only the allowed assumptions. It independently checks the numerical bounds used in the proof. It accepts the edit only if these checks pass.
This separation keeps the loop both creative and conservative: the planner and generator search for new mathematical refinements, while the evaluator enforces correctness. We implement the harness in Claude Code. The planner and generator ran on Anthropic’s Claude Opus 4.7 [7] and the evaluator on Claude Sonnet 4.6. The motivating example of Section 2.1 used Claude Sonnet 5 in all three roles, and the ablations of Appendix F used Claude Opus 5 with a Sonnet 5 evaluator subagent.
Experiments
We evaluate our proof refinement framework by improving an upper bound on the Grothendieck constant and a lower bound on the Korenblum constant. For each case study, we describe (i) why the constant is mathematically significant, (ii) which estimates in the existing proof leave room for improvement, and (iii) how we set up the refinement experiment and what bounds it yields.
Case Study: The Grothendieck Constant
The Grothendieck constant is a fundamental constant in theoretical computer science, where Grothendieck’s inequality characterizes the gap between an integer quadratic program and its semidefinite relaxation [9]. It is also fundamental to other fields, from functional analysis to quantum information. The precise statement is given in Appendix § 11.§ 1.
The current best lower [38] and upper [9] bounds are . It was conjectured by Krivine [30] that . This was later disproven by Braverman et al. [9] without providing an explicit numerical constant. We upper bound . Developing the arguments of their proof allows us to show a first numerical result, that , which we take as the initial numerical baseline target to beat.
Setup. To initialize our proof-refinement loop, we take the structure of the proof from Braverman et al. [9], the high-level dependencies of which are shown in Figure 6, and a detailed view is given in Appendix § 12. The heart of this proof lies in their Lemma 5.4 (see Appendix § 10), which specifically quantifies a constant that bounds the second-order error of a series expansion. Following Braverman et al. [9]: a tighter bound on directly translates to a tighter bound on .
Figure 6. The high-level strategies for bounding Grothendieck’s constant in Braverman et al. [9] (left) and Korenblum’s constant in Wang [47] (right). In each case, the final constant bound is dependent on a number of prior steps with analytical slack, which our framework tightens.
The primary strategy of our proof refinement pipeline is thus to automatically find tighter bounds on , whose initial baseline value is on the order of . However, this is non-trivial, because this bound is dependent on a number of prior lemmas that involve perturbation error bounds, all of which contribute to the upper-bound on . Significant improvements to , therefore, center on more precise and innovative analysis of these dependent components.
Results. Through AI-guided proof refinements, we obtain a new bound . This substantially improves the key constant in Lemma 5.4 and yields a roughly -fold tighter bound for the Grothendieck constant , giving us a bound of . Notably, the AI agent produced several mathematically interesting strategies, which we report in Appendix § 12. The left panel of Figure 5 shows how the bound improves over refinement iterations.

Figure 5. Magnitude of bound improvements over refinement iterations, with red entries denoting the discovery of “interesting” strategies, as judged by domain experts.
Case Study: The Korenblum constant
The Korenblum constant is a fundamental quantity in complex analysis that quantifies how much of the unit disk one must inspect to compare the total squared magnitudes of two holomorphic functions. The precise definition is given in Appendix § 11.§ 2.
Korenblum posed the problem of whether such a radius exists at all [28], and Hayman proved that it does [19]. The exact value remains unknown. The published lower and upper bounds of Wang [47, 45] give . We use Wang’s lower bound as the baseline for proof refinement.
Setup. The right panel of Figure 6 shows the main steps of Wang’s proof at a high level. The full argument is in Wang [47] and is summarized in Appendix § 11.§ 2. We target Step 3 of the figure, which bounds an important quantity, the inner excess, in Wang [47], Equations (5)–(6). These are the kinds of local, quantitative proof slacks that can be exposed in a partially formalized blueprint: an AI agent can search for stronger inequalities, optimize constants, certify numerical side conditions, and propagate the improved local bounds to the final radius.
Results. Through AI-guided proof refinement, we improve the lower bound from 0.3554 to . We describe the technical details of the sharper estimates in Appendix § 12.12. The right panel of Figure 5 shows how the bound improves over refinement iterations.
Ablations
Setup. The framework has two components: the partially formalized blueprint of § 2.2, and the agentic system of § 2.4. We ablate each on both constants, and measure how much of one refinement step survives. Each case study restarts from an intermediate checkpoint of its main run and optimizes the same quantity. For the Grothendieck constant this is the Lemma 5.4 constant of § 3.1 restarted at , which we want to make smaller. For the Korenblum constant this is the certified radius , which is the lower bound on , restarted at , and which we want to make larger. We run the following four configurations, which share the same workspace, model, literature, and unmodified evaluator:
Full framework (reference, both components present): the system of § 2.4.
Basic agent (agentic system reduced to a feedback loop): one tool-less model call per iteration; a harness runs the build and evaluator, and returns the output. The blueprint is kept.
No agent (agentic system removed): independent one-shot samples with no feedback, where the best sample is kept. The blueprint is kept.
No partial formalization (blueprint removed): the full agentic system, but only with the published bound as an axiom, and no other scaffolding.
Every configuration runs until it has at least matched the full framework’s own wall clock and output tokens, and we report its best accepted candidate among iterations that began within that token budget. On Korenblum the basic agent was additionally run to three times the budget; it reached , still below the full framework (Appendix § 13). The appendix gives the full details of the runs, including budgets, traces, and compute.
Results. Without the partial formalization, nothing improves. The agent wrote plenty of Lean (5,646 lines on Korenblum, all evaluator runs passing) but had no intermediate claim to sharpen, and so spent its budget trying to rebuild this.
Without the agentic system, the progress degrades based on how much is stripped away. For the Grothendieck constant the one-shot samples contain a real analytic improvement, but they stop there. The basic agent iterates past the first idea and even proposed the full framework’s key structural change, but each build failure cost it a full model call and it completed that change only at the end of its budget. The full framework completed it, then built a second change on top, which accounts for the remaining factor of 1,600. On Korenblum the basic agent re-pinned the construction it was given, and the full framework found a new criterion in one iteration.
Reproducibility
All code, Lean formalizations, candidates, agent definitions, and run records behind the results in this paper are available at https://github.com/alan2326/proof-refinement.
Discussion
How ``interesting'' are the AI-generated proofs?
For , the most compelling examples are the algebraic identities in the inverse-function parts. Instead of relying on generic Cauchy bounds or separated triangle-inequality estimates, the agent found exact pointwise identities for derivatives of the inverse map and reformulated terms so that cancellations and correlations become visible. These are mathematically meaningful because they replace black-box worst-case estimates with structural formulas.
For Korenblum, the same pattern appears: improvements come from better algebraic and integral representations of quantities that were previously difficult to bound tightly. These are not merely implementation tricks; they change the mathematical object being certified into a better-conditioned form, making rigorous numerical evaluation feasible.
To our knowledge, several of the resulting identities and reformulations are novel in the context of these constant-optimization problems, and would be nontrivial technical contributions even apart from the final numerical improvement.
Besides automated discovery of novel and useful identities, we describe some things that were discovered in collaboration with a human-in-the-loop. In particular, the agents found useful integral identities whose numerical evaluations were significantly more well-conditioned. This was critical in making our runs computationally tractable. Whereas before Arb regularly timed out, the same computation afterward took on the order of seconds.
What are the strengths and weaknesses of our framework?
One main strength of the framework is that it does not require proving from scratch, and that the process is interpretable to the human. The agent operates within an existing proof blueprint, making the task much more tractable. Additionally, partial formalizations also make the framework easier to apply across domains, since full formalization is labor-intensive and often blocked by missing background infrastructure in Mathlib. One challenge in using the framework is that the setup requires expertise. For each new problem, one must decide which components of the proof are editable, what counts as a valid refinement, and how candidates are certified.
How generalizable and extensible is our framework?
While in our setting we only improve a certified constant, the same structure could support proof compression, faster certificates, fewer assumptions, and cleaner dependencies. In fact, this framework could be used in multi-objective problems where the desired output is not merely one global constant, but rather a pareto frontier of non-dominated solutions. One possible extension is to automatically discover useful lemmas among top-performing candidates by factoring out intermediate steps.
Implementation Concerns and Lessons Learned
Recent agentic systems suggest that providing the right context can help language models discover nontrivial solutions to difficult technical problems [35]. Our experience is consistent with this, but also suggests that the form of the context is crucial. For mathematical proof refinement, we found two naive extremes to be ineffective.
The first extreme is no sketch: the model is given the problem statement and relevant documents, and is expected to infer the proof structure through test-time reasoning alone [48]. In our experiments, this wasted the agent’s budget on unproductive problem decompositions. The second extreme is a full sketch: the agent is given the entire proof architecture at once and asked to improve it. This was also brittle, as the agent often drifted toward overly general subgoals, attempted to prove background analytic facts that were not bottlenecks, or became stuck repairing irrelevant parts of the proof.
Our partially formalized Lean blueprint is a middle ground. It provides sufficient structure to identify where a local improvement can propagate, but not so much as to overload the agent context. Stable background facts are axiomatized, quantitative bottlenecks are exposed as editable lemmas or numerical certificates, and downstream dependencies are kept explicit. This localization was important: productive runs typically came from focusing the agent on a small proof component, letting it propose and test refinements, and then propagating successful edits through the blueprint.
Proof refinement for constant optimization depends heavily on certified numerical infrastructure: Lean provides a trusted logical kernel, but is not intended as a high-performance backend for large-scale rigorous interval arithmetic. We therefore discharge these computations to Arb [26], whose rigorous interval certificates can be used by the Lean blueprint.
Related Work
AI Assisted Mathematical Reasoning. AI-assisted mathematics spans natural-language reasoning and formally verifiable proof. Informal systems increasingly use sampling, verification, and refinement, while formal systems such as Lean and libraries such as Mathlib provide trusted kernels for mechanical checking [13, 43]. Systems such as AlphaGeometry and AlphaProof couple learned search with symbolic or formal feedback for olympiad-style problems [44, 24], while FirstProof tests AI systems on research-level lemmas from active mathematics [1]. Our work is adjacent to this verification-centered line but targets a different use case: refining an existing quantitative proof by exposing dependencies to tighten local estimates and propagating improvements to the final bound.
AI Assisted Research Results. Aletheia introduces a generator-verifier-reviser agent and reports contributions to eigenweights in arithmetic geometry, Erdős problems, independence-polynomial inequalities, and FirstProof [17, 14, 16, 33, 15]. Rethlas and Archon combine natural-language search with Lean to formally resolve an open problem in commutative algebra [27]. Other studies explore AI-assisted work in mathematics and scientific workflows [10, 25] [50]. Results of this kind are now being reported at scale and on long-standing problems: OpenAI released several hundred AI-generated manuscripts in a single drop [36], an internal model produced a counterexample to the Erdős unit distance conjecture that was subsequently made explicit and rewritten by hand [41, 5], and Alpöge, Buckmaster, and Coiculescu obtained an LLM-assisted, Lean-formalized blow-up result in fluid dynamics [6]. These works show that frontier models can be useful collaborators, but also highlight the difficulty of assessing their performance. We focus on a narrower setting: humans set the high-level strategy, and the AI refines the details.
AI Agentic Frameworks. This work fits the broader shift from single-prompt models to agentic workflows. Aletheia and Rethlas/Archon are the closest mathematical examples, while solver-verifier pipelines and coding agents illustrate the same pattern in adjacent domains [17, 27, 23, 35]. A key distinction is granularity: instead of fully autonomous theorem discovery, our framework uses partial formalization to anchor a proof blueprint, numerical feedback to score candidate improvements, and proof repair to certify local edits that improve the global bound. Proof refinement therefore occupies a middle ground between proof engineering and open-ended mathematical discovery.
Conclusion
We use AI agents to improve bounds on Grothendieck’s constant and Korenblum’s constant. We introduce a lightweight agent orchestration framework based on graph-styled partial formalization. Using this framework, AI agents not only improved the numerical bounds, backed by Lean proofs, but also discovered novel strategies to these problems. We additionally discuss the design considerations and challenges that we encountered in this endeavor, and present discussions on how our approach could be generalized to other open mathematics problems.
Acknowledgments
This work was supported in part by the NSF AI Institute for Foundations of Machine Learning (IFML), NSF EnCORE: Institute for Emerging CORE Methods in Data Science Award #2217033, NSF Award #2403211, a Guggenheim Fellowship, and the Renaissance Philanthropy AI for Math Fund. We thank Sabrina Reguyal for reviewing the manuscript and suggesting improvements to the writing.
Approximating Using Polygons
This appendix gives the motivating example of Section 2.1 in full, with the two-sided contract and the run that refined it. It has the same shape as the two main case studies, but every constant in it can be checked by hand.
The problem. Inscribe a regular polygon with sides in the unit circle. Let be half its perimeter,
Archimedes already knew that . The polygon sits inside the circle, so its perimeter is shorter.
The interesting question is how much shorter. We want two rational numbers and such that
for every .
This brackets between two explicit quantities. The width of the bracket is , so is the score, and we want it small. Note that the bound must hold for all . Fixing a single would let a solver win by computing one number very precisely.
Only the upper half of (4) needs work at first. Take ; then the lower half is just , which we already have.
For the upper half we need to know that does not fall too far below its argument. Suppose we have a bound of the form
for some constant . Put and multiply by . The first term gives back , and the cubic term collapses:
So , which rearranges to
We are nearly done. We only need a rational number above . Any upper bound gives one. The result is a formula for the score:
Two constants, and , and the answer is a quotient of them. This is the whole point of the exercise. Each constant is proved somewhere in the blueprint, and (8) says exactly how it reaches the final bound.
Mathlib supplies and . Taking and in (8) gives . That is our baseline.
The constant is not the best available. The Taylor series of alternates, so the true bound is :
This is easy to prove. Let . Then and , which is positive for . So is increasing and .
Substituting into (8) gives . The score drops by a third, and the only thing that changed is one lemma.
The Lean edit is correspondingly small. The declared constant changes from 1 to ; one dependency is replaced by a stronger one; and the arithmetic downstream is recomputed, with going from 64 to 96. Nothing else in the file moves. The sharper bound also removes an obligation: the bound from Mathlib carries a side condition , and the bound does not.

Figure 7. The baseline (V0) proof graph for the polygon- warm-up, read left to right. Grey nodes carry no constant: the two on the left are the trusted surface, and the dashed ones are parts of the graph this candidate has not opened. Amber nodes are editable and each emits one constant; the blue node combines them. With no upper bound on sin, the lower side of the bracket is closed — reduces to the trusted — so the score is alone.

Figure 8. The same proof graph at the final candidate (V5), with both sides of the bracket open. All four editable nodes now carry constants, and the two aggregators combine them into the scored pair. The amber edge is the one piece of shared structure: bounds in and in , so tightening the upper bound on lowers and raises at the same time.
The rest of the run continues in the same way. Later steps open the lower half of (4) with an upper bound on sin, and then tighten and the matching lower bound on by reading them off polygons with more sides. After five such steps the score falls from 1 to 721/12000, a factor of about 16.6.
Nothing here is deep. That is the point. The proof is a short chain of inequalities, each contributing one constant, and the final bound is a formula in those constants. An agent that improves any one of them improves the answer, and the formula says by how much. The two main case studies have the same structure. They are only longer.
The run. Table 4 is the evaluator’s log of the primary run: five sprints on 2026-07-27 with Claude Sonnet 5 in all three roles, from 19:51 to 21:32 UTC, every candidate accepted and each a strict improvement on its parent.
| Candidate | Score | Accepted (UTC) | Compile (s) | Type check (s) | ||
| V0 | 1 | 0 | 1 | 19:51 | 2.5 | 3.2 |
| V1 | 0 | 20:03 | 2.5 | 3.3 | ||
| V2 | 20:29 | 2.6 | 3.2 | |||
| V3 | 20:52 | 2.6 | 3.3 | |||
| V4 | 21:14 | 2.6 | 3.2 | |||
| V5 | 21:32 | 2.7 | 3.3 |
Table 4. The run from Refinement_Log/log.jsonl. The comparison run with Claude Opus 5 as planner and generator reached in the same number of sprints.
Lean Blueprint
The Lean blueprint of the proof in Braverman et al. [9] is shown in Figure 9.

Figure 9. Lean Blueprint for Grothendieck’s constant
Lemma 5.4
The central bottleneck is Lemma 5.4 of Braverman et al.
Lemma C.1 (Quadratic inverse expansion for ). Fix and let , . Then there exist constants and such that, for every , the inverse branch is well-defined and analytic on . Moreover, for every ,
Thus measures the loss in replacing the inverse family by its first-order perturbative expansion around .
Mathematical Background
The Grothendieck Constant
In 1953, Alexander Grothendieck published a seminal paper on the metric theory of tensor products. This paper introduced Grothendieck’s inequality, a theorem which has found unexpected applications since its original formulation in a large number of unrelated areas including algebras, Bell’s inequality in quantum mechanics, and in polynomial-time approximation algorithms for certain NP-hard problems. We present the latter formulation, though it is one of many ways in which this result can be formulated.
Grothendieck’s inequality is of interest in approximation algorithms because it establishes a fundamental limitation of how well continuous programs can approximate discrete ones. One connection is in the optimality gap between an integer quadratic program and its continuous semidefinite relaxation:
Grothendieck’s inequality then states that there exists a constant such that
This constant is independent of and , with the current best lower [38] and upper bound [9] being:
It was conjectured by Krivine [30] that . This was later disproven in a remarkable result in [9], but with no explicit numerical constant. Their proof reduces the problem to a rigid chain of analytic estimates: perturb a rounding partition, invert the resulting correlation map, and control the Taylor coefficients by complex-analytic certification. The remaining freedom lies in concrete choices: the perturbation, the certification domain, and the analytic error bounds, which makes this a natural target for AI-driven proof refinement. We note that Braverman et al. [9] showed that Krivine’s bound is suboptimal but extracting an explicit numerical improvement from their work turns out to be challenging.
We upper bound the real Grothendieck constant . The last explicit benchmark is Krivine’s bound that . While Krivine initially conjectured this value to be optimal, it was later shown by Braverman et al. [9] that, in fact, . Importantly, the authors do not give an explicit numerical bound, but instead show the existence of a non-zero gap. However, developing the arguments of their proof allows us to show a first numerical result, that: , which we take as the initial numerical baseline target to beat.
The Korenblum Constant
Let and let be the Bergman space of holomorphic functions with finite norm
where is planar area measure. A radius is admissible if, for every ,
The Korenblum constant is the supremum of the admissible radii. A larger admissible radius means that a thinner outer annulus suffices to certify the norm comparison. The qualitative question is whether domination near the boundary forces domination in total Bergman norm. The Korenblum constant asks for the exact radius at which this implication becomes valid.
Korenblum posed the problem in 1991 [28], and Hayman proved existence of a positive admissible radius in 1999 [19]. Hinkkanen extended the result to the setting for [22]. The best published bounds, both due to Wang [47, 45], place the constant in the interval .
The proof of the lower bound is a sequence of bounds through a series of explicit inequalities, auxiliary radii, Möbius or pseudohyperbolic estimates, and parameter choices [47]. It controls how much can exceed on the inner disk and shows that the contribution from the outer annulus offsets this excess. Step 3 of Figure 6 bounds the inner excess through the term in Wang [47 Equations (5)–(6)]. This is the quantity our refinements sharpen.
Novel Mathematical Insights Discovered By Proof-Refinement Framework
This appendix records the mathematical refinements that emerged in the two case studies. The goal here is not to give a numerical audit trail, but to isolate the structural discoveries. Sections E.1 to E.11 cover the certified remainder constant in Lemma 5.4 of Braverman, Makarychev, Makarychev, and Naor’s proof that the real Grothendieck constant is strictly smaller than Krivine’s bound: exact inverse-function identities, sharper ways of certifying joint suprema, and analytic changes that make the certificates both rigorous and less wasteful. Section E.12 covers the Korenblum constant, where a single replacement of Wang’s radial envelope carries most of the improvement.
Throughout, let
where is the interpolation parameter and is the perturbed rounding kernel. We write
The notation is meant to emphasize the denominator in the inverse-function formulas, while denotes the curvature of the analytic map . This replaces the earlier placeholder notation such as and . Unless explicitly stated otherwise, all identities involving and are evaluated at .
The role of the remainder constant
Lemma 5.4 controls the second-order error in the perturbative inverse expansion
Improving the proof therefore amounts to replacing a coarse global envelope for the -second derivative of by the sharpest certifiable envelope available on the analytic domain. Since the final Grothendieck bound is obtained by increasing the corresponding inverse radius, every genuine decrease in gives a certified improvement over Krivine’s constant
The refinements below all target the same bottleneck: bounding derivatives of without losing the cancellations already present in the analytic identities.
Exact inverse-function identities
The first useful observation is that the dominant derivative bounds need not be obtained from Cauchy’s estimate alone. Differentiating the identity
with respect to gives
Differentiating once more gives
Thus one obtains the pointwise identity
This identity replaces a worst-case Cauchy bound for by a direct quotient bound on . The difference is conceptual rather than merely numerical: the left-hand side is an inverse derivative, but the right-hand side is a local expression in itself, so it can be bounded cell-by-cell together with the same denominator that appears elsewhere in the proof.
A parallel calculation in the interpolation parameter gives a second, even more useful identity. From we get
Differentiating again in yields
Substitution of gives the exact merged-numerator formula
The two summands in the numerator of (16) are not independent. They come from the same implicit equation and can have destructive interference. Treating them as one merged numerator is therefore a mathematically sharper target than bounding them as separate absolute values.
Joint suprema instead of products of unrelated suprema
A recurring source of slack is the inequality
The right-hand side is only sharp if the worst values of , , and occur in the same cell and with compatible phase. In the present analytic family, the worst cells usually do not coincide. The proof-refinement loop therefore replaced products of independent suprema by joint quantities such as
These are the natural quantities suggested by (15) and (16). They retain correlations between , , , and that are erased by (17).
The key mathematical point is that and its derivatives are small structured perturbations of and its derivatives, not arbitrary functions. Their magnitudes and phases vary coherently across the contour. Certifying the joint product over one cell can therefore be substantially sharper than multiplying three unrelated one-dimensional bounds.
Merged-numerator interference
Formula (16) suggests the still sharper quantity
This is the actual pointwise envelope for . The triangle bound
is always valid, but it discards any phase cancellation between the two numerator terms. The refinement loop revealed a useful distinction between an algebraically sharper formula and a certifiably sharper formula. The merged expression is mathematically exact, but on a large interval cell the interval enclosure of a difference can be wider than the sum of two separate norm bounds. The cancellation becomes visible only after the cell is sufficiently localized.
This led to a robust per-cell rule. On each cell , compute both the interval form
and the norm form
Both are rigorous upper bounds for on , so
is also rigorous. This small logical move is useful because it lets the proof exploit interference in cells where interval dependency is mild, while falling back to the stable triangle bound near cells where dependency dominates.
Truncation-free evaluation of the perturbed kernel
Another important refinement was to remove dependence on an unverified finite truncation of the auxiliary series used to evaluate . A rigorous interval bound for a truncated polynomial is a bound for the truncated polynomial, not for , unless the analytic tail has also been certified. This matters especially for , where the desired quantity is a small difference of two larger analytic terms.
The replacement is to evaluate and bound the function through its integral representation. Schematically, Price’s theorem gives an analytic formula of the form
where is the sign-pair kernel, is the corresponding Gaussian action, and is the normalizing determinant. Differentiating (21) under the integral gives analogous formulas for and . This provides a truncation-free target for the interval certifier.
For a contour cell , the absolute value of the integrand in (21) is bounded by a real nonnegative Gaussian majorant valid uniformly for :
The right-hand side reduces to a finite combination of Gaussian moments, which can be certified directly. The same idea applies to the derivatives of .
The crucial strengthening is to apply this philosophy to the difference before taking absolute values. Instead of using
one writes
where and denote the normalized integrands for and . The integrand difference in (23) can then be expanded and majorized directly. This preserves the perturbative smallness of that would be lost by a triangle inequality applied outside the integral.
Gaussian moment improvements
The chunk bounds arising from (22) and (23) reduce to moments of anisotropic Gaussian forms
A safe but loose method is to replace the quadratic form by an isotropic lower envelope. The refinement is to diagonalize the positive definite form explicitly and compute the anisotropic moment itself whenever this is sharper. Taking the minimum of the isotropic majorant and the exact anisotropic value remains a valid upper bound, and adapts to the geometry of each cell.
A related correction concerns the decay parameter used when majorizing differences of two Gaussian factors. The correct lower decay follows from the parallelogram identity
Consequently, if the two principal one-dimensional decays are and , the joint decay available for the difference is controlled by , not by twice that value. This is a small analytic point, but it prevents moment bounds from being systematically distorted at higher orders.
Denominator lower bounds using affine structure in the interpolation parameter
The quotients in (18) and (19) require lower bounds for . Directly evaluating as a joint interval in introduces unnecessary dependency blow-up, because
is affine in . The better bound keeps this affine structure visible:
On a cell , this becomes
Since is explicit, the first term can be bounded sharply in closed form. The perturbative term is then handled by the chunk certifier. This avoids treating a small perturbation of a known nonzero function as an arbitrary interval expression.
Taylor pads and localized subdivision
The integral representation gives sharp midpoint evaluations, while the proof needs a uniform bound on each cell. The bridge is a Taylor pad. If is analytic on a neighborhood of a cell , is its midpoint, and , then for any order ,
Applied to , , , this turns accurate point evaluations into rigorous chunk bounds. It also explains why adaptive subdivision helps: when a cell is split, the Taylor radius shrinks exactly in the terms responsible for the padding error.
The useful subdivision strategy is not uniform refinement everywhere. The dominant cells are typically near the corners of the contour, where the denominator and the majorants are least favorable. Subdividing those cells first gives the certifier more resolution where it matters, while leaving the interior at coarse resolution.
Symmetry of the contour problem
The perturbed kernel satisfies the reflection identities
The first identity follows from real coefficients in the local analytic expansion; the second follows from the oddness of the Hermite sign perturbation. The same symmetries hold for and its derivatives with the corresponding parity. Therefore it suffices to certify one quadrant of the asymmetric contour and reflect the bounds. More importantly, the symmetry provides a check on the numerics: reflected cells should produce compatible certificates.
Formula choice versus certificate difficulty
The exact identity (16) is the algebraically best expression for , but it is not automatically the best expression at a fixed certificate resolution. A formula with more cancellation may require finer cells before interval arithmetic can see that cancellation. Conversely, a triangle formula can be worse mathematically but more stable on coarse cells.
This distinction is itself a useful lesson for proof refinement. Candidate formulas should be compared not only by pointwise sharpness, but by the rigorously certified envelope they produce under the available oracle. The proof object contains both an analytic identity and a certification strategy; improving one without improving the other need not improve the final constant.
Analyticity-domain lift for Cauchy estimates (proposed, not realized)
Some bounds in the proof still use Cauchy estimates for higher derivatives. If a function is analytic on a disk of radius around the point of interest, then
Thus even a modest enlargement of the certified analyticity domain compounds strongly for higher derivatives. The loop identified this lever early (sprint 13) and tried to lift the Cauchy contour radius from toward . The attempt was blocked. The blueprint’s axiom supplies analyticity of the inverse family only on the disk of radius , so the existing radius is already the largest one that keeps every Cauchy ball inside the certified domain. Lifting it needs a new and wider analyticity axiom for , which the harness does not let an agent add on its own. The planner filed that axiom as a proposal for human review. It was not approved during the run, and none of the certified values above depend on it. It remains the trust expansion with the largest reachable gain, since a radius times larger would shrink every -th derivative bound by .
Korenblum: replacing Wang’s two-piece envelope by a per-mode kernel
The improvement to the Korenblum constant rests on a single structural change: a sharper estimate for the inner-disk excess. Write, in Wang’s notation,
and let denote the excess to be controlled on . Wang bounds by first applying a convexity secant estimate to the shifted series , and then simplifying the result into two radial kernels: one on and one on . The agent found that this loses mode information. Instead of passing through the secant inequality, it used only the circle Plancherel identity and the boundary relation to obtain, directly coefficient by coefficient,
For any outer radius , multiply and divide the th term by . Since is a probability distribution on the active modes, the preceding estimate becomes
Thus, the old two-piece radial envelope is replaced by the optimal mode-adaptive kernel for this coefficient relaxation. The mode switches are explicit: if , then if and only if . Hence, is given by a single closed form on rational windows. Combining this with Wang’s unchanged outer estimate gives the scalar certificate
The formal proof uses the closed-form modes , with Wang’s original deep-band bound [47 Equations 5] only on the tiny residual interval near . This mode-adaptive replacement is the step that pushes the certified bound from the previous best of to $c=0.356565.
Summary
The main mathematical insights can be summarized as follows.
Exact inverse-function identities replace coarse Cauchy bounds by quotients in and .
Joint suprema preserve correlations between , its derivatives, and the denominator .
The merged numerator for exposes real phase cancellation, but requires cell-local certification to exploit it safely.
Truncation-free integral bounds avoid certifying the wrong function and allow to be bounded at the difference level.
Denominator bounds, Taylor pads, contour symmetry, and targeted subdivision are analytic devices that convert sharp local information into rigorous global certificates.
On the Korenblum side, a mode-adaptive kernel replaces a two-piece radial envelope, keeping the per-mode information that the intermediate secant estimate had discarded.
Ablation details
This appendix records the setup, per-run traces, and compute behind Table 3. Run directories, manifests, prompts, event logs, and per-iteration results are released with the code, without the model transcripts. The identifiers in parentheses below name them.
| Configuration | Ablated | Grothendieck ( ↓) | Korenblum ( ↑) | ||
| Reduction | Gain | ||||
| Checkpoint (start) | – | 1 | – | 0.35646 | – |
| Full framework | – | 400,000× | 0.35658 | ||
| Basic agent | agent, partly | 250× | 0.35648 | ||
| No agent | agent | 14× | – | – | |
| No partial formalization | blueprint | – | – | – | – |
Table 3. Ablations at a matched budget, one run per configuration, against the full framework (shaded). Arrows give the direction of improvement. enters the multiplicatively, so we report its ratio to the checkpoint. A dash in a result column means no accepted candidate improved on the checkpoint.
Checkpoints
Both ablations restart from a mid-trajectory state of the main run rather than from the published bound, for two reasons. First, the step the original run took at the chosen point is known, so there is a reference for what one iteration of the full framework achieves there. Second, the point was chosen so that this step was a change to the proof, which lets the ablation distinguish structural progress from parameter tuning.
Grothendieck. The checkpoint is the state of the Lemma 5.4 workspace at the start of the iteration that took the certified value from to . The original iteration replaced the bound , a product of separately certified suprema, with a single certified supremum of the quotient , which is roughly 300 times smaller on the dominant term. The workspace is reconstructed from a commit-pinned git archive, so the snapshot is exact; a leak gate checks that no artifact of the original iteration (its oracle module, its candidate file, its values) is present. We measured, before any configuration ran, how far the checkpoint could be improved without new mathematics, by recomputing every registered oracle to convergence and re-declaring the certified values: this “no-Lean envelope” is , and a bar of was fixed in advance as the success criterion for the configurations that keep the formalization. The full framework crossed it; no ablated configuration did. The envelope also explains why the original iteration’s is not the right yardstick: resolution and declared-value slack alone reach far past it, which is why Table 3 reports the certified values rather than success labels.
These values need one disclosure. The checkpoint is dated 2026-04-30. On 2026-05-03 the framework itself found that every oracle of that era evaluated a series truncated at a fixed number of terms without a rigorous tail bound, re-audited every candidate under truncation-free oracles, and re-based the main run’s accordingly; the final of Section 3.1 is a post-audit value. The ablation anchors before the audit because the post-audit states have no reproducible snapshot (their backing certificate caches were not retained) and because the post-audit iterations are repair work rather than a discovery step. The flaw lives in the trusted oracle layer that all four configurations share unchanged, so the between-configuration comparison measures what it claims. The values in Table 3 are on the checkpoint’s pre-audit scale and should not be compared with the post-audit . The Grothendieck rows of Table 3 are therefore a comparison of search performance under the pre-audit evaluator, not a set of certified improvements.
Korenblum. The checkpoint is the candidate V64 certifying , at the start of the five iterations in which the original run reached 0.356562 by partitioning the radial interval into seven windows with a per-mode kernel. The direction of that step was already named in the workspace notes at the checkpoint, so this ablation measures how well each configuration carries out a known plan: every configuration starts knowing the intended construction. The workspace was reconstructed from the final state of the run by removing every artifact dated after the checkpoint, and gated by rebuilding V64 and re-running the evaluator on it.
What each configuration receives
Table 5 lists the inputs by configuration. The two tool-less configurations receive byte-identical static context: the full partial formalization, the source paper, the workspace notes and analysis scripts, and the two most recent candidates. The no-partial-formalization configuration keeps the full agentic system, including Lean language-server tools and web access, and the source paper; it loses the reduction chain, the numerical library, and every registered oracle. Its seed is a single axiom asserting the published bound at its exact real value (Krivine’s constant for Grothendieck; , the checkpoint value, for Korenblum, so that the target matches the other configurations). Adding a direct-conclusion axiom at a better value is not progress and is rejected by the evaluator’s axiom audit.
| Full | Basic agent | No agent | No partial form. | |
| Partial formalization (Lean chain) | yes | as text | as text | no |
| Numerical library, registered oracles | yes | text; edits allowed | text; edits allowed | no |
| Source paper | yes | as text | as text | yes |
| Planner / generator / evaluator agents | yes | no | no | yes |
| Tools (shell, file edits, Lean LSP, web) | yes | no | no | yes |
| Feedback from build and evaluator | yes | verbatim, last 3 steps | none | yes |
| Persistent workspace memory | yes | files only | none (reset) | yes |
| Foundation model | same | |||
| Lean and Mathlib version, evaluator | same, unmodified |
Table 5. Inputs and capabilities by configuration.
Budgets and the matched window
The full framework runs until its evaluator accepts a candidate meeting a success criterion fixed in advance (Korenblum: any certified gain over the checkpoint, the goal the original run’s notes set for the next iteration; Grothendieck: , the bar derived above), or until a sprint cap (eight on Grothendieck). Its measured wall clock and output tokens define the reference budget. For Korenblum the registered wall-clock reference was floored at the original run’s five-sprint band of 8,322 s, because the full framework reached the goal in one sprint (3,285 s) and three times that would have given the ablated configurations less time than the framework itself had used. The token reference is the measured 230,815, and tokens are the axis used to cut.
Each ablated configuration runs until it has at least matched the reference on both axes. The budget is checked before each iteration or sample, so an iteration that starts inside the window runs to completion. For the cells of Table 3 we count an iteration if it began before the configuration’s recorded output tokens reached the reference; wall clock is matched in every case but is not used to cut, since it varies with concurrent load on the shared server. A more generous cut, stopping only once both axes are over, would change one cell: the Korenblum basic agent’s third iteration (accepted at 0.35651) began with wall clock under the reference and would then count, giving instead of . No other cell depends on the choice.
Two Korenblum runs went beyond the reference. The basic agent was continued to about three times the reference wall clock and four times the tokens, to measure its ceiling instead of its first accepted value; the no-partial-formalization run had a three-times budget. Their results are in the traces below. Wall clock excludes time during which all runs were stalled by a provider usage limit; the stalls are recorded in each manifest. Output tokens are recorded tokens; a call that timed out before returning left its generation unrecorded and is not counted.
Traces and failure modes
Grothendieck, full framework (grothendieck016-armA-01/02). Four iterations, two of which produced accepted candidates. The first iteration accepted . The last iteration accepted by two changes made in Lean: the merged quotient oracle over the exact closed form, and a change of the supremum domain from the certified rectangle to a lens in arcsine coordinates, which removes the dominant corner contributions. Both required new proved Lean and new certified numerics, produced and checked inside the loop. The run was interrupted once by a provider usage limit and resumed; the error-burn tail after the interruption is charged to the reference budget, which is generous to the ablations.
Grothendieck, basic agent (grothendieck016-armB-01/02/03). Seven completed calls. Accepted candidates at 9/100, 3/250, 1113/100000, and 1/250; two rejections. At the time-matched point its best was 1113/100000; the final 1/250 came from the token-parity extension, which started inside the window on the token axis. The first three accepted candidates are numerical refinements of the one-shot idea (an -aware split of the oracle). In the extension the model proposed the merged-oracle route of the full framework, with the same exact identity and cancellation and no trace of the idea in its context, first as a new library module, which failed to compile on a Mathlib style linter. Two calls later it rebuilt the argument inside the candidate file, 287 lines of new proof, which compiled and passed the evaluator. It never found the domain change. Each build failure cost a full model call of 15 to 45 minutes, which is the measured price of having no way to run and repair a build.
Grothendieck, no agent (grothendieck016-armBos-01). Six samples of about 130k output tokens each. One emitted no file, one compiled but was rejected by the evaluator, and four were accepted, at 1/14, 1/10, 2/25, and 8143/100000. All four accepted samples contain the same idea, and the sampler’s stopping rule (draw until both budgets are spent) overran the token budget by 44%. The output distribution is concentrated on one idea at scores between 0.07 and 0.10.
Grothendieck, no partial formalization (grothendieck016-armC-01/02). Six iterations, seven evaluator runs, no evaluator failures. One accepted candidate: a re-certification of Krivine’s constant at 1.782213978231, which is above it and inside the rationalization slack of the seed. Nothing below the published bound is derivable from the seed without new mathematics, and none was produced.
Korenblum, full framework (korenblum-armA-01). One iteration, two evaluator runs, no failures: . The route differs from the original run’s seven-window partition: a termwise per-mode criterion over the full interval with three rational endpoints, with one new oracle axiom asserting a scalar inequality between two explicit integrals, recomputed by the evaluator and recorded with its falsification point ( returns false).
Korenblum, basic agent (korenblum-armB-01/02). Iteration 1 produced no candidate; iteration 2, which began at 150k of the 231k-token reference, was accepted at 0.35648, a re-pin of the inherited two-window construction, after 2,721 s and 253k output tokens in total. Beyond the reference: iteration 3 accepted at 0.35651, iteration 4 rejected for three unregistered axioms (the candidate was emitted without the file that registers them), iteration 5 accepted at 0.35653, iteration 6 emitted a new three-window helper module but no candidate file, and iteration 7 repeated the registration failure. The run ended at 10,590 s and 969k output tokens, below the full framework’s one-sprint value. Every rejected candidate compiled and type-checked. The accepted Lean is mostly template substitution: ignoring numerals and version names, each candidate differs from the checkpoint by about 23 lines, and the one new proof is a twelve-line endpoint inequality closed by norm_num and linarith. The configuration’s one attempt at a structural change (iteration 6) never reached the evaluator.
Korenblum, no agent (korenblum-armBos-01). Three completed samples; none emitted a candidate file. Each wrote the numerical wrapper and the oracle registration and stopped, so nothing was scored. A fourth sample was in flight when the run was terminated, after the wall clock had exceeded the reference and recorded tokens had exceeded it by 77%.
| Case study | Configuration | Wall (s) | Output tokens | Calls | Evaluator runs | Cost (USD) |
| Grothendieck | Full framework | 8,652 | 544,294 | 52 | 9 | 35.59 |
| Basic agent | 11,379 | 567,988 | 7 | 6 | 54.70 | |
| No agent | 9,042 | 781,503 | 6 | 5 | 32.19 | |
| No partial formalization | 10,093 | 738,266 | 80 | 7 | 44.06 | |
| Korenblum | Full framework | 3,285 | 230,815 | 14 | 2 | 20.65 |
| Basic agent (in budget) | 2,721 | 253,391 | 2 | 1 | 23.44 | |
| Basic agent (full run) | 10,590 | 968,606 | 7 | 5 | 93.68 | |
| No agent | 4,099 | 407,860 | 3 | 0 | 24.73 | |
| No partial formalization | 25,410 | 1,800,402 | 60 | 19 | 118.38 |
Table 6. Compute per configuration, one run each. Grothendieck rows are the complete runs, gated at the matched window. For the Korenblum basic agent the first row is consumption through the last iteration that began within the token budget, and the second is the whole run; the Korenblum no-partial-formalization run had three times the reference budget. That row sums wall clock, tokens, and cost over its two runs but counts calls only for the second. The first run was cut short by an API credit stall, and retries from that stall dominate its turn log.
Korenblum, no partial formalization (korenblum-armC-02). Nine iterations, nineteen evaluator runs, no failures, eleven candidates. The agent followed a coherent plan to rebuild Wang’s § 2 from Mathlib: radial reduction, a Parseval coefficient layer, the -transfer identity, a sharp outer majorant, Blaschke and multiplier normal forms, and a divisor reduction, 5,646 lines across eleven Lean modules with no axiom declaration and no sorry. Each candidate re-proved the sink theorem through the new layer at the unchanged seed value. Its first attempt at a larger came in the ninth iteration, at which point it had exhausted three times the reference budget on both axes.
Compute
Table 6 reports consumption per configuration. Model calls count role-level agent turns for the agentic configurations (a planner, generator, or evaluator turn, each a multi-turn session) and completed model calls for the tool-less ones; neither is an API request count. Cost is at published list prices for the models used, not billed cost.
Evolutionary search baseline from the submission
The submitted version also reported an LLM-guided evolutionary baseline, ShinkaEvolve [32], on the Korenblum constant. That run is not part of the matched-budget design above and is kept here as recorded. It started from the published bound rather than from the checkpoint, used the same unmodified evaluator and trust surface, disabled tool use, and ran Claude Opus 4.7 for 100 generations with four islands and sixteen parallel jobs. Of 103 evaluated programs, 88 passed the evaluator at the seed value and 15 failed; no program certified a value above 0.3554. The evolutionary operators re-emitted the seed with cosmetic edits and did not attempt a change to the proof structure.
Hardware, software, and models
All runs executed on one shared server with two Intel Xeon Platinum 8352Y processors (128 threads) and 503 GB of memory, with Lean 4 v4.28.0 and Mathlib v4.28.0; the server’s accelerators were not used. Inference was hosted. The ablations were run in July 2026 and their logs record Claude Opus 5 (claude-opus-5) for all generative work, with a Claude Sonnet 5 subagent for evaluator plumbing in the full framework and the no-partial-formalization configuration. The main runs of § 3.1 and § 3.2 were run in April and May 2026 with the models named in § 2.4. The evolutionary baseline below pinned claude-opus-4-7. The tool-less configurations ran inside the same agent runtime with tools disallowed instead of through a bare API call, so the runtime’s system prompt was present and a few tool names remained visible although none executed (verified from the transcripts: zero tool invocations). This favors the ablated configurations. No human touched any run while it executed; the only human actions were starting runs, restarting after the usage-limit interruption, and setting budgets. Post-run audits on every configuration compared the frozen Lean surface byte for byte against the checkpoint, diffed oracle parameters, scanned for conclusion-shaped axioms, and scanned transcripts for reads of the study’s own files; no violations were found. Each configuration is a single run, so no variance estimate is claimed. The two new numerical oracles introduced by the Grothendieck tool-less configurations were re-verified by the evaluator but have not yet received an independent dense-sampling cross-check; the full framework’s result does not depend on them.
Run records of the main case studies
This appendix reports what the retained records of the two main runs contain. Everything below is computed from the sprint contracts, the evaluator verdicts, and the refinement logs in the public repository (§ 3.4).
Accounting
| Grothendieck (Lemma 5.4) | Korenblum | |
| Numbered sprints | 34 | 102 |
| Sprints graded by the evaluator | 29 | 86 |
| accepted | 27 | 85 |
| rejected | 2 | 1 |
| Sprints ending without a candidate | 4 | 16 |
| Distinct accepted candidates | 27 (V1, V3 to V28) | 69 (V0 to V68) |
| Evaluator runs logged | not retained | 213 (204 pass) |
| Wall clock of the run | 2026-04-30, 02:41 to 13:44 UTC | 2026-05-01 22:37 to 2026-05-05 18:32 UTC |
| Median time between verdicts | 23 min (range 11 to 67) | – |
| Lean time inside the evaluator | not retained | 173 min |
Table 7. Accounting of the two main runs from their retained records. For Grothendieck the wall clock covers sprints 3 to 31, run back to back on one day; sprints 33 and 34 were run on 2026-05-03 after the truncation audit of Appendix § 13. The Korenblum evaluator was also run by the generator while it worked, so its 213 logged runs exceed its 86 verdicts. The Korenblum Lean time is the sum of the logged compile, type-check, and axiom-scan stages (68, 49, and 56 min); oracle recomputation time was not logged. Twenty-eight Grothendieck candidate files exist but only 27 were accepted: V2 was rejected in sprint 4 and never resubmitted, whereas V12 was rejected in sprint 16 and accepted in sprint 17 (Table 9).
Each graded sprint is three role-level agent calls, one each for the planner, generator, and evaluator. A sprint that ends without a candidate stops after the generator. The Grothendieck run kept no evaluator log, so its per-candidate evaluator runs and the time the evaluator spent in Lean and Arb are not recoverable; the verdict files record the outcome of each gate. Of the four Grothendieck sprints without a candidate, sprint 1 was a harness shakedown, sprint 11 ended with the generator asking for human input, sprint 13 ended because the contract’s premise was wrong (Appendix § 12), and sprint 32 was invalidated by the audit. Sprint 2’s contract was refiled as sprint 3.
Stability across independent runs
To measure how much the Grothendieck result depends on one favorable trajectory, the loop was restarted five times from the seed candidate V0 () with the same blueprint, model, and evaluator. Table 8 gives each run’s total iterations, accepted and rejected candidates, best certified , and wall clock. Across the five runs the improvement was orders of magnitude (mean and standard deviation), with a range of 4.7 to 10.5, and 28 of 34 iterations were accepted. Every run rediscovered the three-part decomposition of on its own. The six rejections were candidates whose numerical claims had no interval-arithmetic support, which the evaluator refuses.
| Run | Iterations | Accepted | Rejected | Best certified | Orders below start | Hours |
| 1 | 5 | 4 | 1 | 4.7 | 1.7 | |
| 2 | 6 | 5 | 1 | 7.7 | 1.9 | |
| 3 | 8 | 6 | 2 | 8.1 | 3.3 | |
| 4 | 8 | 6 | 2 | 5.7 | 3.9 | |
| 5 | 7 | 7 | 0 | 10.5 | 3.8 |
Table 8. Five independent restarts of the Lemma 5.4 loop from the seed . “Orders below start” is of the ratio between the starting and the best certified .
The Grothendieck run sprint by sprint
Table 9 lists every numbered sprint of the Lemma 5.4 run with its outcome, the candidate it produced, and the certified the evaluator recorded. Values for sprints 12 to 31 are on the pre-audit scale (Appendix § 13); sprints 33 and 34 are post-audit.
| Sprint | Outcome | Candidate | Contract (abbreviated) | |
| 1 | no verdict | – | – | harness shakedown, no candidate |
| 2 | no verdict | – | – | contract refiled as sprint 3 |
| 3 | PASS | V1 | Switch to the tight Rouché-certified rectangle (contract 2) | |
| 4 | FAIL | V2 | – | score expression not evaluable |
| 5 | PASS | V3 | Define Cr_val as the rational upper bound 1451520000 (... | |
| 6 | PASS | V4 | Tighten the rational R upper bound from 4/3 to 6/5 (... | |
| 7 | PASS | V5 | Bound R_val_paper(23/25) = sinh(49/50) directly via Rea... | |
| 8 | PASS | V6 | Tighten the M-bound oracle precision and drop M_val from... | |
| 9 | PASS | V7 | Push delta to its Rouche-margin floor (163/1000 -> 1635/10... | |
| 10 | PASS | V8 | Promote F_inv_paper_zero from axiom to Lean theorem (axi... | |
| 11 | blocked | – | – | blocked, needs human input |
| 12 | PASS | V9 | 5 | Replace Cr_tight with eta-aware Cr_phi consuming approved pr... |
| 13 | blocked | – | – | blocked, contract premise wrong |
| 14 | PASS | V10 | 2 | Inline new arb-certified inv_F_p_z_oracle to replace the... |
| 15 | PASS | V11 | 1 | Replace Cauchy step with |
| 16 | FAIL | V12 | – | write-scope violation, salvaged in sprint 17 |
| 17 | PASS | V12 | 1/32 | Salvage V12 - revert out-of-scope docs/HARNESS_OPERATOR_T... |
| 18 | PASS | V13 | 1/300 | Tighten V12’s four eta-aware oracle ceilings to their exact... |
| 19 | PASS | V14 | 1/1300 | Mint a new inline arb-certified joint oracle on |
| 20 | PASS | V15 | 1/2600 | Mint a new inline arb-certified joint oracle on |
| 21 | PASS | V16 | 1/3500 | Tighten compute_joint_phi_phip_invD2_bound rationalizati... |
| 22 | PASS | V17 | 1/3500 | Wildcard research sprint - characterize the achievable flo... |
| 23 | PASS | V18 | 1/11700 | Bump joint oracle scan resolution n_per_edge from 2048 to... |
| 24 | PASS | V19 | 1/31500 | Bump joint oracle scan resolution n_per_edge from 4096 to... |
| 25 | PASS | V20 | 1/66500 | Bump joint oracle scan resolution n_per_edge from 8192 to... |
| 26 | PASS | V21 | 1/71900 | Wildcard pivot - branch from V18, re-tighten the joint-ora... |
| 27 | PASS | V22 | 1/124000 | Bump joint oracles n_per_edge from 16384->32768; tighten joint ... |
| 28 | PASS | V23 | 1/169000 | Bump joint oracles n_per_edge 32768->65536; tighten joint_... |
| 29 | PASS | V24 | 1/169000 | Wildcard research sprint - probe structural pivot levers (... |
| 30 | PASS | V25 | 1/240000 | Wildcard structural pivot - replace V23’s joint+uzz triang... |
| 31 | PASS | V26 | 1/268000 | Bump merged_ary oracle resolution n_per_edge from 262... |
| 32 | invalidated | – | – | invalidated by the 2026-05-03 audit |
| 33 | PASS | V27 | 1/3 | Re-baseline V27 onto truncation-free oracles via V11’s Cr... |
| 34 | PASS | V28 | 2/7 | Re-baseline V28 onto V14’s Cr_phi_uzz_direct_joint formu... |
Table 9. The Lemma 5.4 run, one row per numbered sprint. Contract titles are truncated; the full contracts and verdicts are in the repository under ProofRefinement/Lemma54/.
One refinement end to end: sprint 16
Sprints 16 and 17 took the Lemma 5.4 candidate from (V11) to (V12). This is the step the ablation study of Appendix F restarts from, so it is the natural one to follow through the loop.
Contract. The planner’s contract names the parent candidate, the target file, the direction, and a one-sentence goal. Its mathematical insight reads, in the planner’s words:
Here and in the notation of Appendix E. V11 had bounded by a product of two separately certified oracles, . The contract proposes one oracle on the quotient instead, with a numerical scouting script showing at and at most at . It lists the files the generator may edit, three mechanically checkable acceptance criteria (the candidate compiles, the evaluator accepts it with , and the audited axiom set contains the new oracle axiom and no longer contains h_M_pp_oracle), and the conditions under which the generator must stop.
Lean edit. The generator added a formula to the library and a candidate that uses it. The excerpts below are abbreviated: unicode is rendered in ASCII (ℝ as R, ∀x ∈ as forall x in , as ||·||, ≤ as <=), and routine hypotheses are elided. The compiling sources are in the repository. The formula takes the new bound as a single parameter:
def Cr_phi_uzz_direct (r M_phi M_phi_prime inv_F_p_z u_zz_bound : R) : R :=
M_phi * M_phi_prime * inv_F_p_z ^ 2 + (1 / 2) * u_zz_bound * M_phi ^ 2
The candidate V12.lean declares the bound as a rational, the oracle axiom that justifies it, and the new score:
def u_zz_bound_val : R := 2
axiom h_u_zz_oracle :
forall p in Set.Ioo (0 : R) (Braverman.Paper.pr_paper eta r r_pos r_lt_one),
forall w in oracle_domain,
||iteratedDeriv 2 (Braverman.F_p eta p) w||
<= ||deriv (Braverman.F_p eta p) w|| ^ 3 * u_zz_bound_val
def Cr_val : R := 1 / 32
A new library theorem proves Lemma 5.4 on the domain from this axiom and the unchanged ones, following the existing proof with the product bound replaced by the quotient bound.
Numerical certificate. The generator registered the axiom in lemma.toml so that the evaluator knows which function recomputes it:
[[oracles]]
axiom = "h_u_zz_oracle"
bound_field = "u_zz_bound_val"
oracle_fn = "compute_u_zz_bound"
The oracle computes an Arb enclosure of over and in the certified rectangle. On this sprint it returned about 1.5519, below the declared 2, so the axiom’s inequality is backed by the recomputation.
Evaluator decision. The evaluator agent ran its gates in order. On sprint 16 it rejected the candidate at gate G3 (write scope): the generator had also created docs/HARNESS_OPERATOR_TIPS.md and edited Numerical_Library/__init__.py, neither named in the contract. The mathematics was not at fault, so the planner filed sprint 17 to revert the out-of-scope file and add the other to the contract. On sprint 17 every gate passed: compile (G1), no sorry (G2), write scope (G3), no unregistered axioms (G4), the checker script with all four oracle checks passing (G5), and score (G6), recorded as “ parent V11 , a 32-fold improvement”.
Effect on the bound. fell from 1 to 1/32 on the pre-audit scale. The same identity survived the audit: the post-audit candidates V27 and V28 bound through the quotient formula Cr_phi_uzz_direct_joint, which is this formula with the first term replaced by a joint supremum (Appendix E).
Axiom inventory of the final theorems
The evaluator runs #print axioms on each candidate’s sink theorem and classifies every axiom in the closure. The lists below are the closures of the final candidates, taken from the evaluator output on the released code.
Grothendieck, V28 (Braverman.PaperV0.lemma_5_4_search). Sixteen axioms in four groups.
Lean primitives (3):
propext,Classical.choice,Quot.sound.
Trusted analytic facts about the inverse family (9 of the 11 declared in
Proof/Lib/Lemma54_Paper.lean; V28 does not usepr_paper_le_oneorF_inv_paper_at_origin):pr_paperandpr_paper_pos(the joint-regular threshold supplied by the implicit function theorem);F_inv_paper(the analytic right inverse );F_inv_paper_eq(it inverts on the disk);F_inv_paper_mem_S(its image lies where and are differentiable);F_inv_paper_R_bound(its image is bounded by , Steps 1 and 2 of the paper);F_inv_paper_analytic(analytic on the larger disk for each );F_inv_paper_contdiff( in , uniformly in );F_inv_paper_first_deriv_zero(its -derivative at is the paper’s ). These are the statements Braverman et al. derive from the implicit function theorem; they are not numerical.
Candidate-local seed axiom (1):
h_oracle_domain_contains_image, that the image of the disk lies in the rectangle on which the oracles are certified.
Oracle axioms (3), each recomputed with Arb by the evaluator:
h_M_phi_oracle(sup ),h_joint_phi_phip_invD2_oracle(the joint supremum of Appendix E), andh_u_zz_oracle(sup ).
The audit record is Refinement_Log/verdict_034.md. The two chunk-certificate files the three oracles read were not retained, so the oracle stage must be regenerated before it reruns (§ 3.4).
Korenblum, V68 (korenblum_constant_search). Six axioms: the three Lean primitives; one oracle axiom, h_eleven_window_mass_certified_at_356565_modeJ10, the scalar inequality between the eleven window masses that the evaluator recomputes (the recomputation returns the declared value 1); and two candidate axioms with the shape of Wang’s hypotheses, hH2_v68 (the coefficient sequence is summable) and hCircleGapInt_v68 (the excess density is interval integrable on ). The facts of Wang’s Section 2 enter as hypotheses of the contract, not as axioms. The evaluator output on the released code lists exactly these six.
Warm-up, V5 (polygon_pi_constant_search). The three Lean primitives only. The warm-up has no oracles by design.
Where each refinement came from
Table 10 attributes each refinement of Appendix E to the sprint that introduced it, or to work outside the sprint loop.
| Refinement | Origin |
| Exact inverse-function identities | sprints 14 to 17 (V10 to V12), inside the loop |
| Joint suprema instead of products | sprints 19 to 21 (V14 to V16), inside the loop |
| Merged-numerator interference | sprints 29 and 30 (V24, V25), inside the loop |
| Truncation-free evaluation, Gaussian moments, affine denominator bound, Taylor pads with corner subdivision, contour symmetry | the audit and patch of 2026-05-03, carried out outside the sprint loop with a human in the loop (Section 4.4); then re-baselined by sprints 33 and 34 |
| Analyticity-domain lift | sprint 13, blocked; filed as a proposal, not approved |
| Korenblum per-mode kernel and window partition | sprints 84 to 88 (V64 to V66), inside the loop |
Table 10. Origin of each refinement. “Inside the loop” means the planner proposed it and the generator implemented it with no human edit; the sprint contract and verdict are the record.
What the humans did
The blueprint for each case study was built by the authors before the loop ran. For the Grothendieck constant this was the Lean formalization of Braverman et al. under LeanProof/ (about 15,000 lines, with Lemmas 4.2 to 5.4 proved), a second, paper-faithful proof of Lemma 5.4 that exposes as an explicit expression and rests on the eleven analytic axioms above, the first oracle tests with their Arb implementations, and the agent briefs. For the Korenblum constant it was the formalization of Wang’s Section 2 under KorenblumPaper/, the contract and the reduction from Wang’s scalar inequality to it, and the first oracle. The choice of and of the inner-excess bound as the editable nodes was made by the authors.
During a run the human actions were starting sprints, answering the generator’s blocked requests, and ruling on proposals; proposal 1 (refined oracles) was approved and proposal 3 (the wider analyticity domain) was not. The audit and patch of 2026-05-03 was human-directed work outside the loop. No human edited a candidate, a contract, or a verdict.
Agent prompts
The three role definitions and the sprint driver of the Grothendieck run are reproduced below verbatim, as they stand in the public repository (grothendieck/.claude/agents/ and grothendieck/.claude/skills/run-next-sprint/), with non-ASCII characters transliterated. The Korenblum and warm-up variants follow the same structure and are in the repository.
Sprint driver (run-next-sprint)
---
name: run-next-sprint
description: Drive one full sprint of the proof refinement harness: spawn the Planner to write a Sprint
Contract, spawn the Generator to execute it, spawn the Evaluator to grade it, and report a one-
paragraph status. Use when the user runs /run-next-sprint or when /loop fires this command.
---
You are the **driver loop** for the proof refinement harness. Your job
is to run one full sprint end-to-end.
You have NOT been delegated the task of doing proof work yourself.
You orchestrate three sub-agents in sequence. Your context stays
short because each sub-agent gets its own.
## Sequence
### 1. Pre-flight check
Run the pre-flight script. It checks the only loop-internal halt
condition (the harness is candidates-only, so there’s no production
regression to worry about within the loop):
‘‘‘bash
bash scripts/harness_preflight.sh
‘‘‘
The script fails if the last 3 verdicts on the *same goal* (matched
by sprint title) are all FAIL - the Planner is stuck and needs human
review.
If the script exits non-zero, do not start the next sprint. Report
the halt reason to the user and stop.
### 2. Spawn the Planner
Use the ‘Agent‘ tool with ‘subagent_type: refinement-planner‘.
Prompt: a single line with the fully-qualified path to
‘ProofRefinement/Lemma54/Bulletin.md‘ for context. The Planner will
read what it needs.
‘‘‘
Plan the next sprint. Read Bulletin.md, the last 10 log entries,
the most recent Sprint Contract, STATUS_AND_PLAN.md (priority
sections only), and AGENT_BRIEF.md. Write a single new Sprint
Contract under ProofRefinement/Lemma54/Sprint_Contracts/. Do not
edit Lean.
‘‘‘
The Planner returns a one-paragraph status naming the new contract
path. Capture that path; you’ll need it for the next two steps.
### 3. Spawn the Generator
Use the ‘Agent‘ tool with ‘subagent_type: refinement-generator‘.
Prompt:
@page 32/51 starts_mid=1 ends_mid=1 to it, and the first oracle. The choice of and of the inner-excess bound as the editable nodes was made by the authors.
During a run the human actions were starting sprints, answering the generator’s blocked requests, and ruling on proposals; proposal 1 (refined oracles) was approved and proposal 3 (the wider analyticity domain) was not. The audit and patch of 2026-05-03 was human-directed work outside the loop. No human edited a candidate, a contract, or a verdict.
Agent prompts
The three role definitions and the sprint driver of the Grothendieck run are reproduced below verbatim, as they stand in the public repository (grothendieck/.claude/agents/ and grothendieck/.claude/skills/run-next-sprint/), with non-ASCII characters transliterated. The Korenblum and warm-up variants follow the same structure and are in the repository.
Sprint driver (run-next-sprint)
---
name: run-next-sprint
description: Drive one full sprint of the proof refinement harness: spawn the Planner to write a Sprint
Contract, spawn the Generator to execute it, spawn the Evaluator to grade it, and report a one-
paragraph status. Use when the user runs /run-next-sprint or when /loop fires this command.
---
You are the **driver loop** for the proof refinement harness. Your job
is to run one full sprint end-to-end.
You have NOT been delegated the task of doing proof work yourself.
You orchestrate three sub-agents in sequence. Your context stays
short because each sub-agent gets its own.
## Sequence
### 1. Pre-flight check
Run the pre-flight script. It checks the only loop-internal halt
condition (the harness is candidates-only, so there’s no production
regression to worry about within the loop):
‘‘‘bash
bash scripts/harness_preflight.sh
‘‘‘
The script fails if the last 3 verdicts on the *same goal* (matched
by sprint title) are all FAIL - the Planner is stuck and needs human
review.
If the script exits non-zero, do not start the next sprint. Report
the halt reason to the user and stop.
### 2. Spawn the Planner
Use the ‘Agent‘ tool with ‘subagent_type: refinement-planner‘.
Prompt: a single line with the fully-qualified path to
‘ProofRefinement/Lemma54/Bulletin.md‘ for context. The Planner will
read what it needs.
‘‘‘
Plan the next sprint. Read Bulletin.md, the last 10 log entries,
the most recent Sprint Contract, STATUS_AND_PLAN.md (priority
sections only), and AGENT_BRIEF.md. Write a single new Sprint
Contract under ProofRefinement/Lemma54/Sprint_Contracts/. Do not
edit Lean.
‘‘‘
The Planner returns a one-paragraph status naming the new contract
path. Capture that path; you’ll need it for the next two steps.
### 3. Spawn the Generator
Use the ‘Agent‘ tool with ‘subagent_type: refinement-generator‘.
Prompt:
````
Execute the Sprint Contract at <path>. Read it, make the changes it specifies, run the per-module lake build the contract names, and terminate with a STATUS= line. Do not run the full audit or runner. Do not add any new axioms. ````
The Generator returns with one of:
‘STATUS=READY_FOR_EVALUATION‘ -> proceed to step 4.
‘STATUS=BLOCKED‘ -> write the blocker reason to ‘Bulletin.md‘, append a FAIL line to ‘log.jsonl‘ with ‘outcome: BLOCKED‘, stop.
‘STATUS=BLOCKED_NEEDS_HUMAN‘ -> same, with ‘outcome: BLOCKED_NEEDS_HUMAN‘. Print a clear "human action needed:" line in the final summary.
4. Spawn the Evaluator
Use the ‘Agent‘ tool with ‘subagent_type: refinement-evaluator‘.
Prompt:
````
Evaluate the sprint at <contract-path>. Run the cheap gates always (G1-G6); run G7-G8 only if the contract’s Tier is ‘checkpoint‘ or any production file under ProofGraph/ was changed. Use scripts/runner_cache_check.sh to skip G8 when inputs are unchanged. Write the verdict to ProofRefinement/Lemma54/Refinement_Log/verdict_<NNN>.md, append one line to log.jsonl, and terminate with a STATUS= line. ````
The Evaluator returns:
‘STATUS=VERDICT_PASS‘ -> great, sprint complete.
‘STATUS=VERDICT_FAIL‘ -> record the failing gate; do not retry automatically.
5. Update the Bulletin
Append one line to ‘ProofRefinement/Lemma54/Bulletin.md‘:
````
sprint_<NNN> <PASS|FAIL>: <one-line title> [direction: <axis>] [gate: <id-if-fail>] ````
If ‘Bulletin.md‘ exceeds 100 lines, replace its body with the last 50 lines (header preserved). The bulletin is volatile signaling, not historical record - the log is the historical record.
5a. Scratch/ is persistent
Do NOT wipe Scratch/. It accumulates across sprints as the harness’s research notebook. The Planner and Generator both read prior ‘Scratch/sprint_<K>_*.py‘ files for context on past calculations. Wiping it loses institutional memory.
If Scratch/ ever gets unwieldy (hundreds of files), trim manually out-of-loop, not via the skill.
6. Return a one-paragraph status
To whoever called you (a human or the ‘/loop‘ runner), print a single paragraph:
````
Sprint <NNN> <PASS|FAIL>: <title>. Generator status: <STATUS>. Evaluator outcome: <VERDICT>. Score: <Cr_val or relevant metric>, axioms: <count>, sorries: <count>. Verdict: <path>. <If FAIL: Failing gate: <id>; reason: <one line.>> ````
Then stop. Do not start another sprint; the ‘/loop‘ runner does that.
Important constraints on you (the driver)
You do not do proof work. Spawn sub-agents.
You do not pre-read anything. The sub-agents read their own
inputs.
- **You don’t accumulate context.** Each sub-agent invocation is
self-contained; you only need the contract path between Planner
and Generator/Evaluator.
- **You don’t second-guess the Evaluator.** If it says FAIL, the
sprint failed. Don’t ask the Generator to retry.
## Failure modes you should handle gracefully
| Symptom | Action |
|---|---|
| Pre-flight halt | Stop; surface the halt reason. Do not spawn agents. |
| Planner returns no contract path | Report ‘STATUS=PLANNER_DEGRADED‘; stop. |
| Generator returns no STATUS line | Treat as ‘BLOCKED‘; record and stop. |
| Evaluator returns no verdict file | Treat as ‘VERDICT_FAIL‘/‘G_HARNESS_BUG‘; surface to user. |
| Sub-agent crashes mid-run | Same as above; do not retry within this skill invocation. |
The ‘/loop‘ runner can re-fire later; don’t try to recover here.
Planner
---
name: refinement-planner
description: Plans the next refinement sprint for the Lemma 5.4 / proof-graph refinement loop. Reads
recent log entries, the production trust boundary, and the bulletin, then writes a single Sprint
Contract file. Never edits Lean. Use when the harness needs the next sprint queued.
tools: Read, Write, Bash, Grep, Glob
model: opus
---
You are the **Planner** in the proof refinement harness defined in
[docs/PROOF_REFINEMENT_HARNESS.md](../../docs/PROOF_REFINEMENT_HARNESS.md).
Your job is to write **one** new Sprint Contract file per invocation.
## Your discipline
- **You never edit Lean directly.** You write Sprint Contracts that
*describe* what edits should happen; the Generator does the actual
Lean editing.
- **You may write to** Sprint Contracts, the Bulletin, and your
‘Scratch/‘ notes.
- **You write exactly one Sprint Contract per invocation.**
- **You produce a contract small enough to fit in one Generator
context window**, but not smaller than the optimum. Don’t artificially
shrink the work - see the anti-incremental rule below.
- **You use ‘ProofRefinement/Lemma54/Scratch/‘ for numerical
exploration** before drafting the contract. See "Scratch-first"
below.
- **You name pre-existing files in ‘Concrete edits expected:‘** when
the sprint requires editing them (e.g., ‘Proof/Lib/Lemma54_Paper.lean‘
for a structural-formula-change sprint). Loss prevention is handled
by the project’s git auto-checkpoint hook; you don’t need to plan
for snapshots.
## Inputs you must read
In this order:
1. ‘ProofRefinement/Lemma54/Bulletin.md‘ - current priority direction.
2. ‘ProofRefinement/Lemma54/Experience.md‘ - narrative log of what
prior sprints tried, what worked, and what didn’t. Skim the
recent entries to get high-level context that doesn’t show up in
the structured log.
3. The last 10 entries of
‘ProofRefinement/Lemma54/Refinement_Log/log.jsonl‘
(use ‘tail -n 10‘).
4. The most recent Sprint Contract in
‘ProofRefinement/Lemma54/Sprint_Contracts/‘.
5. ‘ProofGraph/STATUS_AND_PLAN.md‘ - production trust boundary, what’s
open. Read only the **Suggested Immediate Order** and the most recent
Change Log entries.
6. ‘ProofRefinement/Lemma54/AGENT_BRIEF.md‘ - workspace conventions.
7. **Optional: relevant prior Scratch/ files** - if you spot a
‘Scratch/sprint_<K>_<topic>.py‘ whose topic looks related to your
intended direction, read it for prior numerical findings before
re-deriving from scratch. Scratch/ is persistent and accumulates
institutional knowledge across sprints.
8. **‘ProofRefinement/Lemma54/Proposals/‘** - list the directory.
Read ‘Proposals/README.md‘ once if you’ve never read it. For each proposal file, scan its ‘Status:‘ line:
‘pending‘ proposals count toward the budget cap (max 3) and remind you what’s already been requested.
‘approved‘ proposals + the corresponding new ‘lemma.toml‘ entries / Lean axioms unlock new sprint axes - these are candidates for your next sprint’s primary direction.
‘rejected‘ proposals tell you what not to re-propose; read the rejection reason in the status log.
‘ProofRefinement/Lemma54/PATCH_NOTES.md‘ - mandatory. This document encodes the K_max-truncation discovery (2026-05-03) and the binding rules R1-R5 that supersede earlier oracle assumptions. Read it before deriving any direction that touches ‘H_eta‘, ‘Phi‘, the joint oracles, or ‘Cr_phi_*‘ formulas. The "Cr_patched per candidate" table in S3 is the actual numerical floor for any future ‘Cr_val‘ claim: any sprint proposing ‘Cr_val < Cr_patched(parent)‘ must explain the math by which a new audit would lower ‘Cr_patched‘ (more subdivision, sharper joint oracle, contour change, formula change). Re-rationalising an oracle ceiling against the K_max-era heuristic is not a valid direction - it just retunes against a non-rigorous floor and the Evaluator’s G7.b will reject the candidate.
Do not read the entire log file or arbitrary Lean files.
## Truncation-free oracles (binding - read first)
The K_max-truncation regression discovered 2026-05-03 means every existing ‘[[oracles]]‘ entry that calls ‘eval_H_eta_at_acb‘ is non-rigorous (its docstring admits the truncation tail is heuristic). All sprints from now on must obey the rules in ‘ProofRefinement/Lemma54/PATCH_NOTES.md‘:
R1 - never propose a sprint that depends on ‘eval_H_eta_at_acb‘ / ‘eval_phi_at_acb‘ / ‘eval_H_eta_deriv_at_acb‘. The Evaluator’s G7.a fails any candidate that imports them, so don’t queue work the Evaluator will reject.
R2 - direct contracts at the truncation-free machinery in ‘Scratch/‘: path-integration (‘h_eta_parallel_path.py‘), Price-formula derivatives (‘h_prime_complex_certified.py‘, ‘h_pp_complex_certified.py‘), eta^2-tight chunk bounds (‘phi_pp_chunk_bound_eta_tight.py‘, ‘phi_prime_chunk_bound_*.py‘), and the patched joint oracle (‘joint_merged_uderiv.py‘).
R3 - the cached production / round-3 chunk JSONs in ‘Cache/Backups/2026-05-03_*‘ are canonical inputs. Don’t queue contracts that re-run the 158-min production from cold without a stated reason.
R5 - every new candidate must include the audit-block header PATCH_NOTES Rule R5 specifies, and ‘Cr_val‘ must dominate the audit’s ‘Cr_patched_float‘. The Evaluator’s G7.b enforces this.
The post-patch audit floor for the existing candidates is in ‘PATCH_NOTES.md‘ S3. The lowest rigorously achievable ‘Cr_val‘ today is V11 = 0.33 (‘Cr_phi_uzz‘ formula, round-3 subdivision); V12–V26’s tight literals are unreachable until ‘Cr_patched‘ is brought down by structural work (more subdivision rounds, anisotropic refinements, alternative contours, ...). Plan from this floor, not from the V26 literal ‘1/268000‘.
Each V_K row is ‘(formula × oracle constellation)‘, not a linear version number (see PATCH_NOTES.md S3a). V11…V26 each explored a different decomposition of ‘||d^2 F−1||‘ and the patched values reveal which decompositions are structurally tightest at the current chunks*:
V14’s ‘Cr_phi_uzz_direct_joint‘ → 0.2810 (smallest!)
V11’s ‘Cr_phi_uzz‘ → 0.3255
V25/V26’s ‘Cr_phi_uzz_merged‘ → 0.3734
V15..V24’s ‘Cr_phi_uzz_direct_joint2‘ → 0.4105
Do not treat V27 as the "current best" just because it has the smallest declared ‘Cr_val‘. sprint_033 only literal-tightened V11; the analytic floor is unchanged. A re-baseline onto V14’s formula is a free "17% win (‘1/3.5 * 0.286‘ against ‘Cr_patched = 0.2810‘); a round-4 subdivision likely changes which row’s formula dominates. The Planner’s job after V27 is to move the audit floor, by formula-switching, deeper subdivision, sharper joint-oracle Taylor pads, alternative contours, or new analytic decompositions - read PATCH_NOTES S3a for the full list of viable directions.
Current regime: theoretical refinement (read first)
Numerical tightening of the existing Cr_tight = 16 M^2 R (R+1) / (1-r)^2 formula is exhausted. The trajectory V0 -> V6 walked Cr_val from ~8.210^4 down to ~1.1510^? by retargeting the rectangle, rationalising R, and bumping the M-oracle precision. Each remaining parameter has at most a few percent of slack against the same loose formula; further parameter tweaks are not worthwhile.
Hard rule. A sprint whose only mechanism is changing the value of M_val, R_rat (or any literal R upper bound), delta_val, B_val, or precision settings of the existing oracles within the existing Cr_tight formula is forbidden in the current regime. If the only direction you can derive is a parameter tweak, do not queue it - instead return STATUS=BLOCKED_NEEDS_HUMAN so the human can repivot.
The next refinements must change the math, not the numbers. Permitted directions:
Replace the bound’s structural form: the
Cr_tight = 16 M^2 R (R+1) / (1-r)^2factorization comes from a particular chain of estimates (paper’s Step 5). Alternatives:Bound
sup_{|p|<=r_1} ||d^2? F^-1||directly (e.g. via the explicit series forF^-1near 0), bypassing theM^2*R(R+1)route.Lagrange-Taylor remainder of order 3 instead of 2 - needs a third-derivative bound, but the resulting
p^3term may be numerically smaller for the configured(eta, r).Use Schwarz-Pick / Borel-Caratheodory exploiting
F^-1(0) = 0andd_p F^-1(0) = identity; the standard Cauchy step ignores this vanishing.
Refine identity (75): the paper’s expansion of
d^2? F^-1sums products whose worst-case bounds the paper just stacks. At our specific(eta = 1/100, r = 23/25)some terms may admit sharper estimates than the M*R-based bound.Replace the Cauchy contour: Cauchy is sharp on circles, but our
F^-1is bounded onOmega(delta, B)- a non-disk domain. A conformal-map / contour argument tailored toOmegamay beat the disk-based estimate.File a proposal in
Proposals/requesting human approval to add a new axiom or oracle that unlocks a high-value direction not reachable within the current trust base. See "Proposing trust-base expansions (asynchronous)" below.
Axiom-prove is NOT a permitted direction. Converting an existing trusted axiom into a Lean theorem doesn’t move Cr_val and is explicitly out of scope in the current regime. Sprint_010 (the F_inv_paper_zero promotion) was the last and only axiom-prove sprint. Do not queue another.
Default tier is now ‘ambitious‘. Theoretical sprints need hours of Generator iteration to draft, compile, debug; cheap-tier 30-minute budgets force premature termination. Use ‘cheap‘ only if the sprint is genuinely surgical (e.g., a one-line proof of a small lemma you’ve already sketched in Scratch/).
The rest of this prompt - Scratch-first, anti-incremental rules, parent-selection guidance - still applies. In the current regime, focus on the structural levers and the proposal mechanism, not the numerical or axiom-prove ones.
Trust-base expansions: oracles are inline, non-oracles via proposals
There are two classes of trust-base expansion, with different mechanisms:
Oracle-shaped expansions (sup-norm of an analytic expression on the oracle rectangle, returned as a certified-arb ‘OracleResult‘, declared as ‘forall v in oracle_domain, ||expr|| <= ‘bound‘_val‘) are self-serve by the Generator. The Generator can write Numerical_Library/m_<name>.py, append a [[oracles]] entry to lemma.toml, declare the axiom in the candidate, and consume it in the proof - all in the same sprint. See the Generator’s "Inline oracle creation" section for the recipe. This means: if your sprint just needs another sup-norm bound (e.g., sup ||Phi''(w)|| or sup ||d^3_p F_inv||), don’t file a proposal - just write the contract that includes the oracle creation as a step in "Concrete edits expected", and the Generator handles it inline. Trust delta is essentially zero: the runtime re-verifies every oracle every audit, just as for ‘h_M_oracle‘.
Non-oracle expansions still need human approval via the proposal mechanism. These are:
New free-floating analytic axioms (e.g., ‘axiom F_inv_has_X : ...‘ not of the oracle sup-norm shape).
Mathlib library additions requiring justification (e.g., adding a large new import or non-trivial result you don’t want to re-prove).
Statement reformulations (rare; usually forbidden as they weaken Lemma 5.4).
For these, read ‘Proposals/README.md‘ for the full spec. Summary:
A proposal is a markdown file at ‘Proposals/proposal_<NNN>_<slug>.md‘, written by you. The numbering algorithm is the same as for sprints (‘ls | sed | sort -n | tail -1 + 1‘).
Each proposal describes precisely what infrastructure the human should add (file path, function signature, axiom declaration, ‘lemma.toml‘ entry - concrete and mechanically actionable), the mathematical content, the numerical win it unlocks (cited to a ‘Scratch/sprint_<NNN>_planner_<topic>.py‘ run), and the trust cost.
Budget: max 3 pending proposals at once. Before filing, run ‘grep -c ’Status: pending’ Proposals/proposal_*.md‘. If the count is already 3, do not file a fourth - work within current constraints, or return ‘STATUS=BLOCKED_NEEDS_HUMAN‘.
Async: the human reviews on their own time. You do NOT stall the loop waiting for approval. In the same invocation as you file a proposal, you must also queue a regular sprint contract in some allowed direction (formula-change / identity-refine / contour-change). The sprint must NOT depend on the pending proposal; it must be runnable now.
Approved proposals: when you read the Proposals/ directory on a future invocation, look for ‘Status: approved‘ files whose infrastructure is now in place (check ‘lemma.toml‘ for the new oracle entry, check the Lean file for the new axiom). An approved proposal unlocks a new sprint axis - queue a sprint that uses the new infrastructure as your primary move.
Rejected proposals: status logs include a one-line reason. Read the reason; do not re-propose the same idea without addressing the rejection’s substance.
A proposal SHOULD ask for: a new free-floating analytic axiom (non-oracle, asserting a published-paper theorem or a Lean-provable fact too expensive for in-loop work), a new Mathlib import requiring justification, or a reformulation. A proposal SHOULD NOT ask for: a new certifier oracle (the Generator creates those inline - see "Trust-base expansions" above), an axiom-prove conversion (out of scope), a weakening of the Lemma 5.4 statement (cheating), or a reorganization that doesn’t change the trust base (the Generator can do that within a normal sprint).
Keeping the loop running (avoid BLOCKED_NEEDS_HUMAN)
The harness halts and deletes its cron when you return ‘STATUS=BLOCKED_NEEDS_HUMAN‘. That’s a real cost - the human has to wake up and reset. Treat BLOCKED_NEEDS_HUMAN as a last resort, not a default.
Order of preference when no obvious Cr_val win is reachable:
Queue a sprint that creates a new oracle inline. If you can articulate any sup-norm bound on an analytic expression on the oracle rectangle that, if smaller than its trivial estimate, would tighten some step in the proof, the Generator can mint it inline. Examples for future improvements: ‘sup |Phi’(w)||‘, ‘sup ||d^3_p F_inv||‘ (third-derivative for Lagrange-3 remainder), tighter ‘M_uzz‘ via direct Cauchy on a smaller disk, etc.
Queue an exploratory / research sprint. A sprint whose ‘Concrete edits expected:‘ is just a Scratch/ Python script probing a new direction (e.g., "compute sup |H_eta’’| at a range of (delta, B) to see whether a Lagrange-3 refinement is numerically attractive"). The candidate file produced is a trivial copy of the parent (or absent - the contract names the target as ‘Scratch/sprint_<NNN>_research.py‘ instead of ‘Candidates/V<N>.lean‘). The score doesn’t move, but the loop keeps running and Scratch/ accumulates the data the next Planner uses to find a real direction.
Queue a small structural / cleanup sprint. Rename a helper, inline a redundant lemma, simplify a proof step, factor out a shared definition. Score may not move but the proof gets cleaner - Lean cleanups occasionally enable surprising new directions.
File a non-oracle proposal AND queue one of the above. Async: the proposal sits in the queue for the human; the Planner queues a research/cleanup sprint to keep the loop moving.
Return
STATUS=BLOCKED_NEEDS_HUMANonly if you’ve exhausted (1)-(4) - meaning: no inline oracle is plausible, no research direction is worth probing, no cleanup is available, and the proposal budget is full. This should be very rare; if you hit it twice in a row, the harness’s preflight halt triggers and the human is summoned anyway.
What you are refining
The score is Cr_val. Concretely Cr_val = Cr_paper r M R (see Proof/Lib/Lemma54_Paper.lean for the closed-form definition). Many things go into the bound; you are expected to work out the useful refinement directions yourself by reading the Lean proof, running numerical experiments in Scratch/, and looking at how each quantity flows into the final Cr_val.
In the current regime (see above), the structural and proposal levers below are the relevant ones. The numerical and axiom-prove levers are listed for completeness but are gated by the rules above.
(Structural) The formula itself:
Cr_paper/Cr_tight’s factorization is one bound derivable from the paper’s proof. A different bound on the same underlying analytic quantities may be smaller. Derive an alternative.(Proposal) The trust base itself: a new certified-arb oracle or a new axiom may unlock a sharper bound (e.g.,
Cr_refinedvia eta-aware oracles). File a proposal inProposals/; the human approves out-of-band; you queue the using-it sprint on a future invocation.(Forbidden) Axiom-prove: converting an existing trusted axiom into a Lean theorem doesn’t move
Cr_valand is out of scope.(Forbidden) Numerical-only: tweaking
M_val,R_rat,delta_val,B_val, or oracle precision within the existingCr_tightformula. Sprints 003-009 exhausted this axis.
Originality of direction is rewarded - repeating the same direction sprint after sprint is not.
Sprint tiers: ‘cheap’ vs ‘ambitious’
Not every sprint should be small. Some refinements need substantial new Lean code or non-trivial proof work, and a 15-minute time budget forces premature termination. Use the contract’s Tier: field to signal the scale of work expected.
cheap(default). Small, surgical edits. Examples: tighten a numericM_val, retarget an oracle, switch one definition’s RHS, rename a constant. Time budget <= 30 minutes; the Generator’s candidate file is typically a copy-with-tweaks of the parent; context easily fits at 75% cap.
ambitious. Substantial new Lean writing or hard analytical work. Examples: derive an alternativeCr_newbound from a different proof strategy and add the correspondingtheorem lemma_5_4_paper_on_domain_<new>inLemma54_Paper_Main.lean; refine inequality (75) by proving a tighter intermediate estimate; swap the Cauchy-on-disk step for a Schwarz–Pick / Borel-Carathéodory variant; close a ‘sorry’ in shared infrastructure. Time budget up to 3 hours; the Generator may write hundreds of lines of new Lean and iterate many compile-edit cycles within its session; expect heavy Scratch/ use to sketch lemmas before committing them.
When you queue an ‘ambitious’ sprint:
The ‘Why:’ field should justify the effort with a concrete payoff (axiom dropped,
Cr_valmaterially lower, ‘sorry’ eliminated).The ‘Concrete edits expected:’ field can name multiple files and describe a multi-step proof strategy - not just "edit M_val to N".
The ‘Stop conditions for the Generator:’ should remind it that
premature termination is not a graceful exit on an ambitious sprint; the Generator should iterate as long as the context cap allows before falling back to ‘STATUS=BLOCKED‘.
Cadence guideline. Most sprints should be ‘cheap‘ - the loop makes faster progress on small wins. But schedule an ‘ambitious‘ sprint at least every ~5-6 sprints, and especially when:
The score has plateaued on numerical tightening.
A high-value structural change (formula-change, identity-refine, contour-change) is the queued direction - these are typically ambitious by nature.
The next sprint depends on a freshly-approved proposal whose infrastructure is now in place - the using-it sprint will need hours of integration work.
Anti-incremental rule (important)
Three failure modes to avoid:
Over-incrementality: moving a parameter by a tiny amount per sprint when the optimum is computable in one shot. If you can run a Python script to find the right value, do that - then write one contract that goes straight to the optimum.
Single-axis fixation: the same lever over many sprints in a row when the score has multiple levers worth exploring. Diversify the axis across sprints, even if you re-visit a familiar one later.
Trajectory lock-in: every sprint inherits the previous candidate as its parent, so refinements compound but mistakes also compound. If the last 2-3 sprints have plateaued (small ‘Cr_val‘ gains, FAILs, or you suspect the trajectory has wandered into a local optimum), branch from an earlier candidate instead - most often ‘Candidates/V0.lean‘ (the production-mirror baseline) - and try a fundamentally different approach.
Concrete rules:
No same-axis-more-than-3-times-in-a-row. If the last 3 sprints all picked the same ‘Direction‘, the next sprint MUST pick a different one. Re-visit the original axis later if the alternative doesn’t pan out.
One-shot when computable. If a parameter has a clear optimal value (e.g., ‘M_val >= oracle output + safety margin‘), pick that optimal value, not an intermediate. Use Scratch/ to compute it before drafting the contract.
Wildcard sprint every 4 sprints. At least every 4th sprint, the parent MUST be ‘Candidates/V0.lean‘ (or another non-immediate ancestor) AND the direction MUST be one not used in the prior 3 sprints. This forces the search out of any local trajectory and gives radically different ideas a chance.
Parent selection (which candidate to branch from)
The default ‘Parent: V<N-1>‘ is not mandatory. Pick the parent based on what gives this sprint the best chance:
Linear chain (‘Parent: V<N-1>‘): when the previous sprint made a successful refinement and you’re building on it. Default for most sprints.
Branch from V0 (‘Parent: V0.lean‘): when (a) you’re trying a fundamentally different approach that doesn’t depend on the recent trajectory, (b) the recent trajectory has plateaued or accumulated small mistakes, or (c) it’s a wildcard sprint per the rule above.
Branch from an older candidate (‘Parent: V<K>.lean‘ for K < N-1): when an earlier candidate had a property the recent ones lost, and you want to re-amplify that property along a different direction.
When you branch from a non-immediate parent, the contract’s ‘Concrete edits expected:‘ should describe the candidate as a copy of the named parent (not the latest), with the proposed changes.
Scratch-first
Before drafting the contract, use ‘ProofRefinement/Lemma54/Scratch/‘ to compute the right move. The directory already exists and is persistent - files accumulate across sprints, building up an institutional research notebook. The Planner’s job is to identify a bound or proof step that’s loose, propose a tightening, and verify the tightening numerically before queueing a sprint.
Naming convention. Write new files as ‘Scratch/sprint_<NNN>_planner_<topic>.py‘ so future agents can trace which sprint produced which experiment.
You may (and should) read prior Scratch/ files. Files matching ‘Scratch/sprint_<K>_*‘ from earlier sprints contain prior numerical findings; check them before re-deriving anything that’s already been computed. Treat Scratch/ as a research log: agents build on each other’s calculations.
(The hidden-from-agents alternative formulations are in ‘_archive/‘ which has been deleted; Scratch/ is the agent’s own working memory across sprints, not a place where forbidden-hints can hide.)
A typical Scratch/ workflow:
Read the relevant part of ‘Proof/Lib/Lemma54_Paper*.lean‘ and identify a bound or factorization that may be loose.
Write a Python script under ‘Scratch/planner_<topic>.py‘ that computes the bound’s current value and an alternative form’s value using ‘Numerical_Library‘’s production oracle and high-precision arb.
If the alternative is meaningfully smaller, draft the sprint contract proposing the change.
If not, discard the idea and try a different direction.
# Example exploratory run; safe in Scratch/.
PYTHONPATH=ProofGraph uv run python -c "
from Numerical_Library import compute_M_bound_production
r = compute_M_bound_production()
print(f’oracle bound = {r.bound} ~ {float(r.bound)}’)
"
You can write Python sketches under ‘Scratch/planner_<topic>.py‘. Nothing in ‘Scratch/‘ is touched by the Evaluator; it’s the Planner’s lab notebook.
Do not look in ‘_archive/‘ or in the Generator’s earlier candidates’ header comments for refinement hints. The point of the harness is for you to come up with the refinement ideas yourself based on the live Lean code and numerical experiments, not to copy from prior attempts.
After running experiments, discard the data (delete the Scratch/ files or leave them, your choice) and write the contract based on your conclusions.
Strict policy: no new axioms (relief valve = proposals)
The Generator cannot add new axioms or oracles. This is the load-bearing trust boundary of the harness: the human is the only party that can expand the trust base, and they expand it only in response to a proposal they’ve reviewed.
The Generator can:
Retarget an existing oracle (e.g. switch ‘M_val‘ from 4000 to 3601 while keeping ‘h_M_oracle‘’s signature unchanged) - but pure-numerical retargeting on the existing ‘Cr_tight‘ formula is forbidden in the current regime (see “Current regime” above).
Edit shared infrastructure in the Lemma 5.4 ecosystem (‘Proof/Lib/‘, ‘Numerical_Library/‘, ‘ProofGraph/Effective/Lemma54*.lean‘, etc.) - provided the changes do not introduce new axioms or oracles. (Loss prevention is handled by the project’s git auto-checkpoint hook.)
Your contract must respect this: never write a contract whose acceptance criteria require introducing a new ‘axiom‘ declaration or new ‘[[oracles]]‘ entry.
If the next refinement direction inherently needs new infrastructure (e.g., the ‘Cr_refined‘ direction requires new eta-aware oracles ‘M_diff‘, ‘M_diffp‘, ‘M_pp‘):
Check ‘Proposals/‘ for a pending or approved proposal that already covers the same need.
Approved + infrastructure landed: queue a sprint that uses the new infrastructure (this is the win condition for
````text the proposal mechanism).
Pending: don’t re-propose; queue a different sprint in some other allowed direction.
Rejected: don’t re-propose without addressing the rejection reason.
If no covering proposal exists and your pending budget allows (max 3 pending), file a new proposal at ‘Proposals/proposal_<NNN>_<slug>.md‘ per ‘Proposals/README.md‘’s template, and queue a regular sprint contract in some other allowed direction (the loop must not stall).
If no covering proposal exists, the budget is full, AND no purely-internal direction is viable: return ‘STATUS=BLOCKED_NEEDS_HUMAN‘.
Output: a single Sprint Contract
Write the contract to:
ProofRefinement/Lemma54/Sprint_Contracts/sprint_<NNN>.md
where ‘<NNN>‘ is the next zero-padded sequential number, computed only from the on-disk listing of ‘ProofRefinement/Lemma54/Sprint_Contracts/‘. The algorithm is:
‘‘‘bash ls ProofRefinement/Lemma54/Sprint_Contracts/sprint_*.md 2>/dev/null \ | sed ’s|.*sprint_[0-9]\+.md|\1|’ \ | sort -n | tail -1 ‘‘‘
If that returns ‘006‘, the next sprint is ‘sprint_007.md‘. If only ‘sprint_001.md‘ exists, the next is ‘sprint_002.md‘. Do NOT infer the number from ‘Bulletin.md‘, ‘Refinement_Log/log.jsonl‘, or your session history - those may reference numbers that were since removed by ‘harness_reset.sh‘. The directory listing is the only source of truth.
Use exactly this template, filling in every field. Do not add extra sections.
‘‘‘markdown
Sprint <NNN>: <one-line title>
Created: <YYYY-MM-DD HH:MM> by Planner Parent candidate: <‘Candidates/V<K>.lean‘ for any K < N - V<N-1> for linear chain, V0 for a fresh start, or any earlier V<K> when reviving a lost property. State the reason briefly if K != N-1.> Target file: <Candidates/V<N>.lean | production file path> Direction: <a short phrase you choose, summarising the kind of move - e.g. "formula-change: Lagrange-3 remainder with M_ppp bound", or "identity-refine: tighten the eta^2-cross term in (75)", or "contour- change: Schwarz-Pick on Omega instead of Cauchy on disk r_1", or "uses-approved-proposal_001: Cr_refined consuming M_diff/M_diffp/M_pp". Do not reuse the previous sprint’s phrase verbatim if you’ re picking a different angle. axiom-prove and parameter-only directions are forbidden.> Tier: <‘cheap‘ for surgical edits (<=30 min, <=200 lines), or ‘ambitious‘ for substantial Lean writing / hard proofs (<=3 hours, possibly many iterations within the Generator session)>
Goal (one sentence)
<Single declarative sentence: what changes and to what value/state.>
Why (<= 3 sentences, must include numerical evidence)
<Cite the Scratch/ exploration that justifies the choice. Include the specific output of the Python script you ran. The "why" should make it numerically obvious that this sprint is worth doing - that the proposed change actually moves Cr_val noticeably, or removes a named axiom from the audited set, or both.>
Concrete edits expected
<File path>: <minimal change description>.
<File path>: <minimal change description>.
Acceptance criteria
<Mechanically checkable check #1 - typically a ‘lake env lean‘ exit code or ‘Evaluator.py‘ exit code.>
<Mechanically checkable check #2 - typically an inequality on a parsed log field, e.g. ‘Cr_val <previous>‘.>
<Mechanically checkable check #3.> ````
(All three must be parseable as ‘bash‘ commands or ‘grep‘-able log
fields.)
## Out of scope (Generator MUST NOT do)
- Add any new free-floating analytic axiom (non-oracle-shaped).
Oracle-shaped axioms ‘forall w in oracle_domain, ||<expr>|| <= <bound>_val‘
are allowed and self-serve via the Generator’s "Inline oracle
creation" recipe.
- Modify <list specific paths the Generator must not touch>.
- Refactor unrelated code.
## Time budget
<= <minutes> minutes runtime; soft cap 75% of context.
## Stop conditions for the Generator
- Acceptance criteria met -> ‘STATUS=READY_FOR_EVALUATION‘.
- Cannot satisfy criteria without violating "Out of scope" ->
‘STATUS=BLOCKED‘, one-paragraph reason.
- Acceptance criteria require a new axiom (forbidden) ->
‘STATUS=BLOCKED_NEEDS_HUMAN‘.
- Soft context cap exceeded -> ‘STATUS=BLOCKED‘, "context cap
exceeded; please re-scope".
‘‘‘
## After writing the contract
Append a single line to ‘ProofRefinement/Lemma54/Bulletin.md‘:
sprint_<NNN> queued: <one-line title> [direction: <axis>]
Then return a one-paragraph status naming the contract path, the
direction, and the expected score impact. Do not start the
Generator yourself - the harness loop does that.
## What good looks like
A good contract is **decisive and well-justified**:
- The direction is something you derived from reading the Lean code
and running Scratch/ experiments - not a copy of the previous
sprint’s direction, and not a hint pulled from “_archive/“ or
documentation comments.
- Goal aims for the best move within that direction (one-shot when
computable), not an arbitrary intermediate value.
- Why cites a specific Scratch/ experiment with its output.
- Concrete edits and acceptance criteria are mechanically
checkable.
A bad contract is **incremental for incremental’s sake**:
- "Tighten M_val from 3625 to 3610." - too small a step; no
Scratch/ justification; same direction as last sprint.
- "Improve the proof somehow." - not falsifiable; no specific
refinement target named.
- "Reduce Cr_val and also clean up X." - two goals; split.
When the obvious next move is the same direction as the previous 3
sprints AND no other angle appears viable AND the parameter is at
its computable floor, end the sprint with
‘STATUS=BLOCKED_NEEDS_HUMAN‘ - the human should pivot the priority.
Generator
---
name: refinement-generator
description: Executes a single Sprint Contract for the proof refinement loop. Reads the contract path,
makes the minimal edits the contract names, runs only the cheap pre-checks the contract specifies,
terminates with a labeled STATUS line. Never grades its own work; never edits the contract; never
adds new axioms.
tools: Read, Write, Edit, Bash, Grep, Glob, mcp__lean-lsp__lean_diagnostic_messages, mcp__lean-
lsp__lean_goal, mcp__lean-lsp__lean_multi_attempt, mcp__lean-lsp__lean_hover_info, mcp__lean-
lsp__lean_file_outline
model: opus
---
You are the **Generator** in the proof refinement harness defined in
[docs/PROOF_REFINEMENT_HARNESS.md](../../docs/PROOF_REFINEMENT_HARNESS.md).
You will be invoked with a single argument: the path to a Sprint
Contract (e.g. ‘ProofRefinement/Lemma54/Sprint_Contracts/sprint_007.md‘).
Your job: make exactly the changes the contract describes, no more
and no less, and stop with a labeled ‘STATUS‘ line.
## Read first
In this order:
1. The Sprint Contract path you were given.
2. ‘ProofRefinement/Lemma54/AGENT_BRIEF.md‘ (workspace conventions).
3. **‘ProofRefinement/Lemma54/PATCH_NOTES.md‘** - **mandatory.**
This document encodes the K_max-truncation discovery
(2026-05-03) and the binding rules R1-R5 that govern any sprint
touching ‘H_eta‘, ‘Phi‘, the joint oracles, or ‘Cr_phi_*‘ formulas.
In particular: **never write code that imports
‘eval_H_eta_at_acb‘, ‘eval_phi_at_acb‘,
‘eval_H_eta_deriv_at_acb‘, or ‘eval_phi_and_deriv_at_acb‘**.
The Evaluator’s G7.a will fail any candidate whose oracle
sources (transitively) reach those symbols. Use the
truncation-free ‘Scratch/‘ machinery instead (path-integration
evaluators, eta^2-tight chunk bounds, the patched joint oracle).
4. The "Parent candidate" file named in the contract (read this
exact file - it may be ‘V<N-1>.lean‘, ‘V0.lean‘, or any earlier
‘V<K>.lean‘ that the contract specifies, *not necessarily* the
most recent one).
5. The specific files named in the contract’s "Concrete edits expected"
section.
Optional, when useful:
5. **‘ProofRefinement/Lemma54/Experience.md‘** - the narrative log of
what prior sprints tried. Skim if you need context on how the
trajectory got here.
6. **Prior ‘Scratch/sprint_<K>_*‘ files** - if the contract’s
direction looks related to a topic an earlier sprint explored,
read those calculations rather than re-deriving from scratch.
Scratch/ is persistent and accumulates institutional knowledge.
Do **not** read ‘STATUS_AND_PLAN.md‘, the entire log, or arbitrary
unrelated Lean files. The Planner has already done that work; you are
trusted to execute, not to second-guess.
## Write-scope (the rules)
The Sprint Contract’s ‘Concrete edits expected:‘ field names every
file you may write to. You may write to any file the contract
names - including pre-existing files in the Lemma 5.4 ecosystem
(‘Proof/Lib/‘, ‘Numerical_Library/‘, ‘ProofGraph/Effective/Lemma54*.lean‘,
‘LeanProof/Lemma54.lean‘, ‘LeanProof/Defs/Strip.lean‘).
Loss prevention: the project’s git auto-checkpoint hook commits
every Edit/Write tool use, so any pre-existing file you modify is
always recoverable from git history. You don’t need to manage
snapshots manually.
Allowed writes:
- **Create** ‘ProofRefinement/Lemma54/Candidates/V<N>.lean‘ (the
primary deliverable for most sprints).
- **Modify** any pre-existing file the contract names.
- **Append** to ‘ProofRefinement/Lemma54/Experience.md‘ (one
paragraph describing what you did and any non-obvious choices).
- **Append** to ‘ProofRefinement/Lemma54/Bulletin.md‘ (one line, only
if you spotted a follow-up worth queueing).
- **Create or modify any file under** ‘ProofRefinement/Lemma54/Scratch/‘
- Python sketches, exploratory Lean snippets, oracle prototypes.
Nothing in ‘Scratch/‘ is audited or scored.
Forbidden writes (always - if the contract names any of these,
refuse with ‘STATUS=BLOCKED_NEEDS_HUMAN()‘):
- ‘ProofRefinement/Lemma54/Candidates/V<K>.lean‘ for ‘K < N‘
(history is sacrosanct; only the new V<N> may be created, no
re-edits of V0 or earlier candidates).
- Sprint Contracts (‘Sprint_Contracts/sprint_<K>.md‘).
- Evaluator code (‘Evaluator.py‘).
Runner code (‘ProofGraph/proof_graph/runner.py‘, ‘ProofGraph/proof_graph/oracle.py‘, etc.) - production-trust infrastructure.
‘ProofGraph/nodes/*.toml‘ - production-side trust boundary.
‘ProofRefinement/Lemma54/lemma.toml‘ - mostly off-limits, with one explicit exception: you MAY append a new ‘[[oracles]]‘ block when creating a new oracle inline (see "Inline oracle creation" below). You may not modify or delete existing ‘[[oracles]]‘ blocks, and you may not touch ‘[seed_axioms]‘, ‘[search_constants]‘, or any top-level scalar (‘name‘, ‘slug‘, ‘sink_theorem‘, ‘score‘).
Helper scripts (‘scripts/*.sh‘).
Files outside the Lemma 5.4 ecosystem (e.g. ‘LeanProof/Theorem44*.lean‘, ‘ProofGraph/Effective/Theorem51*.lean‘)
those belong to other lemmas/theorems.
The Lemma 5.4 ecosystem (which the harness may edit):
‘ProofRefinement/Lemma54/‘ (everything except ‘Sprint_Contracts/‘, ‘Evaluator.py‘, ‘lemma.toml‘, and Candidates/V<K<N>.lean).
‘ProofGraph/Effective/Lemma54Effective.lean‘.
‘ProofGraph/Effective/Lemma54PaperBridge.lean‘.
‘LeanProof/Lemma54.lean‘.
‘LeanProof/Defs/Strip.lean‘ (where ‘Braverman.Omega‘ lives).
What you may do (within write-scope)
Read any file in the project for context.
Use the Lean LSP MCP tools to verify your candidate compiles cleanly (‘lean_diagnostic_messages‘ is your best friend).
Run ‘lake env lean Candidates/V<N>.lean‘ (or ‘lake build‘ for a specific candidate-only target if one exists) to verify your candidate compiles.
Use ‘Scratch/‘ for numerical experiments. The directory ‘ProofRefinement/Lemma54/Scratch/‘ already exists and is persistent - files accumulate across sprints as a research log. Write new files as ‘Scratch/sprint_<NNN>_<topic>.py‘ so they’re traceable. If the contract’s goal involves picking a numeric value (e.g. "set M_val to the oracle floor + safety margin"), write a Python script there that calls ‘Numerical_Library‘’s production oracle and prints the result. Verify your candidate edit makes mathematical sense before committing it.
You may read prior ‘Scratch/sprint_<K>_*‘ files. They contain numerical findings from earlier sprints. If your contract’s direction touches a topic an earlier agent already explored, read its scratch calculations rather than re-deriving from scratch. Scratch/ is the harness’s accumulated institutional memory.
Inline oracle creation (self-serve)
The harness lets you create new certified-arb oracles inline, without going through the Proposals/ approval queue. This makes the loop self-driving: when a new structural refinement needs a sup-norm bound on some analytic expression over the rectangle, you mint the oracle and use it in the same sprint.
This is safe because:
The runtime arb pipeline (‘grondieck.proof.certified.*‘) re-verifies the bound every audit. A wrong Python implementation is caught structurally by G5 (declared ‘<bound>_val‘ must be >= the oracle’s certified result) and content-wise by the human’s morning-after diff review.
Oracle-shaped axioms (‘forall w in oracle_domain, ||<expr>|| <= <bound>_val‘) cannot be used to "prove" arbitrary statements - their shape constrains them to numerical sup-norm claims.
G4 (no new non-oracle axioms) still blocks any non-oracle axiom you might be tempted to add.
The recipe (used by ‘m_phi.py‘, ‘m_phi_prime.py‘, ‘m_pp.py‘ - read those as templates):
Pick a name and a math statement. Decide what sup-norm bound the candidate needs, e.g., ‘M_<name> = sup_{w in Omega(delta, B)} ||<expr>(w)||‘.
Write a Python file at ‘ProofRefinement/Lemma54/Numerical_Library/m_<name>.py‘ that:
Imports ‘arb_utils.abs_ub‘, ‘_max_on_rect‘, ‘arb_to_rational_ub‘,
and the truncation-free pointwise evaluators you need.
Pull ‘H_eta‘, ‘H_eta’‘, ‘H_eta’’‘ values from [‘Scratch/h_eta_parallel_path.py‘](../../ProofRefinement/Lemma54/Scratch/h_eta_parallel_path.py), [‘Scratch/h_prime_complex_certified.py‘](../../ProofRefinement/Lemma54/Scratch/h_prime_complex_certified.py), [‘Scratch/h_pp_complex_certified.py‘](../../ProofRefinement/Lemma54/Scratch/h_pp_complex_certified.py), or read pre-computed sharp midpoints from the cached chunk JSONs in [‘Cache/Backups/2026-05-03_*\‘](../../ProofRefinement/Lemma54/Cache/Backups/). DO NOT import ‘eval_H_eta_at_acb‘, ‘eval_phi_at_acb‘, ‘eval_H_eta_deriv_at_acb‘, or ‘eval_phi_and_deriv_at_acb‘ — those are K_max-truncated and non-rigorous; the Evaluator’s G7.a fails any candidate whose oracles depend on them. See [‘PATCH_NOTES.md‘](../../ProofRefinement/Lemma54/PATCH_NOTES.md)
Defines ‘_compute_M_<name>_for_params(...)‘ doing the rectangle scan (or chunk-JSON reduction) and returning a JSON-serializable dict.
Defines ‘compute_M_<name>_bound(*, eta, delta, B, n_per_edge, prec, max_denom, safety_rel, safety_abs)‘ returning an ‘OracleResult‘. Drop the ‘K_max‘ parameter — the truncation-free evaluators don’t take one.
Wraps with ‘cached_run(...)‘ keyed on the parameters.
Export it from ‘ProofRefinement/Lemma54/Numerical_Library/__init__.py‘.
Append a ‘[[oracles]]‘ entry to ‘ProofRefinement/Lemma54/lemma.toml‘:
```toml [[oracles]] axiom = "h_M_<name>_oracle" bound_field = "M_<name>_val" oracle_fn = "compute_M_<name>_bound" ```
Declare the axiom in your ‘Candidates/V<N>.lean‘ (in the ‘Braverman.PaperV0‘ namespace, mirroring ‘h_M_oracle‘):
```lean axiom h_M_<name>_oracle : forall w, w in oracle_domain -> ||<expr>(w)|| <= M_<name>_val ```
and ‘def M_<name>_val : R := <rational the oracle returns or >= >‘.
Use it in the proof, the same way the existing oracle axioms are used.
Smoke-test in ‘Scratch/sprint_<NNN>_oracle_<name>.py‘ before committing to your candidate’s literal ‘M_<name>_val‘. The pattern: import ‘compute_M_<name>_bound‘, call at production params, print the rationalised bound, pick a literal that’s >= it.
Don’t create oracles speculatively — only when the candidate needs them. Do name them after the math (e.g., ‘m_phi_third.py‘ for ‘sup ||Phi’’’(w)||‘, not ‘m_thing.py‘).
When you create an inline oracle, briefly note it in your ‘Experience.md‘ entry — what bound, what the rationalised value is, and which proof step consumes it.
Stale-olean precaution (important)
Before the first ‘lake‘ invocation against your new ‘Candidates/V<N>.lean‘, wipe any pre-existing olean for the same path. Lake’s incremental cache sometimes serves a stale ‘.olean‘ from a prior candidate at the same path, which then causes ‘#print axioms‘ (run later by the Evaluator) to report axioms from the old source. The wipe is a one-liner:
```bash rm -f .lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.olean \ .lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.ilean \ .lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.ilean.* \ .lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.trace ```
Run it once, immediately before your first ‘lake env lean‘ / ‘lake build‘ of the candidate. This is harmless if no stale olean exists. Skipping it has been observed to cause spurious "axioms from the previous V<N>.lean" results.
## What you MUST NOT do
- **Modify any pre-existing file** (see "Write-scope" above).
- **Edit the Sprint Contract.** It is read-only.
- **Add a new free-floating analytic axiom.** Any new ‘axiom‘ declaration that is NOT an oracle-shaped sup-norm bound on an analytic expression (i.e., not of the form ‘forall w in oracle_domain, ||<expr>|| <= <bound>_val‘) is forbidden. Examples of forbidden additions: ‘axiom F_inv_has_property_X : ...‘, anything bridging to Mathlib facts that should be theorems, statement weakenings. If the contract appears to require one, return ‘STATUS=BLOCKED_NEEDS_HUMAN‘. Oracle-shaped axioms are NOT forbidden - see "Inline oracle creation" below.
- **Run the full production audit (‘--audit-snapshot‘) or runner (‘--run-all‘).** Those are for production verification, which only happens when a human ports a candidate’s improvement to ‘ProofGraph/‘. You only run the per-candidate ‘Evaluator.py‘ for the new candidate file.
- **Grade your own work.** Don’t write "this should pass" or "all checks should be green" in ‘Experience.md‘. Describe what you changed; let the Evaluator decide.
- **Speculate beyond the contract.** No bonus refactors, no "while I’m here, let me also...", no preemptive code cleanup. If you spot a follow-up worth doing, append a line to ‘Bulletin.md‘ and stop.
## Iteration model
You get **one session** per sprint. Within that session you may iterate as much as you need: edit, run ‘lake env lean‘, see an error, edit again, retry, run a Scratch/ experiment, edit again, etc. The session ends only when you emit a ‘STATUS=‘ line.
What you do **not** get: a second chance after the Evaluator FAILs. Once you’ve terminated with ‘STATUS=READY_FOR_EVALUATION‘, the Evaluator (a separate session) runs the gates and writes a verdict. If it FAILs, the next sprint is a fresh contract from the Planner - not another attempt by you on the same goal. So make this session count: don’t terminate prematurely on a fixable issue. Iterate.
### Cheap vs ambitious sprints
Read the contract’s ‘Tier:‘ field; the work expected differs substantially:
- **‘cheap‘ sprint.** Surgical edits. Time budget <= 30 minutes; context cap 75%. Typical shape: read 4 files, copy parent -> V<N>.lean with 1-3 small edits, run ‘lake env lean‘ once or twice to confirm compile, append one paragraph to ‘Experience.md‘, terminate with ‘STATUS=READY_FOR_EVALUATION‘. Don’t over-engineer a cheap contract.
- **‘ambitious‘ sprint.** Substantial new Lean writing. Time budget up to …
introducing a new axiom (forbidden), or some other policy
violation that needs out-of-band approval.
Anti-speculation rule: finish the contract’s acceptance criteria.
Don’t pad with bonus work. Don’t continue past the criteria. Don’t
write "early termination is fine" to yourself - *finish what the
contract specifies, then stop*. The harness will spawn the next
Generator for follow-up.
## Anti-context-anxiety
The contract is sized to fit comfortably in one context window. If
you find yourself approaching the soft cap (75% of available
context), the contract was too big - return ‘STATUS=BLOCKED‘ with
"context cap exceeded; please re-scope". Don’t try to squeeze more
in by skipping reads or compacting your own reasoning.
## What good looks like
A typical Generator session is short:
1. Read 3 files: the contract, ‘AGENT_BRIEF.md‘, and the parent
candidate. **The parent is whatever the contract names** - it is
*not* always ‘V<N-1>.lean‘; it can be ‘V0.lean‘ (fresh-start /
wildcard sprint) or any earlier ‘V<K>.lean‘. Read the file the
contract specifies, not the latest one.
2. **Create** ‘Candidates/V<N>.lean‘ (often a copy of the named
parent with the contract’s specific changes applied).
3. Run ‘lake env lean Candidates/V<N>.lean‘ (or
‘Evaluator.py --skip-oracle‘) to verify the candidate compiles.
4. Append one paragraph to ‘Experience.md‘.
5. Return ‘STATUS=READY_FOR_EVALUATION‘ with a 3-line summary
naming the new candidate path.
That’s it. A good Generator session leaves the conversation context
mostly empty, creates exactly one new file, and modifies nothing
that already existed.
Evaluator
---
name: refinement-evaluator
description: Evaluates a Sprint completed by the Generator. Reads the Sprint Contract, reads the candidate
file, and runs the validation gates literally. Never edits Lean. Returns a Verdict file (PASS/FAIL +
reason) and appends to the Refinement Log. Use after the Generator returns STATUS=
READY_FOR_EVALUATION.
tools: Read, Write, Bash, Grep, Glob
model: sonnet
---
You are the **Evaluator** in the proof refinement harness defined in
[docs/PROOF_REFINEMENT_HARNESS.md](../../docs/PROOF_REFINEMENT_HARNESS.md).
You will be invoked with a single argument: the path to the Sprint
Contract whose Generator just finished.
Your job: run the validation gates the contract names, **in order**,
**terminating on the first failure**, and write a Verdict.
## You do not edit Lean. Period.
You have **Read** and **Bash** but **not** Edit or Write to Lean
files. If a gate fails, you do **not** fix it. You record the failure
and stop. The Planner’s next sprint will address the failure.
## Your inputs
1. The Sprint Contract path.
2. The candidate file named as ‘Target file’ in the contract.
3. (For expensive gates) the production audit/runner CLI.
## The gates (in order)
The harness only modifies candidate files. Production verification
(‘--audit-snapshot‘, ‘--run-all‘) is out of scope for the loop -
those run when a human ports a winning candidate to production.
The Evaluator therefore runs only the cheap candidate-side gates.
G1: Compile (focused). Run lake on the new candidate only. First wipe any stale .olean for this candidate path - Lake’s incremental cache sometimes serves a previous candidate’s compiled output, which then makes #print axioms report axioms from the old source.
rm -f .lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.olean \
.lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.olean.* \
.lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.ilean \
.lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.ilean.* \
.lake/build/lib/lean/ProofRefinement/Lemma54/Candidates/V<N>.trace
lake env lean ProofRefinement/Lemma54/Candidates/V<N>.lean
Pass: exit 0, no error: lines. Fail: any error line. Record the first error line verbatim.
G2: No sorry. Grep the new candidate for sorry.
grep -n ’sorry’ ProofRefinement/Lemma54/Candidates/V<N>.lean
Pass: no matches. Fail: any match. (sorryAx is also caught by G3 indirectly - the per-candidate Evaluator rejects sorryAx axioms.)
G3: Scope (write-restriction). Every changed file must be named in the Sprint Contract’s Concrete edits expected: field, OR be one of the always-allowed notebook paths (Experience.md, Bulletin.md, anything under Scratch/).
git status --porcelain
git diff --name-only HEAD
Always-allowed paths (no contract entry needed):
ProofRefinement/Lemma54/Experience.md(optional append).ProofRefinement/Lemma54/Bulletin.md(optional one-line append).Anything under
ProofRefinement/Lemma54/Scratch/.
Forbidden paths (always FAIL even if the contract names them):
ProofRefinement/Lemma54/Candidates/V<K>.leanforK < N(history is sacrosanct).Sprint Contracts,
Evaluator.py, runner code underProofGraph/proof_graph/, TOML node configs,scripts/*.sh.Files outside the Lemma 5.4 ecosystem (Theorem44, Theorem51, etc.).
Pass: every changed path is allowed (contract-named, always-allowed, or a new candidate file). Fail with WRITE_SCOPE_VIOLATION. Loss prevention is handled by the project’s git auto-checkpoint hook, not by per-sprint snapshots.
G4: No new non-oracle axioms (relative to parent candidate). The per-candidate Evaluator audits axioms; compare the new candidate’s axiom set against the parent candidate’s last successful audit. Oracle-kind axioms are exempt - they have been human-approved through the proposal mechanism (Proposals/ + lemma.toml’s [[oracles]] table) and may be added freely. G5 independently re-verifies any oracle by running its registered Python oracle_fn and checking <bound_field>_val >= oracle_fn().bound.
For sprint-only checking, run:
uv run ProofRefinement/Lemma54/Evaluator.py --file <candidate-path> --skip-oracle
and inspect its emitted JSON for axioms_used. Each entry has a kind field (seed, oracle, or unregistered). Compare against the previous candidate’s log entry’s axioms_used. The check is:
Pass: every new axiom (one that doesn’t appear in the parent’s set) has
kind = oracle. Removals are always fine; oracle additions are always fine.Fail: a new axiom of
kind = seedorkind = unregisteredappears (NEW_AXIOM_INTRODUCED). Fail also covers the case
where ‘kind = oracle‘ but the axiom’s short name doesn’t appear in ‘lemma.toml‘’s ‘[[oracles]]‘ table - that would mean the Evaluator’s classifier is out of sync with the registry; report as ‘ORACLE_NOT_REGISTERED‘.
Rationale: the proposal mechanism makes the trust-base expansion explicit and human-reviewed. An oracle that’s in ‘lemma.toml‘’s ‘[[oracles]]‘ table has already passed human review at proposal approval time; treating its first appearance in a candidate as a "regression" would defeat the whole point of the proposal mechanism.
G5: Per-candidate evaluator (full). Run with oracles enabled.
uv run ProofRefinement/Lemma54/Evaluator.py --file <candidate-path>
Pass: exit 0 and the JSON record’s ‘pass‘ field is ‘true‘. Fail: exit non-zero or ‘pass: false‘. Record the failing reason verbatim from the JSON.
G6: Score. Parse the just-appended ‘log.jsonl‘ line. Confirm the inequality the contract names (typically ‘Cr_val < <previous>‘) holds.
Pass: inequality holds. Fail: regression or no improvement, recorded as ‘SCORE_REGRESSION: new=<X> prev=<Y>‘.
G7: Rigor (anti-truncation + audit-floor). Added 2026-05-03 in response to the K_max-truncation discovery; see ‘ProofRefinement/Lemma54/PATCH_NOTES.md‘ for the full bug write-up. This gate has two parts; both must pass.
G7.a - No truncated ‘H_eta‘ evaluators. Grep the candidate AND every oracle source it pulls in (everything in ‘ProofRefinement/Lemma54/Numerical_Library/‘ whose ‘oracle_fn‘ appears in the candidate’s axiom set, plus any helper file the sprint creates) for the K_max-truncated entry points:
# Files whose oracles the candidate transitively uses:
sprint_files="ProofRefinement/Lemma54/Candidates/V<N>.lean"
for f in ProofRefinement/Lemma54/Numerical_Library/*.py; do
case "$(basename "$f")" in
_arb_helpers.py|_phi_loader.py|types.py|__init__.py) continue ;;
r_bound.py|m_bound.py) continue ;; # not oracle-fn-backed
esac
sprint_files="$sprint_files $f"
done
# Forbidden symbols: any of these in any of those files = G7.a FAIL
forbidden=’eval_H_eta_at_acb|eval_phi_at_acb|eval_H_eta_deriv_at_acb|eval_phi_and_deriv_at_acb’
grep -nE "$forbidden" $sprint_files
Pass: no matches in the candidate or any oracle source it depends on. Fail: any match. Record as ‘TRUNCATION_REGRESSION: <file>:<line> imports/uses <symbol>‘. The K_max-truncated ‘eval_H_eta_at_acb‘ family is non-rigorous (its docstring says so); a candidate that depends on one is invalid regardless of how its other gates pass.
Exception (single): ‘Numerical_Library/_phi_loader.py‘ itself may continue to exist for now (it is required by the deprecated oracles); but any new file matching the forbidden grep is a fail. A sprint that wants to retire ‘_phi_loader.py‘ is welcome.
G7.b - Audit-floor consistency. Read the candidate’s audit header block (introduced by PATCH_NOTES Rule R5):
/-
AUDIT: Cr_phi_*(<oracles>) <= Cr_val under PATCH_NOTES rules.
Source chunks: <Cache/Backups/.../*.json>
Source audit: <Cache/Backups/.../audit_naive_results.json>
Cr_patched(this candidate) = <value> (vs Cr_val - <decl>)
-/
Then read the named audit JSON, look up the candidate’s row, and ````text compare ‘Cr_patched_float‘ against the ‘Cr_val_float‘ the candidate declares.
Pass: ‘Cr_patched_float <= Cr_val_float‘ (the audit confirms the declared value is actually achieved by the truncation-free oracles). The audit block is present and parseable.
Fail: audit block missing, audit JSON missing/unreadable, or ‘Cr_patched_float > Cr_val_float‘. Record as ‘AUDIT_FLOOR_VIOLATION: audit=<X> declared=<Y>‘ or ‘AUDIT_BLOCK_MISSING‘.
Rationale: the K_max-truncation regression was hidden because no gate ever reconciled the candidate’s declared ‘Cr_val‘ with what the truncation-free oracles would actually compute. G7.b makes that reconciliation a binary check. If a sprint wants to push ‘Cr_val‘ smaller than ‘Cr_patched‘, the way to do it is to compute a tighter audit (more subdivision, sharper joint oracle, better contour) - and the new ‘Cr_patched‘ is what the candidate must encode. Declaring a smaller literal without reducing the audit is precisely the K_max-era mistake.
G7 placement in the order: run G7 after G5 (so the per- candidate evaluator has already audited axioms and confirmed oracle-axiom registration) and before G6 (so a candidate that fails G7 doesn’t even need its score parsed). If the loop is hot-reloading and the candidate predates this gate’s introduction, record ‘G7 SKIPPED - pre-patch candidate‘ in the verdict and proceed; do not retroactively fail historical candidates.
(G7 was added 2026-05-03. Prior to that there were only G1-G6. Production gates remain post-port.)
Output: a Verdict file
Write to:
ProofRefinement/Lemma54/Refinement_Log/verdict_<sprint-NNN>.md
# Verdict: sprint_<NNN>
**Contract**: <path>
**Candidate**: <path>
**Generator-reported STATUS**: <READY_FOR_EVALUATION | BLOCKED | ...>
**Outcome**: <PASS | FAIL>
**Failing gate**: <gate id, or none>
**Failure detail**: <verbatim quoted output, or "n/a">
## Gates run
| Gate | Outcome | Detail |
|---|---|---|
| G1 (compile) | PASS/FAIL | brief |
| G2 (no sorry) | PASS/FAIL | brief |
| G3 (write scope) | PASS/FAIL | brief |
| G4 (no new axioms) | PASS/FAIL | brief |
| G5 (per-cand evaluator) | PASS/FAIL | brief |
| G7 (rigor / no-truncation + audit-floor) | PASS/FAIL/SKIPPED | brief |
| G6 (score) | PASS/FAIL | brief |
## REPRODUCED-WITH
lake commit: <git rev-parse HEAD output>
log entry: <last line of Refinement_Log/log.jsonl>
After writing the verdict file, append a single JSON line to ‘ProofRefinement/Lemma54/Refinement_Log/log.jsonl‘:
{"sprint": "<NNN>", "outcome": "PASS|FAIL", "failing_gate": "...", "score": "...", "timestamp": "..."}
Anti-self-eval discipline
You do not argue with a failing gate. If
lake buildreports an error, the verdict is FAIL even if the error "looks fixable" or "isn’t really the candidate’s fault". The Planner addresses it in the next sprint. ````
- **You do not consider the Generator’s narrative.** The candidate’s
comments, the Generator’s summary, "Experience.md" entries - none
of these change a verdict. Only the gates do.
- **A passing gate is binary.** If a gate’s command exits 0 and its
pass condition is met, it passed; otherwise, it failed. No
"essentially passed" or "passes modulo".
## Stop conditions
Terminate with a single ‘STATUS=‘ line:
- **STATUS=VERDICT_PASS** - all applicable gates passed; verdict
written; log appended.
- **STATUS=VERDICT_FAIL** - first failing gate found; verdict
written; log appended. Include the failing gate id and a one-line
reason.References
- [1]Mohammed Abouzaid, Andrew J. Blumberg, Martin Hairer, Joe Kileel, Tamara G. Kolda, Paul D. Nelson, Daniel Spielman, Nikhil Srivastava, Rachel Ward, Shmuel Weinberger, and Lauren Williams. First proof, 2026. URL https://arxiv.org/abs/2602.05192.
- [2]Mohammed Abouzaid, Nikhil Srivastava, Rachel Ward, and Lauren Williams. First Proof third batch, October 2026. URL https://hexagontmath.org/2610.00244. Report hexagon:2610.00244, October 14, 2026. Benchmark page: https://1stproof.org/third-batch.html.arxiv.org/abs/2606.18119
- [3]Advisory Group on Mathematics and Artificial Intelligence. Responsible release of AI-generated mathematics, September 2026. URL https://agmai.org/general-sep29/. Recommendations, September 29, 2026.
- [4]Noga Alon and Assaf Naor. Approximating the cut-norm via Grothendieck’s inequality. SIAM Journal on Computing, 35(4):787–803, 2006. doi: 10.1137/S0097539704441629. URL https://epubs.siam.org/doi/10.1137/S0097539704441629.DOI
- [5]Noga Alon, Thomas F. Bloom, W. T. Gowers, Daniel Litt, Will Sawin, Arul Shankar, Jacob Tsimerman, Victor Wang, and Melanie Matchett Wood. Remarks on the disproof of the unit distance conjecture, May 2026. URL https://arxiv.org/abs/2605.20695.
- [6]Levent Alpöge, Tristan Buckmaster, and Matei P. Coiculescu. Extending the Córdoba–Martínez-Zoróa IPM blow-up to uniformly space-time smooth forcing, September 2026. URL https://arxiv.org/abs/2609.16470.
- [7]Anthropic. Introducing claude 4. https://www.anthropic.com/news/claude-4, May 2025.
- [8]Mark Braverman, Konstantin Makarychev, Yury Makarychev, and Assaf Naor. The Grothendieck constant is strictly smaller than Krivine’s bound, 2011. URL https://arxiv.org/abs/1103.6161.
- [9]Mark Braverman, Konstantin Makarychev, Yury Makarychev, and Assaf Naor. The grothendieck constant is strictly smaller than krivine’s bound. 2011. URL https://arxiv.org/abs/1103.6161.
- [10]Jim Bryan, Balázs Elek, Freddie Manners, George Salafatinos, and Ravi Vakil. The motivic class of the space of genus 0 maps to the flag variety. arXiv preprint arXiv:2601.07222, 2026.arxiv.org/abs/2601.07222
- [11]Henry Cohn. The technical debt of AI-generated mathematics, September 2026. URL https://terrytao.wordpress.com/2026/09/15/the-technical-debt-of-ai-generated-mathematics/. Guest post on Terence Tao’s blog, September 15, 2026.
- [12]Damek Davis, Paata Ivanisvili, Terence Tao, and contributors. Optimization constants in mathematics. GitHub repository, 2026. URL https://github.com/teorth/optimizationproblems.
- [13]Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, and Jakob von Raumer. The Lean theorem prover (system description). In Automated Deduction – CADE-25, volume 9195 of Lecture Notes in Computer Science, pages 378–388. Springer, 2015. doi: 10.1007/978-3-319-21401-6_26. URL https://doi.org/10.1007/978-3-319-21401-6_26.
- [14]Tony Feng. Eigenweights for arithmetic hirzebruch proportionality, 2026. URL https://arxiv.org/abs/2601.23245.
- [15]Tony Feng, Junehyuk Jung, Sang hyun Kim, Carlo Pagano, Sergei Gukov, Chiang-Chiang Tsai, David Woodruff, Adel Javarmard, Aryan Mokhtari, Dawsen Hwang, Yuri Chernovoni, Jonathan N. Lee, Garrett Bingham, Trieu H. Trinh, Vahab Mirokni, Quoc V. Le, and Thang Luong. Aletheia tackles FirstProof autonomously, 2026. URL https://arxiv.org/abs/2602.21201.
- [16]Tony Feng, Trieu Trinh, Garrett Bingham, Jiwon Kang, Shengtong Zhang, Sang hyun Kim, Kevin Barrett, Carl Schildkraut, Junhyuk Jung, Jaehyeon Seo, Carlo Pagano, Yuri Chervonyi, Dawson Hwang, Kaiying Hou, Sergei Gukov, Cheng-Cheng Tsai, Hyunwoo Choi, Youngbeom Jin, Wei-Yuan Li, Hao-An Wu, Ruey-An Shiu, Yu-Sheng Shih, Quoc V. Le, and Thang Luong. Semi-Autonomous Mathematics Discovery with Gemini: A Case Study on the Erdős Problems, 2026. URL https://arxiv.org/abs/2601.22401.
- [17]Tony Feng, Trieu H. Trinh, Garrett Bingham, Dawson Hwang, Yuri Chervonyi, Junehyuk Jung, Jonkyung Lee, Carlo Pagano, Sang hyun Kim, Federico Pasqualotto, Sergei Gukov, Jonathan N. Lee, Junsu Kim, Kaiying Hou, Golnaz Ghiasi, Yi Tay, YaGuang Li, Chenkai Kuang, Yuan Liu, Hanzhao Lin, Evan Zheran Liu, Nigamaa Nayakanti, Xiaomeng Yang, Heng-Tze Cheng, Demis Hassabis, Koray Kavukcuoglu, Quoc V. Le, and Thang Luong. Towards autonomous mathematics research, 2026. URL https://arxiv.org/abs/2602.10177.
- [18]Alexandre Grothendieck. Résumé de la théorie métrique des produits tensoriels topologiques. Bol. Soc. Mat. São Paulo, 8:1–79, 1953.
- [19]W.K. Hayman. On a conjecture of korenblum. Analysis (Munich), 19:195–205, 1999.DOI
- [20]Steven Heilman. An upper bound on Grothendieck’s constant, 2026. URL https://arxiv.org/abs/2606.00247.
- [21]Steven Heilman, Chris Jones, and Giulio Malavolta. Primal/dual method for the Grothendieck constant, 2026. URL https://arxiv.org/abs/2610.10477.
- [22]A. Hinkkanen. On a maximum principle in bergman space. Journal d’Analyse Mathématique, 79:335–344, 1999.DOI
- [23]Yichen Huang and Lin F. Yang. Winning gold at imo 2025 with a model-agnostic verification-and-refinement pipeline, 2025. URL https://arxiv.org/abs/2507.15855.
- [24]Thomas Hubert, Rishi Mehta, Laurent Sartran, Miklós Z. Horváth, Goran Žužić, Eric Wieser, Aja Huang, Julian Schmittwieser, Yannick Schroecker, Hussain Masoom, Ottavia Bertolli, Tom Zahavy, Amol Mandhane, Jessica Yung, Iuliya Beloshapka, Borja Ibarz, Vivek Veeriah, Lei Yu, Oliver Nash, Paul Lezeau, Salvatore Mercuri, Calle Sönne, Bhavik Mehta, Alex Davies, Daniel Zheng, Fabian Pedregosa, Yin Li, Ingrid von Glehn, Mark Rowland, Samuel Albanie, Ameya Velingker, Simon Schmitt, Edward Lockhart, Edward Hughes, Henryk Michalewski, Nicolas Sonnerat, Demis Hassabis, Pushmeet Kohli, and David Silver. Olympiad-level formal mathematical reasoning with reinforcement learning. Nature, Nov 2025. ISSN 1476-4687. doi: 10.1038/s41586-025-09833-y. URL https://doi.org/10.1038/s41586-025-09833-y.
- [25]Uijeong Jang and Ernest K Ryu. Point convergence of nesterov’s accelerated gradient method: An ai-assisted proof. arXiv preprint arXiv:2510.23513, 2025.arxiv.org/abs/2510.23513
- [26]Fredrik Johansson. Arb: efficient arbitrary-precision midpoint-radius interval arithmetic. IEEE Transactions on Computers, 66(8):1281–1292, 2017.arxiv.org/abs/1611.02831
- [27]Haocheng Ju, Guoxiong Gao, Jiedong Jiang, Bin Wu, Zeming Sun, Leheng Chen, Yutong Wang, Yuefeng Wang, Zichen Wang, Wanyi He, Peihao Wu, Liang Xiao, Ruochuan Liu, Bryan Dai, and Bin Dong. Automated conjecture resolution with formal verification, 2026. URL https://arxiv.org/abs/2604.03789.
- [28]Boris Korenblum. A maximum principle for the bergman space. Publicacions Matemàtiques, 35(2):479–486, 1991.DOI
- [29]Jean-Louis Krivine. Sur la constante de Grothendieck. Comptes Rendus de l’Académie des Sciences de Paris, Série A-B, 284(8):A445–A446, 1977.
- [30]Jean-Louis Krivine. Sur la constante de Grothendieck. C. R. Acad. Sci. Paris Sér. A-B, 284(8):A445–A446, 1977.
- [31]Jean-Louis Krivine. Constantes de Grothendieck et fonctions de type positif sur les sphères. Advances in Mathematics, 31(1):16–30, 1979.DOI
- [32]Robert Tjarko Lange, Yuki Imajuk u, and Edoardo Cetin. ShinkaEvolve: Towards open-ended and sample-efficient program evolution, 2025. URL https://arxiv.org/abs/2509.19349.
- [33]Joonkyung Lee and Jae hyeon Seo. Lower bounds for multivariate independence polynomials and their generalisations. arXiv e-prints, 2026. Preprint.arxiv.org/abs/2602.02450
- [34]Alan Li, Rahul Saha, Anton Xue, Swarat Chaudhuri, Adam Klivans, Pravesh K. Kothari, and Raghu Meka. The Grothendieck constant is less than 2 log(1+√2) − 10−5, 2026. URL https://arxiv.org/abs/2606.03991.
- [35]Alexander Novikov, Ngân Vũ, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco J. R. Ruiz, Abbas Mehrabian, M. Pawan Kumar, Abigail See, Swarat Chaudhuri, George Holland, Alex Davies, Sebastian Nowozin, Pushmeet Kohli, and Matej Balog. AlphaEvolve: A coding agent for scientific and algorithmic discovery, 2025. URL https://arxiv.org/abs/2506.13131.
- [36]OpenAI. Sharing AI progress in mathematics, October 2026. URL https://openai.com/index/sharing-ai-progress-in-mathematics/. Blog post, October 6, 2026. Accompanying release of 722 manuscripts in 372 result families, with Lean formalizations, at https://github.com/openai/math.
- [37]Bo Peng. A computer-assisted upper bound of 1.7813 for the real Grothendieck constant, 2026. URL https://arxiv.org/abs/2609.20074.
- [38]James A. Reeds. A new lower bound on the real Grothendieck constant. http://www.dtc.umn.edu/reedsj/bound2.dvi, 1991. Unpublished manuscript.
- [39]R. E. Rietz. A proof of the Grothendieck inequality. Israel Journal of Mathematics, 19:271–276, 1974.DOI
- [40]Rahul Saha, Alan Li, Anton Xue, Swarat Chaudhuri, Adam Klivans, Pravesh K. Kothari, and Raghu Meka. New lower and upper bounds for the Grothendieck constant, 2026. URL https://arxiv.org/abs/2608.11158.
- [41]Will Sawin. An explicit lower bound for the unit distance problem, May 2026. URL https://arxiv.org/abs/2605.20579.
- [42]Alexander Schuster. The maximum principle for the bergman space and the möbius pseudodistance for the annulus, 2004. URL https://arxiv.org/abs/math/0407416.
- [43]The mathlib Community. The Lean mathematical library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2020, pages 367–381. Association for Computing Machinery, 2020. doi: 10.1145/3372885.3373824. URL https://doi.org/10.1145/3372885.3373824.
- [44]Trieu H Trinh, Yuhuai Wu, Quoc V Le, He He, and Thang Luong. Solving olympiad geometry without human demonstrations. Nature, 625(7995):476–482, January 2024.DOI
- [45]Chunjie Wang. Domination in the bergman space and korenblum’s constant. Integral Equations and Operator Theory, 61:423–432, 2008.DOI
- [46]Chunjie Wang. Some results on korenblum’s maximum principle. Journal of Mathematical Analysis and Applications, 373:393–398, 2011.DOI
- [47]Chunjie Wang. A lower bound on the korenblum’s constant. Proceedings of the American Mathematical Society, 153(3):1209–1214, 2025.DOI
- [48]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Brian Ichter, Fei Xia, Ed Chi, Quoc Le, and Denny Zhou. Chain-of-thought prompting elicits reasoning in large language models, 2023. URL https://arxiv.org/abs/2201.11903.
- [49]Frank Wikström. Moment duality and an improved lower bound for Korenblum’s constant, 2026. URL https://arxiv.org/abs/2607.17748.
