# Agentic Algorithm Design: LLMs that Propose, Formalise, and Prove Runtime Bounds for Evolutionary Algorithms in Lean

DevFeed: [Agentic Algorithm Design: LLMs that Propose, Formalise, and Prove Runtime Bounds for Evolutionary Algorithms in Lean](<https://devfeed.tech/articles/agentic-algorithm-design-llms-that-propose-formalise-and-prove-runtime-bounds-for-evolutionary-algorithms-in-lean-103049.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.35595>)

Author: Per Kristian Lehre

Published: 2026-10-28T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>)

Topics: [Automated reasoning](<https://devfeed.tech/topics/automated-reasoning.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Lean](<https://devfeed.tech/topics/lean.md>), [polynomials](<https://devfeed.tech/topics/polynomials.md>)

Tags: [ablation](<https://devfeed.tech/tags/ablation.md>), [agent](<https://devfeed.tech/tags/agent.md>), [agentic](<https://devfeed.tech/tags/agentic.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [analysis](<https://devfeed.tech/tags/analysis.md>), [automated](<https://devfeed.tech/tags/automated.md>), [black](<https://devfeed.tech/tags/black.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-ne](<https://devfeed.tech/tags/cs-ne.md>), [design](<https://devfeed.tech/tags/design.md>), [discovery](<https://devfeed.tech/tags/discovery.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [evaluation](<https://devfeed.tech/tags/evaluation.md>), [filter](<https://devfeed.tech/tags/filter.md>), [first](<https://devfeed.tech/tags/first.md>), [frontier](<https://devfeed.tech/tags/frontier.md>), [guards](<https://devfeed.tech/tags/guards.md>), [improvement](<https://devfeed.tech/tags/improvement.md>), [lean](<https://devfeed.tech/tags/lean.md>), [llms](<https://devfeed.tech/tags/llms.md>), [runtime](<https://devfeed.tech/tags/runtime.md>)

## AI overview

The paper presents a staged LLM pipeline that proposes black-box optimisation algorithms, uses Lean to reject flawed designs, then formalises potential functions and proves drift bounds for expected runtime. It reports an algorithm with expected runtime O(n²) on CycleUncover, compared with e^{Ω(n)} for the classical (1+1) EA; O(n^{2+2c}) for integer-valued submodular minimisation; and O(n²) on LeadingOnes. Across 8 problem classes, 12 of 15 runs with frontier models completed the pipeline with machine-checked runtime bounds. The authors report that removing the stages led to copying the seeded random-search baseline or incomplete proofs. Algorithms were not compared empirically; the evidence described is formal verification, and the findings are limited to the reported problems and runs.

## Source excerpt

arXiv:2610.35595v2 Announce Type: replace Abstract: LLMs now prove hard theorems in Lean. Can they also design algorithms and prove their correctness and efficiency? LLM-guided design of optimisation heuristics (such as AlphaEvolve) is purely empirical. Automated theorem provers with LLMs prove given statements. So far, there has been little evidence that LLMs can do both: design an algorithm and guarantee its efficiency by a mathematical proof. We present a staged pipeline modelled after research methodology in design and analysis of evolutionary algorithms. The agent proposes black-box optimisation algorithms, and Lean guards filter out flawed designs. The agent then defines a potential function and proves drift bounds that guarantee an expected runtime improvement over the baseline algorithm. At no point in the pipeline are the algorithms compared empirically. The agent generates a black-box optimisation algorithm with expected runtime $O(n^2)$ on a CycleUncover problem, where the classical (1+1) EA needs runtime $e^{\Omega(n)}$. The pipeline also designs and analyses a black-box optimisation algorithm for integer-valued submodular minimisation with expected runtime $O(n^{2+2c})$, and it matches the classical runtime $O(n^2)$ on LeadingOnes. Across 8 problem classes, 12 of 15 runs with frontier models complete the pipeline with a machine-checked expected-runtime bound. An ablation study shows that removing the staging and asking the agent to zero-shot an algorithmic design with a runtime guarantee leads to a copy of the seeded baseline algorithm (random search) or to incomplete proofs. Our study suggests that machine-checked specifications in Lean can replace empirical evaluation in open-ended algorithm discovery. To the best of our knowledge, this is the first example of an automated pipeline that designs efficient black-box optimisation algorithms with machine-checked runtime bounds in Lean.