DRIFT: Decompose, Retrieve, Illustrate, then Formalize Theorems
Authors: Meiru Zhang
Philipp Borchert
Milan Gritta
Gerasimos Lampouras
Venue: ICLR 2026 Poster (2026)
Keywords: autoformalization
retrieval augmented generation
decomposition
Primary area: neurosymbolic & hybrid AI systems (physics-informed, logic & formal reasoning, etc.)

Abstract: Automating the formalization of mathematical statements for theorem proving remains a major challenge for Large Language Models (LLMs). LLMs struggle to identify and utilize the prerequisite mathematical knowledge and its corresponding formal representation in languages like Lean. Current retrieval-augmented autoformalization methods query external libraries using the informal statement directly, but overlook a fundamental limitation: informal statements lack direct mappings to mathematical theorems and lemmata, nor do those theorems translate trivially into the formal primitives of languages like Lean.
To address this, we introduce DRIFT, a novel framework that enables LLMs to decompose informal mathematical statements into smaller, more tractable "sub-components". This facilitates targeted retrieval of premises from mathematical libraries such as Mathlib. Additionally, DRIFT retrieves illustrative theorems to help models use premises more effectively in formalization tasks. 
We evaluate DRIFT across diverse benchmarks (ProofNet, ConNF, and MiniF2F-test) and find that it consistently improves premise retrieval, nearly doubling the F1 score compared to the DPR baseline on ProofNet. Notably, DRIFT demonstrates strong performance on the out-of-distribution ConNF benchmark, with BEq+@10 improvements of 42.25% and 37.14% using GPT-4.1 and DeepSeek-V3.1, respectively. Our analysis shows that retrieval effectiveness in mathematical autoformalization depends heavily on model-specific knowledge boundaries, highlighting the need for adaptive retrieval strategies aligned with each model's capabilities.

Published as a conference paper at ICLR 2026
DRIFT: DECOMPOSE, RETRIEVE, ILLUSTRATE, THEN FORMALIZE THEOREMS
Meiru Zhang"!, Philipp Borchert', Milan Gritta', Gerasimos Lampouras 'Language Technology Lab, University of Cambridge, UK HHuawei Noah's Ark Lab, London, UK mz4 1224680cam cam. ac uk, philipp www.bbrrrtt-arrreeaeeeee. milan. milan.griteen wwwwwtatttweeeii...eee com, gerasimos www.rrasimss.a.mmmooommmm wampourasehuwwei.coommmmmm
com,
ABSTRACT
Automating the formalization of mathematical statements for theorem proving re- mains major challenge for Large Language Models (LLMs). LLMs struggle identify and utilize the prerequisite mathematical knowledge and its correspond- ing formal representation in languages like Lean. Current retrieval-augmiented autoformalization methods query external libraries using the informal statement directly, but overlook a fundamental limitation: informal statements lack direct mappings to mathematical theorems and lemmata, nor do those theorems trans- late trivially into the formal primitives of languages like Lean. To address this, we introduce DRIFT, novel framework that enables LLMs to decompose in- formal mathematical statements into smaller, more tractable "sub-components", This facilitates targeted retrieval of premises from mathematical libraries such as Mathlib. Additionally, DRIFT retrieves illustrative theorems to help models premises more effectively in formalization tasks. We evaluate DRIFT across diverse benchmarks (ProofNet, ConNF, and MiniF2F-rest) and find that it con- sistently improves premise retrieval, nearly doubling the Fl score compared the DPR baseline on ProofNet. Notably, DRIFT demonstrates strong performance on the out-of-distribution ConNF benchmark, with BEq+@ 10 improvements of 42.25% and 37.14% using GPT-4.1 and DeepSeek-V35 respectively. Our anal- ysis shows that retrieval effectiveness in mathematical autoformalization depends heavily on model-specific knowledge boundaries, highlighting the need for adap- tive retrieval strategies aligned with each model's capabilities.
INTRODUCTION
Autoformalization is formulated as translation task from natural language mathematical descrip- tions to machine-verifiable statements written formal languages, such as Rocq (Barras et al.) 1997]. Isabelle (Paulson 1994). and Lean (De Moura al. 2015). Previous work has shown that accurate autoformalization a critical step towards developing automated theorem proving sys- |in
tems (Lin et al. 2025b Chen et al.] 2025 Xin al. 2024 Lin al. 2025c). and ultimately assisting mathematicians in new discoveries (Gouëzel & Shchur 2019; Leang et al. (025). Despite recent progress by Large Language Models (LLMs) in informal mathematical reasoning (Ahn et al. [204]] Setlur et al. 2024; Luong & Lockhart 2025), formal reasoning presents distinct challenges. The strict syntax and necessity for precise alignment between informal concepts and formal definitions mean that even frontier LLMs often fail at autoformalization tasks off-the-shelf (Wu et al. 2025).
Although synthetic data generation could enable the finetuning of LLMs for autoformalization (Jiag et al., 2023] Lin et al., 2025a Wang et al. 2024) Ying et al. 2024), the knowledge cutoff issue raised by updating formal libraries like Mathlib (Mathlib Community 2020) makes finetuned mod- els prone to hallucinating about non-existent formal objects that have been renamed, reorganized, or deprecated (Baanen et al. (2025). To bypass these static limitations and support dynamic test-time queries for agentic models, early eetrieval-augmentee methods addressed this by retrieving similar theorems from external libraries to provide useful syntactic structures and compositional examples.
Work conducted during an internship Huawei Noah's Ark Lab, London.

---

Published as a conference paper at ICLR 2026
Informal Statement (IF)
Consider prime 5p5 the form $4 1435. Show that Sa5 primitive root modulo SpS iff 5-aS has order 5(p-1)/
Q prime number p is formally expressed in
p
Prime
TsPrin
(Formalization Instruction]
Og: A primitive root modalo p is co. Lean using which assemts that..
castiiinon (2ned p3)
primitiveRools
|Premise Set
Q;: The negation modular anihhmetic.... ring structure of ZMod
Theoren
[a
Qui has onder (p-1)2 moins i. expressed as onderOO (<a: (2Mod p) ...
ZMod
:ord conderOF p-1
p]
[Theorem Sctj
Qg: biconditional statement primitive root modiloo a onderOr (7Mod p)7)
IsPrimitiveRoot
Thooess (p :Plat.
[Informal Statement]
O₂: muliiplicative order element ...
orderOr
using onderOi' a in (ZMod pl...
Formalize Theorems
Decompose
Retrieve
3
Illustrate
Formal Statement (FS)
theoren Ireland- Rosen exercise to t N) (hpe : p. p.Prine) (hp1 p 4rt 3) (a 2Mod p) IsPrInitiveRoot
* ((-a) ((p-1)/2) 1AY (k N), k. (p-1)/2 (-a)"k + 1) :- sorry
Figure 1: An overview of the DRIFT framework. Given an informal statement, DRIFT operates in four stages: Decompose: An LLM breaks down the informal statement into atomic, concept- focused sub-queries (Q) ($..1. @ Retrieve: For each sub-query, a dense retriever identifies foun- dational dependent premises from a formal library ($3.) Illustrate: Greedy selection of a small set of theorems that demonstrate the practical usage of retrieved premises ($3.3) c Formalize The-
orems:
Conditioned on all retrieved context, an L.M synthesizes the final formal statement ($3.4).
However, their practical utility as exemplars has been limited by the retrieval methods used to find them. These methods often lack task-specife training data and rely on general-purpont techniques like keyword searching (Agrawal et al. 2022), k-NN (Azerbayev et al. (023), or pretrained dense retrievers (Zhang et al. 2024). An advance is the introduction of the "'dpendency retrieval" task by Liu et al., (2025) with the RAutoformalizer (RAuto) framework. Similar to the premise selection for proof generation (Yang et al. 2023), this paradigm enables the training of specialized retrievers to identify the exact definitions that formal statements require. However, this new approach created key trade-off: focusing individual components meant losing the valuable context provided by full theorem statements. Based on these observations, we identify two main limitations in the current approach retrieval-augmeented autoformalization. First, informal statements are often dense and multifaceted. This underlying complexity of queries makes them suboptimal as direct queries for retrieving the precise, atomic definitions required for formalization. Second, even when the correct formal definitions are retrieved, models often lack the knowledge of contextual usage required to correctly structure and integrate them into the formal statement.
In information retrieval, query enhancement techniques like query expansion (Chan et al. 2024
gpeudo-document generation (Gao et al., (023), and neural query rewriting (Wang et al. (2025) ) have demonstrated the effectiveness of reformu lating queries to enrich their semantic information. Query decomposition has proven particularly useful for multi-hop question answering as it matches the granularity of the dense query statements with the indexed documents (Ammann et al. 2025). In addition to retrieving correct premises, providing rich context like exemplar proofs can guide proof generation effectively (He al. 2024 Thakur et al. 2024 Thompson et al. 2025). Despite such advances, these techniques have not yet been systematically ly applied to dependency retrieval for autoformalization, which still relies monolithic queries and provides context-free definitions.
We propose DRIFT, a novel framework depicted in Figure I that enhances retrieval- -uumeete- aut- oformalization by adapting query decomposition and context augmentation address the unique challenges of theorem autoformalization. To tackle the complexity of informal statements, we first decompose statements into series of simpler, atomic sub-queries. Fach sub-query targets single mathematical concept, transforming multifaceted retrieval problem into focused, precise searches. To better integrate the dependencies, contextualize the retrieved definitions with illustrative the- orems, giving the model concrete examples of syntax and application patterns
'The code and models are htwpa//wwwnno.uoooooooooooooooto and http::://hhugiigfaacccc////o///s hag---aaaa--Raannnn///oaaaa Rethh--Rsssnnnnn
www.oninsnnnnno....ee..... IP dpr mathlib
2

---

Published as a conference paper at ICLR 2026
Contributions. 1) We introduce DRIFT (Decompose, Retrieve, Illustrate, then Formalize retrieval- -argevel- formalization framework that au-
Theorems), a decomposition- tonomously breaks down informal mathematical statements into atomic sub-queries and contextual- izes retrieved premises with demonstrative theorems. This approach bridges the critical gap between formal definition and syntactic usage while transforming monolithic retrieval into a process aligned with the dependency structure of formal mathematics. 2) Our experiments establish new state-of- the-art in dependency retrieval and autoformalization on ProofNet and ConNF across both frontier LLMs and specialized open-source formalization models, with exceptional performance on the out- of-distribution ConNF benchmark. 3) Through systematic analysis, we establish that the utility of retrieved dependencies is conditioned on the gap between model's parametric knowledge and the statement's complexity. These insights reveal critical design considerations for retrieval-augee -aggrale systems and point toward the necessity of adaptive strategies that can assess when external knowl- edge genuinely complements model capabilities.
2 RELATED WORK
Retrieval-augmentte Autoformalization. Early reureetal-uugmented autoformalization methods retrieved similar theorems as few-shot examples. For instance, ProofNet (Azerbayev et al., 2023) employs k-NN search, while MS-RAG (Zhang et al. 2024) uses informall-o-intorraal retrieval with iterative refinement. LTRAG (Hu et al. (2025) retrieves mhought-guides theorem pairs for neuro- symbolic formalization. In a key development, Liu et al.] (2025) established the "dependency retrieval" paradigm, premise selection task specialized for autoformalization: given infor- mal statement, retrieve the precise set of formal objects and definitions P Poractes that are required for its autoformalization from a library DD (e.g.. Mathlib). It is essential distinguish this task from theorem retrieval tools (e.g., LeanSearch (Gao et al. 2024). LeanExplore (Asher) (025)) Moogle (Morph Labs 2025) or BM25). While some of these systems may also retrieve defi- nitions or structures in practice, they primarily return semantically similar theorems to serve as examples, whereas dependency retrieval explicitly targets the precise, low-level formal definitions (e.g., IsPrimi t veRoot, ZMod) required for the formal statement. Implementing this paradigm, RAutoformalizer (RAuto) (Liu et al. (2025) demonstrated improvements over non-retrieval meth- ods, yet the evaluation revealed significant gap compared to oracle systems with ground-truth dependencies. CRAMF (Lu et al. 2025) attempts conceptual mapping between abstraction levels. Critically, however, all existing approaches treat complex statements monolithic queries, failing to identify distinct mathematical concepts within them.
Query Decomposition and Enhancement. Query enhancement has proven effective across re- trieval tasks. Query2Doc (Wang et al.) 2023) and HyDE (Gao et al. 2023) generate pseudo- documents to expand semantic coverage. LeanSearch (Gao et al. 20244) augments the informal statement by prompting an LLM to translate the query into a detailed statement containing both informal and formal expressions. However, they only evaluated with similar theorem retrieval but not on the downstream formalization. More relevant to work, query decomposition has shown success in multi-hop question answering (Ammann et al., 2025). where breaking complex ques- tions into sub-queries improves retrieval of distinct information aspects. Zhao et al. (2023) and Jiang et al. (2022) applied similar decompositions to theorem proving, showing the effectiveness of fivide-and-conquee in formal math. Despite these successes, no prior work has applied decompo- sition to informal mathematical statements for autoformalization. Specifically, generic query aug- mentation methods fail to capture the strict dependency structure within theorems. To bridge this gap, DRIFT employs atomic decomposition to directly map mathematical concepts to their formal definitions. Furthermore, unlike similarity-ban theorem selection, DRIFT conditions its theorem selection on the retrieved dependencies, ensuring the selected theorems explicitly demonstrate the required syntactic usage of those definitions.
3 METHODOLOGG
We introduce DRIFT (Decompose, Retrieve, Illustrate, then Formalize Theorems), novel four- stage method designed to address the two main limitations of previous retrieval- -aggenedd formal- ization methods: 1) the complexity of informal statements and 2) the lack of demonstrative examples
3

---

Published as a conference paper at ICLR 2026
for retrieved formal objects. As first step, LLM decomposes the informal statement into a set of smaller, granular sub-queries ($..I). These queries then guide the retrieval of dependent premises from formal library such as Mathlib ($3.2) In subsequent, bottom-up up illustration step, find theorems that utilize the retrieved premises, providing in-context demonstrations of their application (3..3) Finally, the LLM formalizes the original statement, conditioned all retrieved premises and theorems ($3.4). This process is visualized in Figure
3.1 DECOMPOSE
Standard retrieval methods often treat complex informal statements as monolithic queries and simply embed the entire statement. This approach disregards the rich semantic structure within statement, which may contain multiple distinct mathematical concepts. Their complexity means that a state- ment could be under-specified, ambiguous, and/or simply too information-dense Compressing the entire statement's 's meaning into a single dense vector creates a representational bottleneck, risking the loss of nuanced details and focusing the retrieval on only the most salient concepts. We hypothesize that by decomposing an informal statement into its constituent concepts, we can perform a more granular and accurate retrieval for each concept.
be used as is.
To this end, DRIFT begins with a Decompose module (panel ①D in Figure[], which is implemented as an LLM tasked with breaking down an informal statement (IF) into a set of structured sub-queries, Q, see Equation ! While the decomposer could be a finetuned model, we prompt off-the-shelf LLMs with few-shot examples in this study.
Decomposer(1F)- + 2 = [(ge, ()
(I)
where n, the number of sub-queries, varies for each informal statement and is determined dynami- cally by the decomposer. Each sub-query Q; = (g. ()) is designed to isolate a single mathematical concept. As illustrated in Figure [ the component qi is a natural language phrase describing the concept (e.g.. "A prime number p of the form 4t +-3 a prime that leaves remainder when divided by 4") while l is a predicted formal representation for that concept (e.g.. "p : N with the condi- natural numbers."" ").
tions Nri.Prime p and p % 4 3, where % denotes the modulo operation Appending this predicted formal name serves a dual purpose. First, it probes the LLM's parametric knowledge, providing syntactic "anchor" for the concept. Second, it allows the retriever to jointly leverage the semantics of the natural language phrase qi and the syntactic cues from I to identify the correct premise even in the presence of minor inaccuracies in the predicted formal representations.
3.2 RETRIEVE
The Retrieve module is designed to identify dependent premises from the library that correspond to the concepts isolated in each sub-query. This one-to-one mapping is visualized in the panel @ of Figure [ which shows each sub-query (Q:) being linked to a formal object (e.g.. g., PNat. P i me). To accomplish this, we implement dense passage retriever (Karpukhin al. 2020) using BGE- M3 (Chen et al. (022) encoder (Ee), finetuned on the dependency retrieval task as introduced by Liu et al. (2025). This training objective aligns the informal statements with their formal dependencies, thereby making semantic similarity a strong proxy for logical dependency. We retrieve dependencies by encoding queries and formal library objects into shared d-dimensional embedding space. The vector representations
Ep(p) for all formal objects p D are pre-computed in an offline step and stored in an efficient search index. At inference, each sub-query is encoded into a vector q, = (Q.) and the closest dependent premise p. is identified by finding the library object that maximizes the cosine similarity, Ø, with the query vector. This is formally defined as:
ps = argmax (Φ(q) p))
(2)
pen
where p(q: p) the top-1 results from each sub-query and removing duplicates: RDBEF Uh_ (p:).
||q Ilp The final set of dependent premises, R is formed by aggregating
q:p
4

---

Published as a conference paper at ICLR 2026
3.3 ILLUSTRATE
Retrieving useful formal definitions is necessary first step; however, it is not sufficient for suc- cessful autoformalization. For instance, retrieved definitions like "def ZMod indicate information about the concept, but provide no further guidance on its practical application, such as the syntax for declaring a variable of that type (a : ZMod p). This gap between defini- tion and usage is primary source of syntactic and structural errors in I.L.-generate statements.
Type"
The Illustrate module is designed to bridge this gap by providing examples of formal object usage, visualized in Figure α (panel @). Given premise like ZMod from the "Retrieve" step, the module selects illustrative theorems that demonstrate the correct application ZMod, such as "Theorem 2". The module takes the set of retrieved premises RDRIFT and a budget as input, and outputs small set of illustrative theorems T, where [T| S m. The selection process is a greedy algorithm designed compile candidate
to maximize the coverage of the input premises RDRIFT follows. First, set Teand of all theorems in the library TD that utilize at least one of the retrieved premises DDIFF In order to ensure relevance and provide a deterministic tie-breaker, we pre-sort this candidate set in descending order of semantic similarity s(t). For each theorem E Toand this similarity score the cosine similarity between its informal statement IF; and the original informal statement IF", computed using the same encoder Eg from the retrieval stage: s(t) Φ ((Es(EF) (E))
The final set of illustrative theorems T is built iteratively. The process begins by initializing an empty set of selected theorems To = 0 and an empty set of covered premises P Peoe.0 = 0. At each step j ... m, we select the theorem i, that provides the maximal marginal gain by including the most new premises in RDIIFT not previously covered:
argmaa &ETomnd (Ty11
(P(L) n (RDRET \Peoo
where P(t) is the set of premises used in theorem t. After selecting t,, the sets are updated for the next iteration: Ty -T (tz), and Peov.j = P Pooe.jii (P(ty) ( RRIFF.). The process terminates when the budget of m theorems is reached or when remaining candidate theorem offers additional coverage (i.e., the marginal gain is zero). The final set is defined as T T; from the last iteration j.
3.4 FORMALIZE THEOREMS
The final step, Formalize Theorems (Figure I 4), generates the formal statement FS by condi- tioning a formalizer on the assembled context C. This module is designed to be flexible and can be implemented with either finetuned model or a general-purposs. LLM. The formalizer compiles information in the following order: = I ( RDRIT @ T @ IF, where @ denotes the concatena- tion operator, I is formalization instruction (details in Appendix A.4.2), RDRIP the retrieved premises, T are the illustrative theorems and IF is the original informal statement, Conditioned on this prompt, the formalizer then generates the formal statement FS Formalizer(C).
EXPERIMENTAL SETUP
4.1 BENCHMARKS
We evaluate DRIFT on three distinct autoformalization benchmarks test its in-distribution, self- contained, and distrf-distiiuution performance. While the experiments are conducted in Lean 4, our framework anguage-agnostic and adaptable to other formal systems with structured libraries.
ProofNet (In-Disributton). We the ProofNet benchmark (Azerbayev et al. 2023) for in- distribution evaluation. Its 374 theorems, sourced from undergraduate mathematics textbooks, are integrated with the Mathlib library and require average of 3.39 dependent premises from over 243k formal objects (including 139k theorems). This benchmark tests the framework's primary function, which to effectively retrieve and utilize dependent premises with demonstration from large-scale, in on-distribution knowledge base.
MiniF2F SelffCCottained) We use the MiniF2F-test set (Zheng et al. 202I) to evaluate the frame- work self-contained problems. This benchmark consists of 224 Olympiad-style theorems with
5

---

Published as a conference paper at ICLR 2026
notably low average of just 0.43 dependencies from Mathlib P MiniF2F-tes serves boundary condition, testing the model's core formalization capabilities and its robustness against potentially distracting context when retrieval is not strictly necessary.
ConNF (Out-of-Distie Distributioo). The OOD challenge refers to evaluation scenarios where neither the retrieyal model nor the formalization model has been exposed to the formal objects used in the test Fl
data We therefore evaluate on ConNF, benchmark curated by Liu et al. (2025) through topologi- cal informalization to test OOD generalization. We found no indication of contamination from our zero-shot results on ConNF; however, without access to the underlying training data, this cannot be conclusively validated. This benchmark is based on the con-nf library and is not integrated with It formalizes consistency proof for Quine's 's New Foundations (Quine) 1951), ) established by Holmes & Wilshaw] (2015), and contains 961 research-level theorems requiring an average of 3.92 premises from its distinet library of 1,348 formal objects. ConNF rigorously tests DRIFT'S generalization to a novel mathematical domain (Zhang et al. 2024).
Mathlib R
4.2 BASELINES
We evaluate our proposed framework against three key baselines representing zero-shot, state-of- the-art retrieval, and oracle-level performance. The no retrieval (zero-shot) baseline establishes performance floor. The autoformalization model receives only the informal statement input, without access to any retrieved context. DPR (RAuto) represents the current state-of-the-arr. We compare method to the dependency retrieval module from the RAutoformalizer framework (Liu et al. 2025). which is finetuned dense passage retriever (DPR) (Karpukhin et al., 2020 5 The top-5 retrieved premises are provided the formalizer model as augmented context. The oracle* (retrieval) setting provides an approximate upper bound for retrieval. The model is provided with ground-truth dependencies (P (Poracle>) for each problem, simulating perfect retriever, as defined by Liu et al. 2025). We mark this setting with an asterisk (+) to denote that this oracle is, in fact, imperfect. This because the provided dependencies are not necessarily optimal or exhaustive for formalization and do not necessarily lead to the best autoformalization performance. As we discuss in Section 5 some of our settings actually outperform this imperfect oracle.
4.3 IMPLEMENTATION DETAILS
In this study, we evaluate DRIFT as a lightweight prompting strategy without introducing task- specific biases from finetuning. To comprehensively evaluate our framework, employ two cat- egories of models: frontier models (primary setup) and specialized models (formalization only). We leverage instrucioonfollooinn models, such as DeepSeck-V2. V3.1 (DeepSeck-AI, 2024), GPT- 4.1 (OpenAl, 2025). and Claudc-Opus-4 (Anthropic 2025a). as both decomposers and formaliz- ers to maintain consistency across the pipeline. These generalist models possess strong in-context learning capabilities and are expected to adapt effectively to the retrieved information provided in the DRIFT prompt. To investigate DRIFT'S impact on models with deeper parametric knowledge of formal languages, we also evaluate specialized open-source model, Goedel- (Lin et al.) 2025c). Its syntax-heavy heavy finetuning, aimed specifically at producing valid Lean statements (often via an internal Chain-of- of-Thought mechanism, Figure in Appendix A0...00, prevents it from following decomposition instructions. Consequently, we use it strictly as a formalizer, relying on GPT-4.1 generate the decomposed sub-queries and the resulting retrieved context.
Decompose. We construct fhw-shot prompt using five expertly verified examples from the Put- nam benchmark (Tsoukalas et al.] 2024) to instruct L.MSs to decompose the informal statements (full details in Appendix I. and Appendix [A.4.1p. Each decomposed sub-query consists of natural language description of a concept and its formal representation predicted by the decomposer
with parametric knowledge, as detailed in Section 3.1 We employ single prompt template across
all frontier models to prioritize generalizability. Empirically, this yields consistent improvements
p We removed 20 examples from the dataset that were either duplicated or failed to compile (Lean v4.18.0) 'The models we used, GPT-4.1, 1, Slaudc-Opus-A DeepSeek 1.3.5eck-V3.1, and Goedel- have knowledge cut- off dates of June 2024, March 2025, July 2025, and August 2025, respectively.
"The con-nf is http://iiiiliaae/eeaaattaa/ea//p
at Model available at http///wwwh.g//ooocccccc//cee//e

---

Published as a conference paper at ICLR 2026
across these diverse models (Table I and Table 8). demonstrating framework robustness without the need for model-specific optimization. The number of sub-queries decomposed is not fixed but autonomously decided by the decomposer.
Retrieve. The retriever model is dense passage retrieve 6 (DPR) finetuned on Mathlib data to map informal queries to their formal dependencies (Liu et al.) 2025). We pre-compute embeddings for all formal declarations in the relevant libraries (Mathlib for ProofNet and MiniF2F-test; con-nf for ConNF). This training setup establishes ConNF as an OOD benchmark for the retrieval module. For the DPR baseline, retrieve the top-5 premises based on the entire informal statement. Unlike fixed-k baselines, the number of premises retrieved by DRIFT is dynamic. By selecting the top-1 candidate for each sub-query and performing deduplication, the final set size is at most n, where is the number of decomposed sub-queries.
Illustrate. demonstrate premise usage real contexts, we select up to m exemplar theorems using the greedy coverage algorithm described in Section 3.3 This value was selected based on an empirical analysis of diminishing returns in premise coverage, as detailed in Appendix A.2.8
Formalize Theorems. As described in Section 3.4 the formalization prompt combines the original informal statement with the retrieved premises and illustrative theorems. Each premise is presented with its full name, formal declaration, and source code. Each illustrative theorem is included as a pair of its informal and formal statements. This pairing demonstrates both the informal-to-fome alignment and the concrete application of the premises within theorem instance. To evaluate pass @ k we generate 10 formalizations for each problem.
4.4 EVALUATION METRICS
We evaluate DRIFT in two stages: a) intrinsically through the performance of dependency retrieval and the selection of illustrative theorems, and b) extrinsically through autoformalization.
Dependency Retrieval. The effectiveness of the decomposition is measured by its impact the dependency retrieval task, as the quality of the decomposed sub-queries directly impacts the rele- vance of the retrieved premises. We measure the quality of the retrieved premises against the oracle* dependencies using Precision, Recall, and their harmonic mean, F1-score.
Formalization Correctness. For formalization, we use Typecheck (TC) and BFq+. Typecheck measures syntactic correctness, indicating the percentage of the generated statements that are valid and can pass the compiler's 's type checker (Lu et al., 2024; Azerbayev et al., 2023 Liu et al. 2025). For semantic correctness, use BEq+ (Poiroux et al. (025), symbolic metric that measures the logical equivalence between a predicted formal statement and the ground-trum reference by using deterministic proof tactics bidirectionally prove that each statement can be transformed into the other. We adopt BEq+ over LLM--basdd evaluations to avoid stochasticity and ensure compiler- verified reliability. Furthermore, given that large-scale human evaluation is infeasible, BEq+ serves as an effective proxy. demonstrating strong alignment with human judgments (Pearson: 0.974, Kendall: 0.872) (Poiroux al., 2025). For each metric, we assess performance using pass@ I and pass @ 10, where pass@ k indicates that at least one of l independent generations was successful.
5 RESULTS AND DISCUSSION
5.1 DEPENDENCY RETRIEVAL
We evaluate the effectiveness of the Decompose and Retrieve modules by looking at their impact on intrinsic performance in dependency retrieval. As detailed in Table we compare DRIFT against a monolithic query baseline that uses the same dense retriever but with the original informal state- ments as queries. This provides a direct comparison to DRIFT, which retrieves similar number of premises by taking the union of the top-1 I results for each of the 5.21 to 6,42 sub-queries generated by the Decompose module The results show that decomposition provides a substantial perfor-
"See Appendix 1.1.2 for the training details of the retriever.
"The full statistics of the decomposed sub-queries are available Appendix A.2.7
7

---

Published as a conference paper at ICLR 2026
Benchmark
Decomposer
Precision
Recall
F1
11.55
17.03
13.77
ProofNet
Claude-Opus-4
23.02
34.70
27.68
GPT-4.1
21.71
34.46
26.64
DeepSeckk-3.11
24.38
30.28
27.01
0.36
4.12
0.66
Claude-Opus-4
2.08
23.71
3.83
MiniF2F-test
GPT-4.1
1.42
15.46
2.60
DeepSeek-V3.1
0.98
9.28
1.78
25.12
32.06
28.17
Claudc-Opus-4
30.97
41.01
35.29
ConNF
GPT-4.
31.62
40.64
35.56
DeepSeck-V3.1 34.67
39.39
36,88
Table 1: Dependency retrieval performances (%) of DRIFT and no-decomposition baseline ("-"). The baseline queries the retriever directly with the original informal statement. Best results in bold.
mance improvement in both precision and recall. Averaged across all decomposer models, DRIFT achieves an absolute improvement of 13.34, 2.08, and 7.74 points over the baseline Fl score on the ProofNet, MiniF2F-test, and ConNF benchmarks, respectively. Regarding the choice of decomposer model, we observe that while Claude-Opus-4 achieves the highest F1 scores on ProofNet (27.68%) and MiniF2F-test (3.83%), the performance variation among the LLMs is marginal. Our findings indicate that frontier LLMs are largely interchangeable for this task, as the top-performing models have a maximum Fl score difference of only 2.05% on any benchmark.
The Illustrate module proves highly effective at selecting a concise set of theorems demonstrate premise usage. Within maximum of only three selected theorems (m = 3), the algorithm achieves a high average premise coverage rate of 74.59-14.80% across all the decomposers and benchmarks.
5.2 FORMALIZATION
For extrinsic performance on autoformalization (see Table 2. DRIFT consistently outperforms both the zero-shot baseline and the strong retrieval-augmented baseline DPR (RAuto) on ProofNet and ConNF benchmarks across all metrics (Typecheck and BEq+, pass @ and pass@ 10). Specifically, on ProofNet, GPT--.11 with DRIFT achieves BEq+ pass @ 10 of 21 193%% 2.74% improvement over DPR (RAuto). This trend holds across all models evaluated, demonstrating that our decomposition- driven approach provides more effective context for the formalization task.
We first examine the behavior of general-purpose frontier models (GPT-4.1 and DeepSeek-V33 V3. A key insight is that while frontier models are largely interchangeable query decomposers, this parity does not extend to the final formalization step. For instance, DeepSeek- V3.1 generally out- performs GPT-4.1 in the zero-shot setting across all benchmarks, suggesting stronger parametric knowledge for direct formalization. However, this trend reverses most significantly on the OOD ConNF benchmark when retrieval is introduced.
On ConNF, all models achieve low zero-shot BEq+ scores (<10%), confirming a severe knowl- edge gap. Retrieval substantially improves performance, with GPT-4.1 consistently outperforming DeepSeek-V3.1 across all metrics under different retrieval strategies. DRIFT provides a particularly significant improvement, increasing GPT-4.1's BEq+ @ 10 score by 55.57% and even surpassing the oracle* baseline by 3.43%. We hypothesize this is because oracle* provides only necessary premises based on the reference statement, while the illustrative theorems selected with DRIFT provide cru- cial demonstrations of premise usage. We support this hypothesis with detailed qualitative analysis of the * baseline's s failure modes in Appendix A.3.2
On the in-distribution ProofNet benchmark, the results are more nuanced. GPT-4.1 surpasses DeepSeek- V on BEq+@ 10 when using DRIFT. This pattern suggests that GPT-4.1 is more adept at in-context synthesis, integrating and reasoning over retrieved information to construct formal statements. In contrast to the interchangeability we observed among models as decomposers, the formalization stage reveals clear performance differences. The distinction reinforces that the two pipeline stages rely on distinct LLM capabilities: decomposition leverages natural language reason- ing, whereas formalization demands advanced formal reasoning.
8

---

Published as a conference paper at ICLR 2026
Benehmark
Formalizer
Retrieval
TCe1
BEq+@1
TC@10
BEq+@10
Oracle*
58.82
20.32
79.68
27.54
Zeto-shot
34.22
9.36
51.60
13.37
GPT-L1
(RAmio)
51.60(+11.300
14.71(+ 6.a5)
73.53(4-21B8)
19.25(+ 5.88)
DRIFT
55.88
17.38( 8.02)
77.01
21.93 8.56)
Oracle
71.12
21.93
82.09
27.54
ProofNet
20.32
DeepSock-V3.1
DPR (RAuto)
63.37(+ 2.94)
17.38(+ 1.87)
73.53(+ 1.60)
19.52( 0.80)
DRIFT
72.73(+12.30)
18.18(+ 2.67)
79.41(+ 7.48)
20.59 0.27)
Oracle
35.29
62.03
Zero-shot
38,50
76.74
55.08
Goedel 8B
DPR (RAuse)
35.29(- 3.21)
6.95 2.21)
78.07(+ 1.33)
53,48( 1.60)
DRIFT
40,37(+ 1.87)
8.56 0.53)
85,03(+ 8.29)
59.36 4.28)
Oracle
75.45
23.66
89.29
30.36
Zero-shot
69.64
23.21
84.82
28.12
GPT-11
DPR (RAule)
7 7.09)
24.55 1.34)
92.41 7.09)
32.14 +++ 4.02)
DRIFT
74.55(+ 4.91)
24.55 (+ 1.34)
92.41 (+ 7.09)
29.02 0.90)
Oracle
77.68
23.21
87.50
28.12
Mins-2FFtest
Zero-shot
76.34
22.77
87.50
27.23
DeepSock-V3.
DPR (RAmia)
75.89( 0.46)
22.77 0.00)
87.95 0.45)
27.68 0.46)
DRIPT
74.11(- 2.23)
22.77 0.00)
88.84 1.34)
24.55 2.68)
Oracle*
96.00
28.89
100,00
93.33
Zero-shot
93.33
22.22
100.00
93.33
Goedel
DPR (RAuto)
95.55(+ 2.22)
9.77 1777--12445
100.00 0.003
26.67 (-66.66)
DRIFT
93.33(+ 0.00)
26.67 (++ 4.46)
100.00: 0.00)
93.33 0.0n)
Oracle
60.46
48.28
75.23
58.90
Zero shot
7,28
4.47
11.45
6.76
GPT-411
DPR (RAuna)
24.56(+11.28)
15. (9-1002)))
31.95(++20.60)
(0..8)+1
DRIFT
(5.76(+56445)
(4..47))
77.00(+66.66)
(60.37))
Oracle
$7.34
44,22
71.28
55.15
CouNF
Zero-sbot
13:42
8.12
17.59
11.03
DeepSeck-V3.
DPR (RAute)
21,96( 8.54)
12 4.78)
28.20(+110.6)
17,07( 6.04)
DRIFT
60.67(+17.25)
46.72(-36.60)
7118((+53.50)
54.21(-43.18)
Oracle
9.99
4,37
48,80
23.10
Goodel-V2-BB
Zero-shot
16.03
2.29
71.19
10.93
DPR (RAuto)
15.92( 0.11)
3,64(+ 1.35)
64.52(- 6.67)
16,96(+ 6.03)
9.89( 6.18)
1.98)
40.89(-30.300 30.30)
19.04( 8.11)
Table 2: Autoformalization performance on ProofNet, MiniF2F-test, and ConNF. Performance measured by Typecheck (TC@k) and BEq+@k. We compare DRIFT against zero-shot, DPR (RAuto), and oracle* settings. Colored subscripts indicate improvement (blue) or decrease (red) rel- ative to zero-shot. All values are percentages (%), the best results (excluding the oracle*) are bold.
As discussed Section 4 the MiniF2F-test benchmark presents a distinct profile with an average of only 0.43 library dependencies. This limits the potential for retrieval-based improvements, idenced by the small gap between the zero-shot and oracle* performance (e.g., pass @ 10 gap of 2.24% for GPT-4.1 and 0.89% for DeepSeck-V3.1) Instead, this low-dependency regime reveals the models' high sensitivity to the provided context, which can act as a distractor rather than an aid. We provide detailed analysis of these failures in Appendix A.3. offering granular error taxonomy that specifically identifies issues like force-fitting and wer-complication.
Finally, we evaluate the specialized model. Goe8el-V2-8B.. On the OOD ConNF benchmark, its zero-shot TC@ is expectedly low, yet its TC@ 10 is surprisingly high. However, low BEq+ perfor- mance indicates that Goedel-V2 V2-8B relies on its deeper parametric knowledge produce syntac- tically valid statements but fails to achieve semantic equivalence. By providing retrieved premises and theorems, DRIFT nearly doubles Goedel-V2. V2-8B's zero-shot BEq+ scores and outperforms DPR (RAutoo. This demonstrates that precise retrieval allows even specialized models to focus the formalization task rather than struggling with parametric retrieval. On in-distribution benchmarks, Goedel-V2 V2-BBB achieves strong pass @ 10 but limited pass @ accuracy. Furthermore, it is sensitive to distracting context, especially on the low- dewdeeendy MiniF2F-test benchmark where its perfor- mance degrades severely under DPR (RAuto). In contrast, DRIFT maintains its effectiveness.

---

Published as a conference paper at ICLR 2026
ProofNet
MiniF2F-test
ConNF
Retrieval
TC@1
BEq+@1
TC@1
BEq+@1
TC@1
BEq+@1
DRIFT (GPT-4.1)
55.88
17.38
74.55
24.55
65.76
54.84
Illustrate
$6.15 (+ 0.27)
14.17 (- 3.21)
76.34 1.79)
(d: 0.00)
(-20.29)
(-190)))
w/o Decompoos
50.80 5.08)
13.64 3.74)
76.34 1.79)
26.34 (+ 1.79)
59.63 6.13)
46.72
8.12)
w/o Retrieval
34.22 (-21.66)
9.36 (- 8.02)
69.64 4.91)
23.21 (- 1,34)
7.28 (-58.48)
4.47 (-50.77)
DRIFT (DeepSeck-Va))
72.73
18.18
74.11
22.77
60.67
46.72
w/o Illustrate
70.32 2.41)
15.24 (- 2,94)
77.68 3.57)
21.43 1.34)
41.31 (-19.36)
29.34 (-17.38)
we Decompose
64.97 7.76)
15.78 2.40)
77.68 3.57)
20.98 1,79)
50.36 (-10.31)
38.81 7.91)
w/o Retrieval
60.43 (-12.30)
15:51 (- 2.67)
76.34 (+ 2.23)
22.77 (d: 0.00)
13.42 (-47.25)
8,12 (-38.60)
Table 3: Ablation study of DRIFT using GPT-4.1 and DeepSeek-V3.1. First, we remove the II- lustrate module (premises retrieved with sub-queries provided in C), then the Decompose module (premises retrieved using original informal statement provided in C)), and finally all Retrieval com- ponents. Performance (increase) (decrease) relative to full models is shown in parentheses.
5.3 ABLATION STUDY
In order to isolate and measure the contribution of each component of DRIFT, we conducted a systematic ablation study (Table 3. As expected, removing the illustrative theorems (w/o Illus- trate) decreased the BEq+ score on ProofNet and ConNF, which confirms that demonstrations of premise usage are crucial for the formalization correctness beyond just the definitions of the formal objects. Intriguingly. additionally removing the Decompose module (w/o Decompose) does not fur- ther degrade performance and even leads to slight recovery on ConNF and ProofNet in the BEq+ score. We hypothesize that this is because the baseline DPR retrieves thematically homogeneous (lexically close, though less precise) set of premises via single query retrieval, which may be less distracting than the precise but more diverse set retrieved via decomposition. This reveals crucial synergy: the illustrative theorems act as a scaffold that helps the model navigate the diverse infor- mation retrieved via decomposition. In Appendix A..33 we analyze specific instances where using premises retrieved by DRIFT alone failed, whereas the full DRIFT pipeline and the baseline DPR succeeded, further validating the scaffolding hypothesis.
The complex interaction creates trade-off on the MiniF2F-test benchmark: removing theorems improves syntactic correctness (Typecheck) while degrading logical correctness (BEq+). This fur- ther supports the hypothesis that for the simpler, low-dependency problems in MiniF2F-testt adding more context can act as distractor. Removing external context improves syntactic validity but de- grades logical correctness of the generated formal statements. This sensitivity strongly motivates the need for more dynamic and adaptive retrieval strategies. To quantify the theoretical gains of such strategies, provide an "Oracle Ensemble" analysis in Appendix A.2.9 demonstrating that an adaptive upper bound consistently outperforms individual methods. Future work on agentic frame- works could retrieve select information, judge its utility, and iterate based compiler feedback.
6 CONCLUSION
In this work, we introduced DRIFT, framework that improves autoformalization by tackling two distinct challenges: the underlying complexity of queries and the lack of contextual usage. Our decomposition-drivee retrieval addresses the former by breaking down the informal statement into sub-queries and conducting point-to-point retrieval of its formal dependencies. Concurrently, the Illustrate module resolves the latter by providing illustrative examples to guide the utilization of re- trieved premises in theorem instances. This dual approach substantially improves formalization cor- rectness on both complex in-distribution (ProofNet) and out-of-distribution (ConNF) benchmarks, demonstrating its effectiveness as broadly generalizable and model-agnostic strategy. On simpler, low-dependency MiniF2F-test benchmark, our method performs comparably to related methods. Our findings suggest future work should focus dynamic and adaptive retrieval strategies, well as on agentic frameworks that iteratively refine attempts based on compiler feedback. Grounding such iterative reasoning with robust retrieval is crucial to advancing automated formalization.
10

---

Published as a conference paper at ICLR 2026
LIMITATIONS
First, our evaluation focuses on the core mechanisms of DRIFT rather than an exhaustive hyperpa- rameter search. We have not extensively investigated the sensitivity of formalization performance to variations in the number of retrieved premises (k), the quantity of illustrative theorems (m), or the ordering of components within the comprehensive prompt. Second, the decomposer and formalizer not jointly optimized with the retriever. Due to the scarcity of supervised decomposition data, the decomposer relies on fho-shot prompting rather than task-specific finetuning. Furthermore, ex- ploring end-to-end training paradigm for the entire pipeline remains direction for future work. Third, our retrieval scope was limited to established formal libraries. While we demonstrated ef- fectiveness on Mathlib (in-distribution) and con-nf (OOD), future iterations should integrate broader range of contexts, including local projects and user-defined codebases, to better support diverse formalization environments. Lastly, the evaluation of autoformalization remains an open challenge. To ensure determinism and reproducibility, we prioritized compiler-verifiee metrics over LLM-bassd judges. However, developing more robust metrics that capture stylistic and structural nuances is critical for future research.
ETHICS STATEMENT
We adhere to the licenses the data artifacts and models used this study, as well as to the ICLR code of ethics. Human experts who verified decomposed queries were fairly compensated for their contributions. We acknowledge the risks associated with reasoning LLMs, particularly concern- ing hallucinations within the decomposition and formalization steps. Errors in decomposition can propagate through the retrieval process, potentially leading to the selection of irrelevant premises incorrect formalizations. While DRIFT operates within the RAG paradigm mitigate these risks, it should be viewed as an assistive tool rather than an autonomous source of mathematical truth. Finally, LLMs were used as a writing assistant for improving the language and clarity of this manuscript. The scientific contributions, including all ideas, experiments, and analyses, are the work of the human authors.
REPRODUCIBILITY STATEMENT
We are committed to the full reproducibility of this study. We release the source code for the DRIFT framework, all curated data artifacts, and our finetuned models under a permissible open-source license. Other key implementation details and hyperparameters are described in Appendix|A.]
REFERENCES
Ayush Agrawal, Siddhartha Gadgil, Navin Goyal, Ashvni Narayanan, and Anand Tadipatri. To- wards mathematics formalisation assistant using large language models. arXiv preprint a2Xiv:2211. 2.0-22224, 2022.
Janice Ahn, Rishu Verma, Renze Lou, Liu, Rui Zhang, and Wenpeng Yin. Large language models for mathematical reasoning: Progresses and challenges. In Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics: Student Research Workshop, pp. 225 237, 2024.
Paul J. L. Ammann, Jonas Golde, and Alan Akbik. Question decomposition for cetrieval-augmented generation. In Jin Zhao, Mingyang Wang, and Zhu Liu (eds.), Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 4: Student Research Work- shop). pp. 497-507, Vienna, Austria, July 2025. Association for Computational Linguisties..
Anthropic. Introducing Claude pttps///ww...ntttooooc..co/ooo/s 2025a. Accessed: September 24, 2025.
May
Anthoopic. Claude's extended thinking.
httpas:/ww..ntthggpe..coo//o/aat visible e- wxw.nddd--thiiiinngggg Feb 2025b. Accessed: October 17, 2025.

---

Published as a conference paper at ICLR 2026
Akari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil, and Hannaneh Hajishirzi. Self-RAG: Learning to retrieve, generate, and critique through seff-reffection. In The Twelfth International Conference on Learning Representations, 2024.
Justin Asher. Leanexplore: A search engine for Lean declarations.
arXiv preprint
mrXiv:2506.11085. 2025.
Zhangir Azerbayev. Bartosz Piotrowski, Hailey Schoelkopf, Edward W. Ayers, Dragomir Radev, and Jeremy Avigad. Proofnet: Autoformalizing and formally proving undergraduate-levll math- ematics, 2023.
Anne Baanen, Matthew Robert Ballard, Johan Commelin, Bryan Gin-ge Chen, Michael Rothgang. and Damiano Testa, Growing Mathlib: Maintenance of a large scale mathematical library. arXiv preprint arXiv:2508../5533 2025.
Bruno Barras, Samuel Boutin, Cristina Cornes, Judicaël Courant, Jean-Christophe Filliatre, Eduardo Gimenez, Hugo Herbelin, Gerard Huet, Cesar Munoz, Chetan Murthy, al. The Coq Proof Assistant Reference Manual : Version 6.1. PhD thesis, Inria, 1997.
BICMR@PKU AI. Jixia:
Static analysis tool for Lean https://githur. com/ Frenzymath/ jixia 2024. GitHub repository.
Chi-Min Chan, Chunpu Xu, Ruibin Yuan, Hongyin Luo. Wei Xue, Yike Guo, and Jie Fu. RQ-RAG: Learning to refine queries for retrieval augmented generation. In First Conference on Language Modeling, 2024.
Jianly Chen, Shitao Xiao, Peitian Zhang, Kun Luo, Defu Lian, and Zheng Liu. BGE M3-Embedding:: Multi-lingual, multi-functionnality aulti-granularigg text embeddings through -nfwledewede dis- tillation. arXiv preprint 2rXiv:2402.03211 2024.
Luoxin Chen, Jinming Gu, Liankai Huang, Wenhao Huang, Zhicheng Jiang, Allan Jie, Xiaoran Jin, Xing Jin, Chenggang Li, Kaijing Ma, et al. Prover: Deep and broad reasoning for automated theorem proving. arXiv preprint 2rXiv:2507.23776. 2025.
Leonardo De Moura, Soonho Kong, Jeremy Avigad, Floris Van Doorn, and Jakob von Raumer. The Lean theorem prover (system description). In International Conference on Automated Deduction, pp. 378-388. Springer, 2015.
DeepSeek-AL Deepseek v3 technical report, 2024.
Guoxiong Gao, Haocheng Ju, Jiedong Jiang, Zihan Qin, and Bin Dong. A semantic search engine for Mathlib4. In Findings of the Association for Computational Linguistics: EMNLP 2024, pp. 8001-8013, 2024.
Luyu Gao, Xueguang Ma, Jimmy Lin, and Jamie Callan. Precise zero-shot dense retrieval without relevance labels. In Proceedings of the 61 Annual Meeting of the Association for Computational Linguistics (Volume Long Papers), pp. 1762-1777, 2023.
Sébastien Gouëzel and Vladimir Shchur. A corrected quantitative version of the Morse lemma. Journal of Functional Analysis, (77(4))128--122 2019.
Yuhang He, Jihai Zhang, Jianzhu Bao, Fangquan Lin, Cheng Yang, Bing Qin, Ruifeng Xu, and Wotao Yin. BC-prover: Backward chaining prover for formal theorem proving. Yaser Al- Onaizan, Mohit Bansal, and Yun-Nung Chen (eds.), Proceedings the 2024 Conference Em- pirical Methods in Natural Language Processing, pp. 3059-3077, Miami, Florida, USA, Novem- ber 2024. Association for Computational Linguistics.
M Randall Holmes and Sky Wilshaw. Nf is consistent. arXiv preprint arXiv: 2015.
Ruikang Hu, Shaoyu Lin, Yeliang Xiu, and Yongmei Liu. LTRAG: Enhancing autoformalization and self-refinement for logical reasoning with thought-guided RAG. In Findings of the Association for Computational Linguistics: ACI. 2025, pp. 2483-2493 2025.
12

---

Published as a conference paper at ICLR 2026
Albert Q Jiang, Wenda Li, and Mateja Jamnik. Multilingual mathematical autoformalization. arXiv preprint arXiv:2311.03755, 2023.
Albert Qiaochu Jiang, Sean Welleck, Jin Peng Zhou, Timothee Lacroix, Jiacheng Liu, Wenda Li, Mateja Jamnik, Guillaume Lample, and Yuhuai Wu. Draft, sketch, and prove: Guiding formal theorem provers with informal proofs. The Eleventh International Conference on Learning Representations, 2022.
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6769-6781, 2020.
Joshua Ong Jun Leang, Giwon Hong, Wenda Li, and Shay B Cohen. Theorem prover as judge for synthetic data generation. In Wanxiang Che, Joyce Nabende, Ekaterina Shutova, and Mo- hammad Taher Pilehvar (eds.), Proceedings of the 63rd Annual Meeting of the Association for Vienna, Austria, July
Computational Linguistics (Volume Long Papers), pp. 2025. Association for Computational Linguistics. ISBN 979- 199-8-89176-251-00
Haohan Lin, Zhiqing Sun, Sean Welleck, and Yiming Yang. Lean-STaR: Learning to interleave thinking and proving. The Thirteenth International Conference on Learning Representations, 2025a.
Yong Lin. Shange Tang, Bohan Lyu, Jiayun Wu, Hongzhou Lin, Kaiyu Yang, Jia Li, Mengzhou Xia, Danqi Chen, Sanjeev Arora, al. Goedel- A frontier model for open-source automated 2025b.
theorem proving. arXiv preprint
Yong Lin, Shange Tang, Bohan Lyu, Ziran Yang. Jui-Hui Chung, Haoyu Zhao, Lai Jiang, Yihan Geng, Jiawei Ge, Jingruo Sun, Jiayun Wu, Jiri Gesi, Ximing Lu, David Acuna, Kaiyu Yang, Hongzhou Lin, Yejin Choi, Danqi Chen, Sanjeev Arora, and Chi Jin. Goedel-Prover--V Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correction, August 2025c. arXiv:2508.0348 036613 [cs].
Qi Liu, Xinhao Zheng. Xudong Lu, Qinxiang Cao, and Junchi Yan. Rethinking and improving autoformalization: Towards a faithful metric and a dependency retrieval- based approach. In The Thirteenth International Conference on Learning Representations, 2025.
Jianqiao Lu, Yingjia Wan, Zhengying Liu, Yinya Huang, Jing Xiong, Chengwu Liu, Jianhao Shen, Hui Jin, Jipeng Zhang, Haiming Wang, Zhicheng Yang, Jing Tang, and Zhijiang Guo. Process- driven autoformalization in Lean 4, 2024.
Wangyue Lu, Lun Du, Sirui Li, Ke Weng, Haozhe Sun, Hengyu Liu, Minghe Yu, Tiancheng Zhang, and Ge Yu. Automated formalization via conceptual -augeeted LLMs. arXiv preprint arXiv:2508. 06933, 2025.
Thang Luong and Edward Lockhart. Advanced version of Gemini with deep think officially achieves gold medal standard at the international mathematical olympiad, July 2025. Available at: Google DeepMind Blog) Accessed: 2025-09-09.
Mathlib Community. The Lean mathematical library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs, CPP 2020, pp. 367-381, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450370974. doi: 10.11455
3372885.3373824
Morph Labs. Moogle: A semantic search engine for Lean https://ww.mooogle 2025. Accessed: 2025.
OpenAl. Introducing GPT-4.1 model family. htttp:::/operaa.coom/m/ April 2025, Accessed: September 24, 2025.
Lawrence C Paulson. Isabelle: A Generic Theorem Prover. Springer, 1994.
Auguste Poiroux, Gail Weiss, Viktor Kunčak, and Antoine Bosselut. Improving autoformalization using type checking, 2025.
13

---

Published as a conference paper at ICLR 2026
WV Quine. On the consistency of "new foundations". Proceedings of the National Academy of Sciences, 37(8):538-55 -500,, 1951.
Amrith Setlur, Saurabh Garg, Xinyang Geng, Naman Garg. Virginia Smith, and Aviral Kumar. RI on incorrect synthetic data scales the efficiency of LLM math reasoning by eight-fold. Advances in Neural Information Processing Systems, 01443000-43033 2024.
Amitayush Thakur, George Tsoukalas, Yeming Wen, Jimmy Xin, and Swarat Chaudhuri. An in- context learning agent for formal theorem-proving. First Conference on Language Modeling, 2024.
Kyle Thompson, Nuno Saavedra, Pedro Carrott, Kevin Fisher, Alex Sanchez-Stern. Yuriy Brun, João Ferreira, Sorin Lerner, and Emily First. Rango: Adaptive retrieval-augmmented proving for automated software verification. In 2025 IEEE/ACM 47th International Conference Software Engineering (ICSE), pp. 347-359. IEEE, 2025.
George Tsoukalas, Jasper Lee, John Jennings, Jimmy Xin, Michelle Ding, Michael Jennings, Ami- tayush Thakur, and Swarat Chaudhuri. Putnambench: Evaluating neural theorem-provers on the putnam mathematical competition, 2024.
Liang Wang, Nan Yang, and Furu Wei. Query2doc: Query expansion with large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pp. 9414-9423, 2023.
Ruida Wang. Jipeng Zhang, Yizhen Jia, Rui Pan, Shizhe Diao, Renjie Pi, and Tong Zhang. Theo- remLlama: Transforming general-purposs LLMs into Lean4 experts. In Proceedings of the 2024 Conference Empirical Methods in Natural Language Processing, pp. 11953 11974, 2024.
Shuting Wang. Xin Yu, Mang Wang, Weipeng Chen, Yutao Zhu, and Zhicheng Dou. RichRAG:
Crafting rich responses for macti-faceted queries retrieval-augmented generation. Proceed- ings of the 31st International Conference on Computational Linguistics, pp. 11317-11333, 2025.
Yutong Wu, Di Huang, Ruosi Wan, Yue Peng, Shijie Shang, Chenrui Cao, Lei Qi, Rui Zhang, Zidong Du, Jie Yan, et al. StepFun-Formalizer Unlocking the autoformalization potential of LLMs through knowsedge-reasoning fusion. arXiv preprint arXiv:2508.044//0 2025.
Huajian Xin, Z.Z. Ren, Junxiao Song, Zhihong Shao, Wanjia Zhao, Haocheng Wang. Bo Liu, Liyue Zhang, Xuan Lu, Qiushi Du, et al. DeepSeek-Prover-VV Prover-VI.5. Harnessing proof assistant feedback for reinforcement learning and monte-carlo tree search. In The Thirteenth International Confer- on Learning Representations, 2024.
Kaiyu Yang, Aidan Swope, Alex Gu, Rahul Chalamala, Peiyang Song, Shixing Yu, Saad Godil, Ryan Prenger, and Animashree Anandkumar. LeanDojo: Theorem proving with retrieval- augmented language models. Advances in Neural Information Processing Systems, 36:21573- 21612, 2023.
Huaiyuan Ying, Zijian Wu, Yihan Geng, Jiayu Wang, Dahua Lin, and Kai Chen. Lean Workbook: A large-scale Lean problem set formalized from natural language math problems. In Proceedings of the 38th International Conference on Neural Information Processing Systems, pp. 105848 105863, 2024.
Lan Zhang, Xin Quan, and André Freitas. Consistent autoformalization for constructing mathemat- ical libraries. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 4020-4033, 2024.
Xueliang Zhao, Wenda Li, and Lingpeng Kong. Decomposing the enigma: Subgoal-based demon- stration learning for formal theorem proving, arXiv preprint 166666 2023.
Kunhao Zheng, Jesse Michael Han, and Stanislas Polu. MiniF2F: cross-system benchmark for formal olympiad-level mathematies. arXiv preprint arXiv:2109.001 2021.
14

---

Published as a conference paper at ICLR 2026
A APPENDIX
A.1 IMPLEMENTATION DETAILS
A.1.1 FEW-SHOT EXAMPLES FOR DECOMPOSITION
To construct robust set of few-shot demonstrations for our Decompose module, we strategically selected five problems from the Putnam benchmark (Tsoukalas et al. 2024). These problems were chosen to ensure diversity in both their mathematical domain and the number of underlying premises required for their formal statements.
We decomposed the informal statement of each selected problem into its atomic, logical sub- components using Claude-Opus-4 with extended thinking enabled (Anthropic, 2025b). The de- composition followed zero-shot prompting strategy guided by carefully engineered instruction set. Human experts verified each exemplar for correctness and logical atomicity. While the de- composition task lacks strict ground truth, its effectiveness is empirically validated by significant downstream improvements in premise retrieval (see Table [ Section 5.1
This curated set of examples, detailed below, provides the model with varied demonstrations for the decomposition task across number theory, algebra, analysis, and geometry.
Number Theory: putnam_1966.br
Algebra: putnam 2000 bl
Analysis: putnam__2000 __000_200000000000 putnam 20ttmmmm_005_11
Geometry: putnam putnam_m203.100 2003.b5
A.1.2 RETRIEVER FINETUNING DETAILS
We finetuned the BGE-M3 retriever model (Chen et al. 2024) on the Mathlib 4.7 dataset to special- ize it for dependency retrieval in formal mathematics. The finetuning process executed using the FlagEmbedding library (Chen et al. 2024) on a server equipped with four 32GB GPUs. The complete set of hyperparameters used for this process, including optimizer settings and loss config- uration, is provided T
Training Objective and Data Source. We used the informalized Mathlib dataset provided by RAutoformalizer (Liu et al., 2025), which aligns informal statements with Mathlib 4.7.0 for- mal declarations. Ground-trum dependent premises were extracted from raw Lean code using Jixia BICMR@PKU AI, 2024). Lean 4 abstract syntax tree parser. The retriever was trained via standard contrastive loss: informal statements as anchors, Jixia-extracted dependencies as pos- itives samples, and random library objects negatives samples. Crucially, training was restricted exclusively to Mathlib to guarantee strict isolation from the ConNF dataset.
Toolchain Versions and Robustness. We used different Lean versions based on data availability and benchmark constraints. Retriever training used Mathlib 4.7.0 to leverage existing informal- formal pairs. For ProofNet and MiniF2F-test evaluations, we used Lean 4.18.0; the near- near-100% compilation success rate of gold statements confirms this version disparity introduces instability. For ConNE, we strictly used Lean 4.7.0 to satisfy its pinned dependencies. Notably, DRIFT avoids the brittleness of rapid Lean updates: unlike finetuned models that memorize static syntax and quire costly retraining, DRIFT adapts to new versions via low-cost offline re-indexing of the active library.
A.1.3 LLM GENERATION PARAMETERS
For all generative tasks, sub-query generation (decomposition) and formal statement generation (for- malization), we set the temperature to 0.7 for all the frontier models (GPT-4.1, DeepSeek-V33 and Claude- Ouude-))))--) to encourage diverse yet coherent outputs. For the open-sourced Goedel-V2-88 set temperature 0.7, max_token attempt evaluations (pass@) 1) used a fixed seed of 42. For multi-attempt evaluations (pass @ 10), we generated ten distinct outputs by using sequential range of seeds from 42 51.
16k, and top-p to 0.95. To ensure reproducibility, single-
15

---

Published as a conference paper at ICLR 2026
Category
Hyperparameter
Value
Model & Data
model name or path
bge-m3
train data query.max_len passage_max_len
mathlib 4.7
1024
1024
train.group.size
4
serttence.poollnggmetthtdd
cls
Training
num.train.spochs
per.deevioe.ttrainn.aatccc..seee
32
jer..evv.oe.vaalbbttchhi.ee
4
learning.rate
5 10
warmup_ratio
0.1
weight.decay
0.01
repetittion.penalty
1.0
datallaader.rropllast
True
even.batches
True
non_blocking
False
split.batches
False
use seedable sampler
True
Loss & Objective
temperature
0.02
tormalliee.embeeddinng negativees.cross.evvicc same www.eeennnnnk...ttttaaaa........
True
True
True
unified_finetunng
True
kd.loss.type
m3 l.kklllos
Optimizer
optim adafactor adam betal adam_beta2
adamw.torch
False
0.9
0.999
adam.epsilon
1 1 10
Table 4: Hyperparameters for model fine-tuning.
A.2 ADDITIONAL RESULTS AND DISCUSSION
A.2.1 DEPENDENCY RETRIEVAL PERFORMANCE METRICS
We evaluate retrieval performance using standard precision, recall, and their harmonic mean, the FI score. For given retrieved set R and the ground-truth set of oracle* premises P Poracless precision and recall are defined as: Precision(P) score provides single, balanced measure of performance by combining precision and recall: F1 2 The composition of the retrieved set R varies by method.
R (R) and Recall(R) iPoncle- nR | |Panates The
For baseline retrievers, R consists of the top-k premises with the highest cosine similarity to the embedding of the full informal statement. For DRIFT, R is the union of the single best-retrieved premise for each of the decomposed sub-queries.
A.2.2 DEPENDENCY RETRIEVAL RESULTS OF RAUTO
This section presents the performance of DPR (RAuto) across both in-distribution (ProofNet, MiniF2F-test) and out-of-distribution (ConNF) benchmarks. The results, detailed in Table high- light a crucial trade-off between specialization and generalization that motivates proposed ap- proach. When comparing DPR baselines, our retriever without decomposition substantially outper- forms DPR (RAuto) the ConNF benchmark but underperforms ProofNet and MiniF2F We hypothesize that this discrepancy arises because DPR (RAuto) may overfitted to Mathlib- specific content.
16

---

Published as a conference paper at ICLR 2026
Benchmark
Precision
Recall
ProofNet
22.89
33.75
27.28
MiniF2F-test
0.63
7.22
1.15
ConNF
14.01
17.88
15.71
Table Dependency Retrieval performance (%) of DPR (RAuto), the retriever from RAutoformal-
izer (Lu et al. 2025). Retrieval & is set to 5.
A.2.3 AUTOFORMALIZATTIO RESULTS OF CLAUDE-OPUS-4
In the main paper, we evaluated Selude-Opus-44 effectiveness decomposer for query decom- position. Here, we provide Claude- Ooaiie-Opss-''ss 4's formalization results for completeness. 6 pass@1 performance (TC@) and BEq+ @ I) across all benchmarks. Note that pass @ 10 results for Opuu--- are not available due to computational costs.
Benchmark
Retrieval TC@1
BEq+ @1
Oracle*
81.28
26.20
Zero-shot
68.45
17.65
ProofNet
RAuto
75.67(+7.22)
19.25
DRIFT
(+1016)
19.79 (42.144
Oracle* 93.30
35.27
Zero-shot 95.09
31.25
MiniF2F-test
RAuto
95.98;+0.89]
30.36
DRIFT
93.75(-1.34)
32.59 (+1.34)
Oracle* 62.75
50.36
Zero-shot 13.32
8.53
ConNF
RAuto
26.64(+13.32)
18.52
DRIFT
72.32 (4-9.00)
60.35 (401.82)
Table 6: Autoformalization performance ProofNet, MiniF2F-test, and ConNE. Performance is measured by Typecheck (TC@ 1) and BEq+@ 1. We compare DRIFT against zero-shot, DPR (RAuto), and oracle* settings. Colored subscripts indicate improvement (blue) or decrease (red) rel- ative to zero-shot. All values are percentages (%), the best results (excluding the oracle*) are bold. The @ 10 experiments for Claude were omitted due to funding constraints.
A.2.4 THE ROLE OF ILLUSTRATIVE THEOREMS AS A SCAFFOLD
As presented in Table 3 removing the Decompose module (w/o Decompose: reverting to the base- line DPR) does not degrade performance further. In fact, on ConNF and ProofNet, leads to slight recovery in the BEq+ scores compared to the "w/o Illustrate" setting. We hypothesize this is due to the nature of retrieval noise. The baseline DPR, using a single query, retrieves a thematically clustered set of premises. While its precision is lower, its noise is homogeneous and may be less distracting to the LLM. Our decomposition method retrieves a more diverse set of premises. While this captures more correct dependencies (higher recall and precision), the accompanying noise is also more varied. This reveals a crucial synergy: the selected theorems in the Illustrate module act as a contextual scaffold, helping the model navigate the diverse information retrieved by the decomposer. Without this guidance, the varied noise can outweigh the benefit of improved retrieval.
A.2.5 SCALING PERFORMANCE WITH SAMPLING
Across all experiments in Table 2, we observe a consistent and significant gap between pass and pass@ @ 10 results. For instance, performance across all settings and formalizer models. This large uplift underscores the potential for enhancing performance through sampling-based methods at test time. This suggests that performance could be
ProofNet improved by average of 27. 27.20%
17

---

Published as a conference paper at ICLR 2026
further scaled by integrating method into agentic framework equipped with verifier (e.g., Typecheck correctness).
Notably, DeepSeck-V3.1 performance of pass @ 10 saturates more quickly than Claude-Opus-4's on the ProofNet benchmark. Its zero-shot pass@ 10 score is only 0.27% lower than the DRIFT score. This suggests that with sufficient sampling, the model can sometimes recover the necessary knowledge parametrically. We anticipate a similar, albeit slower, trend for the larger Claude- -ppus- and GPT-4.1 models if the number of attempts were increased further.
A.2.6 PARAMETRIC RETRIEVAL
ProofNet
MiniF2F-test
ConNF
Retrieval
TC@1
BEq+@1
TC@1
BEq+@1
TC@1
BEq+@1
DRIFT (GPT-4.1)
55,88
17.38
74.55 63. 84 (-10.71)
24.55
65.76
54.84
Parametric Retrieval
43.85 (-12.03)
13.64 3.74)
20.09 4.46)
10.41 (-55.35)
3.64 (-51.20)
w/o Retrieval
34.22 (-21.66)
9,36 (- 8.02)
69.64 (- 4.91)
23.21 (- 1.34)
7,28 (-58.48)
4,47 (-50.37)
DRIFT (DeepSock-V3.1
72.73
18.18
74.11
22.77
60.67
46,72
Parametric Retrieval
69.25 3,48)
19.79 (+ 1661)
76.79 ( 2.68)
24.55 1.78)
10.51 (-50.16)
5.93 (-40.79)
w/o Retrieval
60:43 (-12.30)
15:51 2.67)
76.34 (+ 2.23)
22.77 (#: 0.00)
13:42 (-47.25)
8.12 (-38.60)
Table 7: Performance comparison of the full DRIFT model, parametric retrieval baseline, and zero- shot using GPT-4.1 and DeepSeek-V3.1 with pass@1. Values in parentheses show performance change relative to the full DRIFT model.
To disentangle the contributions of an LLM's internal (parametric) knowledge and external (re- trieved) knowledge, we conducted a "parametric retrieval" experiment. In this setting, we prompted the formalizer models only with the decomposed sub-queries, omitting the retrieved premises and illustrative theorems. This setup probes whether the structured sub-queries alone are sufficient to guide the models to access their own latent knowledge for the formalization task.
The results in Table that external knowledge from retrieval remains largely indispensable and cannot be fully substituted by the LLM's internal knowledge alone. However, we observe notable distinction between the models. DeepSeek- quired formal knowledge; for this model, the sub-queries appear to function Chain-of-TT Thoughth style prompt, structuring its reasoning process and thereby improving formalization accuracy. This aligns with earlier finding that BrepSeek--3.111 zero-shot performance with sufficient sam- pling (pass @1 10) approaches its retrieval-augmenned performance, suggesting it often possesses the necessary formal knowledge but requires effective prompting surface it.
demonstrates a stronger grasp the re-
Crucially, this ablation counters the data contamination hypothesis, which posits that retrieval merely primes models recall memorized solutions on in-distribution benchmarks. Under this hypothesis, explicit sub-queries alone should suffice to trigger correct recall. However, the significant perfor- mance gap between Parametric Retrieval and full DRIFT (e.g.. GPT-4.1 improving from 13.64% to 17.38% on ProofNet) confirms that retrieved context provides essential syntactic and semantic information absent from the model's parameters, rather than simply acting as a memory trigger.
A.2.7 STATISTICS OF DECOMPOSED SUB-QUERIES
To better understand the Decompose module and its behavior, we analyzed the number of sub- queries generated when decomposing informal statements from our three benchmarks: ProofNet, MiniF2F-test, and ConNF with different L.MMs as decomposers.
The results, summarized Table show that different models produce a varying number of sub- queries. GPT-4.1 tends to generate the most detailed decompositions, with an average of 6.27 sub- queries, while DeepSeek-V3. produces the most concise ones, averaging 5,06. Furthermore, the complexity of the benchmark appears to influence the decomposition length. Statements from the ConNF benchmark, which covers frontier mathematical research, consistently required more sub- queries (6.42 on average) across all models, likely reflecting their greater conceptual density com- pared to the undergraduate- problems in ProofNet (5.69) and the more self-contained problems in MiniF2F-test (5.21).
18

---

Published as a conference paper at ICLR 2026
Model
ProofNet
MiniF2F-test
ConNF
Model Avg.
-laude-Opus-4
5.84
5.59
6.52
5.98
GPT-4.1
6.39
5.40
7.03
6.27
DeepSeek-V V3.1
4.83
4.65
5.71
5.06
Benchmark Avg.
5.69
5.21
6.42
5.77
Table Average number of decomposed sub-queries generated by different LLMs as decomposers across three benchmarks. The final row and column show the average values for each benchmark and model, respectively.
A.2.8 DIMINISHING RETURNS OF INCREASING ILLUSTRATIVE THEOREMS
0.9
0.8
Premise Coverage Rate
gpt-4.1 (minif20
gpt-4.1 (proofnet)
gpt-4. (conn))
deepseek-v3 (mini(20
despeeekva. (proofhet)
deepseek-v3 1 (connf)
m-3
2
10
Top-m
Figure 2: Premise Coverage Rate Top-m. The dashed purple line marks the selected budget of
m 3, indicating the point of diminishing returns.
We set the illustration budget to m to balance premise coverage against contextual noise. To validate this, we empirically analyzed the premise coverage rate across varying budgets As illus- trated Figure m = 3 marks the "elbow" of the curve, representing a critical point of diminishing returns. Although coverage increases marginally up
the curve flattens significantly after m = 3, indicating that the first three theorems capture most retrieved premises. Furthermore, our ablation study (Table 3, Section 5.3) supports this threshold, demonstrating that excessive context degrades performance in low-dependency regimes (c.g., MiniF2F-testt.
A.2.9 THEORETICAL GAINS ADAPTIVE RETRIEVAL ON SELF-CONTAINED BENCHMARKS
To quantify the theoretical gains of adaptive retrieval, system dynamically choosing whether to skip retrieval for self-contained problems or employ DRIFT for dependency- -heavy ones, we evaluated an "Oracle Ensemble" on MiniF2F-test.. This metric represents the performance upper bound of perfect classifier selecting the optimal strategy (Zero-Shot or DRIFT) for each instance. As shown in Table the Oracle Ensemble consistently outperforms both the Zero-Shot baseline and DRIFT. For example, using Claude- -uauee--- the ensemble improves the BEq+ score from 32.59% (DRIFT) to 35.27%. This confirms the approaches complementary: DRIFT provides crucial scaffolding for complex formalization, while Zero-Shot avoids introducing spurious dependencies in self-contained problems. Although training adaptive classifier (e.g., ReIf-RAG (Asai al. 2024 is beyond the
19

---

Published as a conference paper at ICLR 2026
Model
Metric
Zero-Shot
DRIFT
Oracle Ensemble
(Adaptive Upper Bound)
TC@1
95.09
93.75
95.98
Claude-Opus-4
BEq+@1
31.25
32.59
35.27
TC@1
69.64
74.55
81.70
GPT-4.1
@
23.21
24.55
25.89
"Oracle Ensemble" Performance on MiniF2F-test (Pass@) 1). The Oracle Ensemble repre- sents the best-case scenario for adaptive retrieval, selecting the best result between Zero-Shot and DRIFT per problem. Best results are bold.
Table 9:
scope of this work, these findings establish a strong theoretical motivation for future research into dynamic retrieval gating.
A.2.10 ANALYSIS OF GOEDEL-V2-8B3 INTERNAL REASONING
As discussed in the Section 4 Goedel-V2-8B's specialized finetuning makes it highly reliant on parametric knowledge. We observe that it achieves its strong zero-shot typecheck performance via an implicit Mhain-of-Thhughe "thinking" mechanism, an example of which is illustrated in Figure
While this internal reasoning already includes decomposition and self-reflection, it lacks the preci- sion of DRIFT'S explicit retrieval. For instance, on the ProofNet benchmark. Goedel-V2 fails to effectively leverage external oracle* context (ProofNet BFq+ @ I remains 9.09%). relying instead on extensive sampling (pass @ 10) to generate correct solutions.
As noted in Section 5.2 this internal "thinking" mechanism, while syntactically robust, frequently hallucinates dependencies when pushed out-of-distribution to novel domains like ConNE. In con- trast, providing external knowledge via DRIFT nearly doubles Goedel-V2-8B's single-pass preci- sion on ConNF (BEq+@) improves from 2.29% to 4.27%, BEq+ 10 improves from 10.93% to 19.04%). This further highlights the necessity of the explicit, non-distracting context provided by DRIFT to bridge the gap between syntactic validity and semantic correctness.
A.3 QUALITATIVE ANALYSTS
A.3.1 MINTF2F-TEST FAILURE ANALYSIS
To investigate when retrieval harms MiniF2F-test performance, we conducted an error analysis. Across 672 examples from all benchmarked models, we identified 23 instances where the zero- shot baseline succeeded but DRIFT failed. Averaging just 22.20 words and requiring no explicit quantifiers, these informal statements exhibit very low complexity. Notably, in 12 of these 23 cases, DRIFT generated statements that passed typecheck but failed BEq+
This analysis revealed three primary failure modes on MiniF2F-test.. First, over-complication from retrieval noise can confuse the model straightforward problems, whereas the zero-shot baseline yields cleaner statements. Second, variable naming issues arise when retrieved context introduces inconsistent identifiers. fortalizaoooniiiioon style mismatches occur when the model adopts struc- tural patterns from retrieved theorems that deviate from the reference, causing BEq+ to miss seman- tic equivalences. Selected examples illustrating these failures are provided below.
Example 1: mathd algebra 432 (Claude-Opus-4)
The Problem: Expand (x: (2x -
Zero-shot (correct):
theorem mathd_algebra, (x IR)
12
6)
x 18
DRIFT (failed typecheck).
theorem mathd_algebra 432 (X 3)
X X-2 18
20

---

Published as a conference paper at ICLR 2026
Analysis of Goedel- -22-BB's "Think" Capability
Input (Informal Statement):
If is rational (r * 0) and z irrtiional prove that ræ is irrational.
Model Internal Reasoning (<think>):
Let analyze this problem step step. The problem is asking prove that if rational (and nonzero) and æ irrational, then ve irrational.
Lean 4, need to:
Define what it means for number rational Define what it means for a number to be irrational
3. State the theorem that if is rational (nonzero) and æ is irrational, then ræ is irrational
In Lean 4:
Rational numbers are represented by Q
The condition "r is rational and nonzero" can be written
+ and
Irrational numbers are represented by the complement rationals, or can use Exrational x which means x & Q (or equivalently - (x Q))
when x is a real number
Reasoning about Types and Coercion]
Let me think about the types. Since we're dcaling with irrational numbers, we're working in the real numbers R. The rational number can be coereed into R, and is real number.
(Self-Coree Correctoo/t
Wait, let me double-check the definition of irrational in Lean 4. believe Irrati onal is defined as - (x : Q) when is real... Actually, let me he more careful about the cocrcion. When we have Q and R, the ex- pression x should work because there's coercion from to
Generated Formal Statement:
theorem : forall (r (1)athbb(()9) (x : R) *
Irrational x -> Irrational (fr x) = by sorry
An Example of the Goedel-V2-8B's internal reasoning. The model first outlines the necessary definitions in natural language, then maps them to specific Lean 4 syntax, and finally reasons about type coercion (Real vs. Rational) before generating the compilable code.
Figure 3:
The statement generated by DRIFT failed because of the undefined variable "X"
Example 2: mathd algebra 143 (Claude-Opus-4)
The Problem: If f(x) 1 and g(x) x² 3, what is (((()))
Zero-shot (correct):
theorem nathd_algebra X, g x 3) (g 2)
(f g
RJ (hf : V x, f
1) (hg
DRIFT (failed BEq+; false negative of BFq+):
theorem mathd algebra__ll_ let
IR fun
let g R
+ R = fun x => x 3
f (g 2)
Both statements are semantically equivalent to the ground-truth, BEq+ fails to classify DRIFT'S statement correctly.
21

---

Published as a conference paper at ICLR 2026
Example 3: amc12.2000.20 (DeepSeek-Va) V3.1)
The problem: System of equations with zyz Zero-shot (correct):
theorem amc12_2000_22 (x 2 [] (hx : x 0) (by y > 0) (h2 ; 2 0)
(h1 x 1/y = 4) (h2 : y + 1/2 = 1) (h3 : z 1/x = 7/3) x
DRIFT (failed typecheck):
theorem ame12 2000 20
3! y R), 1.0AA>0A=2000 1/y
A y 1/2 = =12 1/x =
A.3.2 DRIFT OUTPERFORMING ORACLE* RETRIEVAL.
As shown in Table 2 DRIFT can surpass the Oracle* baseline on ConNE. We hypothesize that ground-truth premises alone are insufficient because they lack necessary usage context. DRIFT addresses this by providing retrieved theorems that serve syntactic scaffolding.
Across our evaluated models, DRIFT succeeds where Oracle* fails 205, 171, and 184 out of 961 cases, respectively. On average, Oracle* failures consist of typecheck errors (~78%, often missing namespaces or types) and semantic equivalence issues (~22%, failing BEq+ despite typechecking). Notably, DRIFT generates longer statements that correctly incorporate namespace qualifications, type class instances, proper type coercions, and explicit type annotations, thereby significantly re- ducing formalization errors.
The cases below illustrate that ground-truth premises cannot guarantee correct formalization when success relies subtle usage patterns absent from dependency names. DRIFT overcomes this limi- lation by leveraging retrieved theorems as structural scaffolding. These examples explicitly demon- strate correct syntax (e.g., namespace usage, type coercions like t (3) and proper argument binding (implicit, explicit, or typeclass). Furthermore, they reveal hidden contextual requirements, such as non-obvious typeclass instances (e.g.. [ConNF FOAAs sumpti ions] ). and guide accurate seman- tic formulations not explicitly detailed in the informal statement (c.g.. distinguishing set versus type cardinality).
Example 1: ConNF. www.lle.eeealll.eeeeeee ofCoe inj (Claude-Opus-4)
The Problem:
ConNE Preeanggeeee....eeeeer.ee.geeele wwwphnggge..ooooeee ofCoe-in is a theorem Lean 4 that states the injectiv- ity of the ConNF, P Preteaggll ofCoe function in the context of Constructive Ordinal Notation (ConNF). This theorem asserts that two pretangles and b are equal and only if their images under the ConNF, P Pretangle ofCoe function are equal.
Gold Statement:
[simp] theorem ConNF, pretangle.cfCoe.
[ConNF PPrrams Params ] (a : ConNF .A] (a : ConNe, Pretangle ta) (b ConNF. Pretangle to
} :ConNF Pwwtaereeeeoooooooo...... ofCoe ConNF. www..rrreeeee.ooeeee b +> b :- by sorry
Oracle* Dependent Premises:
ConNF. Params ConNF. ..r...retto Pretangle
Oracle* (failed typecheck): The failure here is a type signature mismatch. The generated statement defined the universal level a a generic TypeIndes whereas the library requires the specific model index type (ConNF.A). Consequently, the model failed to apply the necessary type coercion (t a:) required for Pretangle e in this context. The premise list provided the names and declaration of those premises, but not the specific type constraints to apply.
theorem oaapannlee..ooeeeiaaeeeeeeeeeeee [Parama] (a TypeIndex) {a b Pretangle a) Pretangle, ofCoe Pretangle,
ofCoe b ofooo
b by sorry
22

---

Published as a conference paper at ICLR 2026
DRIFT (conrect):
theorem ConNE ConNE. Pretanggee.oooo_.iii. [ConNF, Params] {a : ConNF. .A) ) {a
ConN2 Pretangle at : ConNE, ConNe.Pretangle.off
ConNF Pretangle..cccmmm cffoee
+ a
by sorry
The key retrieved theorems: The retrieved theorem ConNE www.tangle.tooo.....oo..o.o. inj provided a structural template.
theorem toCoe inj : (toCoe Pretangle toCoe iofoe.injective.ee.
Example 2: StructAction refiiiieiiiioor.eeeeeeeeeeeeeee sefineeprrcisse (Dee)Seek-V3.1)
The Problem: The theorem ConNF. StructAction refine.precise states that if yp 3-structural action that satisfies the lawfulness condition for each 8-extended index, then the fined B-structural action ConNF. .oonNF.ttructtieee www.uuutttttiio... ion. refine hyp is precise, meaning assigns precise near-litter action to each --extended index.
Gold Statement:
theorem ConNE StructAction rew.eeteetto..re.eee...e.e.. www.ieefineeee. retine_preeissee [ConNF Paarams 1 ConNF Indexx ip ConNE StructAction 8) (hep
ConNF wtw.:stttettttiioo....ta.. :CnNNE Strructettin.Prrccie (ConN=.StructAattion.
yp hi) by sorry
Oracle* Dependent Premises:
ConNF Params
ConNF , www.rrutttttionoreeeee.ee.eee
ConNF . StutAction
ConNF. Saa.se.sstuutRciio...Pe... ConN:.strructtctiin.laaaa lawful
The model failed the bidirectional equivalence check due to argument struc- ture. It incorrectly typed the parameter 3 as ConNE A instead of ConNE Type Index and failed to structure the hypothesis hep as an instance-implicit argument.
Oracle* (failed BEq+):
theorem ConNE St ructAction refine_ srrcccce [CoNNF JRonN..Paran Params] (8 : ConNE .A} 9)
httpteeooooooooeeeeeeeeeeeeeeeee (p ConNF. StructAction 8) (he : www..ttttttttt..cc.cmm.o
Str....ttutttttion Precise SeanF..srretkctiooo refine ho) by sorry
DRIFT (correct):
theorem ConNE wetrutttttioo..oiieee...oe. ConNF. ConNF.Tyan IypeInexx)I (8 : ConNE sttructAction () (he wtt.ruuttttion.eeeeee....
[ConNF. Params] (8
p) ConNF. wwt.ttttttiion.eeeeeeeeoo.o.ee.e (ConNF www.ssttttttiionreee......
:= by sorry
The key retrieved theorems: The retrieved theorem ConNF NearLitterAction ierreiiiiioo.nnnneeeeeeeeeeeeeee refine.precise
showed the correct usage pattern for "precise" predicates, implicitly suggesting the argument struc- ture that allowed DRIFT match the library's conventions.
theorem refine_preciss sse Precise refine he) fi1llAttobbiits_ppeecc (fillAttorange_esymmnlll ff_atbee_rraa_____eeaaeee_b_ee__ hp)
Example 3: ConNF CodingFunction of smul mem (GPT-4.1)
The Problem: In the context Constructive Ordinal Notation (ConNF), the theorem ConNF, MoodingFunctiiooo
wwm.omfmmmlll.... mmem asserts that for any CodingFunction x level B, if p (where p is an Allowable and is a Support) is in the domain of X, then itself must also be in the domain of x-
23

---

Published as a conference paper at ICLR 2026
Gold Statement:
theorem ConNE', www.nnnnnnttioo.ee........mmm... [ConNF Level] [ConNF, roAsssumptions] {8 ConNF. A) [ConNF. LeLevel 18
[ConNF: Params
(X ConNF. www.nnouuntciinnn Ø) {S ConNF Support 19) {p
ConNE Allowable 18) (h x) :8 E := by sorry
Oracle* Dependent Premises:
ConNF. Params
ConNF LeLevel
CoNNF Codí inFunccton ion
ConNF'. Support
Oracle* (failed typecheck): The model failed to compile the statement because it missed critical, non-obvious constraints: the global typeclass instance [ConNF FOAAssumptiiiiiccc cimpmmttioonoot and the spe- cific type coercion from 3 to + 8 for the "LeLevel" instance.
theorem ConNE. www.nooodnnniiiooooooooooooo caatrttiioommmmcomoeeemeem wwt_im_mmmmmmmmeeeeeeeeeeeeeeeee [ConNF. Params]
[ConNF Level] 1 ConNF. AA] [CorNF LeLevel 3]
ConNF Contiinnnnntiioon B) (p ConNF Allowable () (S ConNF ConNF, Support. B
(x.decode (p S) iissome + (x.decode S) iisSmme := by scrry
DRIFT (correct):
theorem ConNE . www.innuunetiinn..i...o mem_otiemm......mmmmmommmmmm.m smul mem [ConNF .2 Paranss
[ConNH Level] [ConNF. POAAssumptionss {8 ConNF.A) (elnevl 18
(x ConNF. Cod ingutcction 8) (p :
18) (8
ConNF. Support () S domain
S E d.dorain by sorry
The key retrieved theorems: The retrieved theorem CoNNF Codingfunction wwppontsssppsttsooooo decode demonstrated the interaction between CodingFunction 8, Support 8, and Allowable B.
theorem supports supports_decode decode (x
CodingFunction 3) Support (hs : e
X) : supports (Allowable 8) Set (Address 3)) ((x.eccod 8) get
h5) = X. k.supports_decoee s hs
While not identical, it provided contextual example of how these types work together, guiding the model to infer the correct, more complex signature.
Example ConNF mk new.Litter''r (Claude-Opus-4)
The problem: The size of each near-litter in the context of Constructive Ordinal Notation (ConNF) equal to the cardinality of the type k.
Gold Statement:
[sim]] theorem ConNF "earlitttr''' [ConNF_Pares Params ConNF, COnNF.NearLiter NearLitter) :Cardinal.ng IN Cardinal.ne ConNF ... : by sorry
Oracle* Dependent Premises:
Cardinal.mi
Oracle* (failed BEq+): The Oracle* based statement committed a semantic formulation emror. hallucinated theorem equating the cardinality of the Type ConNE .NearLitter to K. The prob- lem asks about the size of individual near-litter sets (coerced from "N"), not the cardinality of the type containing all near-litters.
theorem CoNNE .nk_nerrLittorr'' [ConNE BEAnNE,Paree Params] Cardinal.ne CONN.NNeaLitte. = Cardinal .nk ConNF., k : by sorry
DRIFT (correct):
24

---

Published as a conference paper at ICLR 2026
theorem ConNE mk nearlitter'' [CenNE Params] ConNE .Litter) ConNF.Atom) (h : ConNF. IsNearLitter s) : Cardinal Cardinal .t. ConNF. x = by sorry
Set
The key retrieved theorems: DRIFT retrieved ConNF, mk litterSet, which shows that cardi- nality theorems in this library typically apply to a specific set 8 (e.g., "litterSet L.") rather than types. This scaffolding helped the model correctly formulate the theorem using an explicit s and the witness hypothesis ConNF. IsNearLitter L S,
theorem mk_ (L Litter) (litterret L) (LitterSetEquiv 1)
cardinal.eq:
A.3.3 FAILURE ANALYSIS FOR ABLATION STUDY (CONNF)
Our ablation study (Section 5.3 Table B shows that on ConNF and MiniF2F-test, removing the Decompose module after removing Illustrate does not further degrade performance. As noted in Appendix(A.3.1 2FniF2F-test relies minimally dependent premises, making additional context distraction and performance fluctuations largely stochastic, To understand this phenomenon deeply, analyze ConNF below, examining cases where both the "Base Retriever" (DRIFT w/o Illus- trate and w/o Decompose) and "Full DRIFT" succeed, but "DRIFT Premises Only" (w/o Illustrate) fails. Despite DRIFT achieving higher global recall (40.6% vs. 32.0% for GPT-4.1), this break- down highlights qualitative differences: the Base Retriever typically finds "lexically close" helper lemmas (e.g., invFun_ar __co),, whereas DRIFT retrieves more diverse set of premises across namespaces. Consequently, DRIFT Premises Only fails due to either (1) local recall gaps (missing specific helpers found by Base) (2) application gaps (retrieving broader definitions but lacking usage examples). Full DRIFT bridges these gaps via theorem scaffolding.
These comparisons reveal that even when DRIFT Premises Only retrieves the necessary definitions (Examples and 3), it suffers from application gaps, failing to apply them correctly. The Base Retriever sometimes avoids this by finding exact-match lemmas (Example 2) or benefiting from favorable ranking (Example 1). However, Full DRIFT remains the most robust; its retrieved theo- rems provide crucial application knowledge, such as templates, style guides, and usage examples, enabling the model to synthesize correct solutions even without exact-match lemmas when prone to syntax hallucinations.
A key driver of these differences is premise diversity. The Base Retriever reliably locates lexically close helper lemmas within exact or adjacent namespaces (c.g., PartialPees invF un.as_cod or Cardinal. *). Conversely, DRIFT retrieves broader set of premises, encompassing wider concepts (e.g., Set, Part a alrdeer, PFun. image) and distinct namespaces (e.g., Equiv vs. PartialPerii rm). While this diversity successfully bridges conceptual gaps (e.g.. PartialEqui in Example 2), it introduces distractions if the model lacks the necessary scaffolding to navigate these broader definitions.
Example 1: Equiv. Perm, towartiaaeeeennttt
(Claude-Opus-4)
The Problem: Prove that the inverse of permutation, when converted to partial permutation, is equal to the inverse of the partial permutation obtained from the original.
Gold Statement:
8 s simp I theorem thm P la Type u. (m Equiv. a)
E.uiv.Perr. Setpii..eer..toPattin Perr म -1 PartialPerm.ay
a) = by sorry
Base Retriever (Success): The Base Retriever successfully found
wrw.iiaieem.toPaataaale. (ranked 2nd), which helped the model infer the cor- rect structure.
theorem
(a Type*] (E Equiv. a) f- FoaatiaaPPrrm = t.tooartialPert symm := by sorry
Key retrieved premises:
25

---

Published as a conference paper at ICLR 2026
Serrii.eem..orr Perm.toPattialemm
PartialFerm, toPartialEquiv
PartialFerm. refl PartialFerm.sy/ PartialFerm
The model retrieved PartialPerte CetermttoPatiii Equiv (ranked 3rd) but failed to understand how to use it to bridge Equiv Perm and Partia Permm symm. Instead, it hallucinated an invalid usage
DRIFT Premises
Only
(failed typecheck);
symm. toPartiaaeaann
theorem Equiv. Perm, www.tttaaeeeernae... inv (a : Type+) (π : Equiv, Perm a) : #. t.toaattialeemm..yn : by sorry
Key retrieved premises:
Dquiv.Perme toPartialPeer
PartialFerm, symm PartialFerm toPartialEquiv
PartialPerm
Equiv.Perm
Full DRIFT (Success): Full DRIFT succeeded because the retrieved theorems explicitly demon- strated the pattern of commuting operations (moving symm across toPartia i)), acting as a structural scaffold.
theorem Equiv. Perui, www.sttttaaaaaerma.....m inv {a : Type u_1) (x : Equiv. Perm a)
( ( toPartialle (a.toPartialPerm) synm == by sorry
Key retrieved theorems:
theorem a n. w.syym..toPatialll..
tovartiallquiv symm rfl
Example 2: PartialPerm coe toPartialEquiv symm (gpt-4.1)
The Problem: The theorem states that for a partial permutation π, the inverse of the partial equiva- lence obtained from is equal to the function representing the inverse of m
Gold Statement:
8 [smp]] theorem thm_P la Type u_1) (n PartialForm a) :f (PartialEquiv symm (PartialPerm, aPattaaleem.toPaaaaaaBllll m) (PartialPerm. symm toFun == by scrry
Base Retriever (Success): Base Retriever found helper lemmas like invFun as ccc and toFun_as_coe, which directly link the function coercion to the inverse, guiding the model correct formulation using invFun.
theorem PartialPerm, coe www.ottataauuuuuaaotooot a) : (or.toPartial) Equiv) symm. Part a)) i.invFun by sorry
{a Type*) (n PartialPemn
Key retrieved premises:
Equiv.Ferm. www.mmttoattialaaooo
PartialFerm toPartialEquir
PartialFerm. invFun_as_coc PartialPerm.sym PartialFerm. httpteermmttff______s____
DRIFT Premises Only (failed typecheck): The model retrieved the necessary definitions but failed to apply them correctly. It attempted to apply Partialls PartialEquiv. iyym symm directly to æ (a PartialPern without converting first, resulting in type emror.
26

---

Published as a conference paper at ICLR 2026
theorem PartialPerm. coe toPartialEquie symm (a Type*] (æ PartialPerm a) : (PartialFerm. symm л) topun (Partial symm TT) toFun : by sorry
Key retrieved premises:
Equiv. touui.ttooPrrtilleuui PartialEquiv. symn
PartialFerm. Symm PartialFess
Full DRIFT (Success): Full DRIFT retrieved the theorem toParti toPartialEquiv.amm which pro- vides exact template for the equality between the symmetric partial equivalence and the partial equivalence of the symmetric permutation. This scaffold allowed the model to construct a correct statement.
theorem PartialPerm. wwt_ttoeeeeaooeee htt.::/mmooooooorrraaaaeaeaeaeea {a Type*) )
(T PartialPerm
(PartialFerm, top.rtoaaaaauuiittt x) symm
(PartialPerm.sa) symm symm by sorry
Key retrieved theorems:
theorem toPartialEquiv_.00 : π. w...mmm. w.syy...oPartiialquu.. =
.toartiiiEEqii.ee symm := rfl
Example 3: Cardinal hardinal..onemptty. .onempty compl of mk 1t mk (Claude-Opus-4)
The Problem: cardinality set s less than the cardinality of type a, then the complement s is nonempty.
Gold Statement:
theorem thm_P (a : Type t} Set a) Cardinal.mt Cardinal.ne .kk @) :Set. Nonempty s" i= by sorry
Base Retriever (Success): Base Retriever correctly identified and retrieved the function Cardinal .mk, enabling the model to apply the premise correctly.
theorem Cardinal wwrrdinal.onnmmty..oom nonempty_compl.cco of feff_m__l__mm 1t_mk la Typo*) is : set a (h : Cardinal.nt mk Cardinal. mk a) : (s9) Nonempty :- by sorry
Key retrieved premises:
Set.Nont Noteepyy
Cardinal.mb
Cardinal
Cardinal 1
Cardinal.ales
DRIFT Premises Only (failed typecheck): Despite retrieving Cardinal mk (ranked 2nd, same as Base), the model failed prioritize it over the notation 4s. The use of #s 4a without opening the necessary namespaces caused a typecheck failure.
theorem Cardinal. c nonempty_compl himpl_cf_mks @e____________m____ {a Type*) {s
Set 0) (h
ts < 4a) (s") Nonempty : by sorry
Key retrieved premises:
Set. Nonempty
Ca cardinal malkk.
Set
27

---

Published as a conference paper at ICLR 2026
Full DRIFT (Success): Full DRIFT succeeded because it retrieved the theorem ConNE, 1_le _mk_cloud, which explicitly uses Cardinal. .nk. This scaffolding guided the model to prefer the explicit function over the notation.
theorem Cardinal nonempty_compl _acmppl_____k__ feffffn_l______ {a Type*) {s Set a) (h Cardinal .rk Cardinal.m. mkk a) Set.Nonempty s" by sorry
Key retrieved theorems:
theorem pl mk cloud N.Noempty #u (cloud by s) by rintro (t, ht) refine' (Cardinal, (Cardinal.mk_le_mll
<| subset_cloud ht). "transeegg" mk_localCardinal] exact sypedlearlitterr.nng
rw [Cardinal mkk _k_immae_ee,,
A.4 PROMPT TEMPLATES
A.4.1 DECOMPOSITION PROMPT
This appendíx contains the complete prompt used decompose informal mathematical statements into retrieval queries (the Decompose module). It is composed of two parts: system prompt that defines the model's expert persona and overall task, and a user prompt template that structures the specific input and desired output format.
System Prompt
You are an expert formal mathematics, Your task is to decompose an informal mathematical statement into a set of natural language queries. These queries are for retrieving the precise definiticns, theorems, and structures from formal mathematics library (like mathlib) that necessary vxformalizex the statement.
Your response must be in LaTeX. Decempose the statement into list of queries, with each query enclosed in a 'boooxd ()) command. The goal is to identify the building blocks for writing the statement formally, **not** to find a proof.
You need to:
1. Analyze the informal statement and identify its key mathematical components that need formal definitions
2. Break down the statement into natural language queries that describe the mathematical concepts and structures needed for Formalization
3. from the best of your knowledge, representation of it.
up with the Lean
4. Focus on what needs to be defined and the implicit hypothesis.
User Prompt Template (Instruction and Context)
Given the +Informal statement**, decompose the informal statement into retrieval queries for =*Iormalizinge* (not proving) the statement. Fach query must:
Describe mathematical definitions, structures, or concepts
needed to fermally express the statement in Lean 4 Explain what mathematical objects type signatures Read as a complete sentence that teaches about the formal
involved
mathematical structure
Focus on how to represent concepts formally rather than how to prove them
28

---

Published as a conference paper at ICLR 2026
Sound like an excerpt from mathematics reference that explains formal definitions
The goal FORMALIZATION (translating Lean NOT finding proof strategies
Write informative descriptions that explain formal concepts and definitions
Each query should deseribe mathematical structures type informaticn
Avoid interrogative words (what, how, when, why, etc.) The queries should collectively cever all definitions and structures needed to write the formal statement
Please return each query using the \bbexed[11) LaTeX command.
[few_shot_eex_
shot examples!
++Informal statement snlformal_statemenn
**Decomposed queries for formalization::
A.4.2 FORMALIZATION PROMPT
This appendix contains the complete prompt used to formalize informal mathematical statements into formal statements (the Formalize Theorems module). It is composed two parts: a system prompt that defines the model's expert persona and overall task, and user prompt template that structures the specific input and desired output format.
System Prompt
You are an advanced assistant specializing in formal mathemat ics and Lean theorem proving. You have extensive expertise in translating rathematical concepts from natural language into precise se lean code. Please make sure the generated lean code compiles with [libraries) and Lean version
User Prompt Template (Instruction and Context)
Given the potent ial dependent premises listed under **Potettial dependent premises** (some may be irrelevant) and the demonstration examples under *DDmonsttrtion example***, translate the natural language statement provided under ** Informal statement** into a formal Lean theorem. Use the theorem name specified under **Name** as the Lean identifier.
Your response must:
Write only valid Lean 4 code with clear and idiomatio use of lean syntax and conventions
Include only the formalization
do not include any headers, explanatiens, or proofs
Use the provided name as the thecrem identifier, ensuring it adheres to Lean's s naming conventions (no hyphens, prefer snake_case camelCase)
29

---

Published as a conference paper at ICLR 2026
Faithfully capture the meaning the informal statement, paying
close attention to:
Predicate usage and logical structure
Type class inference
Quantifier scope and binding
Mathematical notation and operations
Enclose all code within triple backticks with the 'lean" language identifier
Expected Output Format: vean
theorem [NAME] [Lean formalization of the statement] :- by sorry
Guidelines:
Select only the relevant premises from those provided
Ensure proper type annotations where necessary Use standard Lean 4 mathematical library conventions, Lean version (lean_version)
Maintain logical equivalence with the informal statement
Keep the formalization as clean and readable as possible
**Fotential dependent premises** [daperdeett_preellss____eee
in examples**
(theorems_list)
Name
(problem fall__ullllaallaalllaae nane]
**Informal statement** [probloem_inffrmll__sttcoooo
30


Reviews:
[{"review_id": "DY1BMB0GZX", "reviewer": "Reviewer_nbLa", "summary": "The paper proposes DRIFT, a new technique for autoformalization. Their pipeline first decomposes a statement into sub-problems, retrieves relevant premises and their usage in sample theorems, and finally uses all the included retrievals to perform formalization.", "questions": "- Can the authors demonstrate gains on proof autoformalization using this method as well?\n- Why was m=3 selected for the illustration stage? Is it possible that scaling this up to much more examples will improve more (e.g. in https://arxiv.org/abs/2404.11018)\n- How does DRIFT compare to other autoformalization techniques in performance?", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "- The pipeline for autoformalization is novel and has not been explored before in the literature. The results are also strong, and the authors also ablate removing several modules (Sec 5.3), providing interesting insights into the value add of each module.\n- The techniques used for the modules are interesting, and the method outperforms zero-shot and retrieval-augmented baselines.", "weaknesses": "- As discussed in the paper, I suspect that the benchmarks could be contaminated, especially miniF2F and ProofNet. There are many instances of these two popular benchmarks on GitHub, and it would be surprising if models had not seen them before, even if the results are low. It is possible that retrieval could remind or steer the model to a certain distribution that can elicit its recall ability of seeing these benchmarks.\n- The pipeline consists of a set of modules, but none of them seem to be particularly optimized for performance. For example, for the decompose module, only one decomposition prompt seems to have been tested. \n- The previous issue could lead to misleading interpretations of the ablation study: the authors noted that in one of the experiments, removing the \"decompose\" module does not degrade performance, but I wonder if this would be different if the retrieval and formalizer models were replaced with stronger models.\n- The paper does not compare with other autoformalization techniques in the literature, making it hard to assess its significance and effectiveness", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "uyQXyA3pio", "reviewer": "Reviewer_Wmuf", "summary": "The paper proposes DRIFT: a four-stage framework for autoformalizing informal math statements into Lean. DRIFT (i) Decomposes an informal statement into atomic, concept-focused sub-queries (with predicted formal “anchors”), (ii) Retrieves dependent premises from a formal library using a finetuned dense retriever, (iii) Illustrates usage via a small set of demonstrative theorems chosen by a greedy coverage algorithm, and (iv) Formalizes the statement conditioned on the retrieved context. Across ProofNet (in-distribution), MiniF2F-test (largely self-contained), and ConNF (out-of-distribution), DRIFT improves dependency retrieval F1 and downstream formalization, with especially large gains on ConNF where it even surpasses an oracle* retrieval setting.", "questions": "1. How does performance vary with the number of sub-queries, top-k per sub-query, and the illustration budget m? Any evidence of diminishing returns or overfitting with larger m?\n\n2. You surpass Oracle* on ConNF; can you provide diagnostics (e.g., premise coverage of selected theorems, overlap with ground truth, qualitative examples) explaining where illustrative theorems help beyond oracle dependencies?\n\n3. Some slight inconsistencies in terminologies: e.g., \"DeepSeek-3.1\" and \"DeepSeek-V3.1\" both appeared.", "limitations": "", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1. The framework adds an Illustrate step that selects a minimal set of theorems to demonstrate how retrieved premises are used, addressing the gap between definition and usage, an underexplored angle in prior work.\n\n2. Clear end-to-end design validated on three complementary benchmarks; the method substantially boosts BEq+ and type-check rates over strong retrieval baselines and zero-shot, with striking OOD gains on ConNF.\n\n3. Ablations show the Illustrate step is crucial (removing it sharply reduces BEq+ on ProofNet/ConNF), and quantify contributions of Decompose vs. Retrieval.\n\n4. The pipeline is easy to follow, and can inform future RAG design for formal methods.", "weaknesses": "1. The decomposer appends predicted formal representations; the paper argues this helps anchoring, but does not quantify robustness when anchors are wrong/noisy.\n\n2. The ablation discussion suggests decomposed retrieval may introduce diverse noise that requires illustrative scaffolding; more error taxonomy and qualitative failure analyses (on both ProofNet and MiniF2F) would bolster the explanation and guide adaptive retrieval strategies.\n\n3. There is a chance that I missed this somewhere, but the paper does not seem to report compute/latency costs for decomposition + retrieval + illustration vs. baselines? Given practical adoption, cost-quality tradeoffs matter.\n\n4. The paper observes retrieval can distract in low-dependency regimes (MiniF2F). It would help to show an adaptive gate (e.g., predicting when to skip retrieval or to down-weight illustration) and quantify decision quality.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "RWhvSsNir3", "reviewer": "Reviewer_3Kvp", "summary": "This paper proposes the DRIFT framework , which aims to enhance the process of mathematical statement autoformalization. DRIFT decomposes complex informal mathematical statements into sub-queries, then accurately retrieves the corresponding formal dependencies. Based on these retrieved dependencies, it provides illustrative contextual examples to guide the model in applying them correctly. Through this structured process, DRIFT achieves improved performance in automatic formalization of mathematical statements.", "questions": "Please refer to the Weakness section.", "limitations": "", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 3, "strengths": "1.DRIFT introduces an innovative approach by decomposing complex informal statements into sub-queries, which allows for precise retrieval of the required formal dependencies. In addition to retrieving relevant premises, the framework also provides illustrative examples of their usage, effectively guiding the model to apply the dependencies correctly during formalization.\n\n2.The experiments demonstrate both the generality and effectiveness of the proposed framework. Moreover, the ablation studies clearly reveal the individual contributions and roles of different modules within DRIFT, strengthening the empirical support for the proposed design.", "weaknesses": "1.The ablation study shows that the retrieval module plays a crucial role in the overall performance of DRIFT. However, the paper does not compare this module with existing Lean premise retrieval methods, such as Lean Search or other established retrieval baselines. Including such comparisons would provide a clearer understanding of the advantages and limitations of the proposed retrieval component.\n\n2.The experiments primarily focus on general-purpose reasoning models such as GPT and DeepSeek. However, there are now several large models that have been specifically trained or fine-tuned on Lean. It remains unclear whether DRIFT has been tested on these Lean-specialized models, and such evaluation could further demonstrate the framework’s adaptability and robustness.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "P2NLasXEZ7", "reviewer": "Reviewer_AXr5", "summary": "The paper proposes an end-to-end autoformalization pipeline that converts informal mathematical statements into Lean 4 declarations. The system couples a retriever (trained by the authors) with a generator (commercial or open LLMs) and evaluates outputs using automated Lean checks and a symbolic-equivalence metric. The main claims are (i) training a task-specific retriever improves grounding for generation, and (ii) the pipeline can robustly produce syntactically valid, type-checked Lean statements across a curated benchmark. The paper reports head-to-head comparisons against several general-purpose LLMs and ablations around retrieval.", "questions": "Toolchain & dataset. What constraints led you to Lean v4.7.0/that mathlib commit? Please discuss how brittle your pipeline is to syntax/tactic drift across versions. Additionally, could you explain in detail how you conduct data extraction from mathlib and prepare them for embedding training in detail?\n\nGround truth. How do you construct ground truth (oracles) for decomposition and retrieval tasks? Detail the pipeline used to obtain ground truth (oracles) from Lean.\n\nInterpreting BEq+. Given BEq+’s known false negatives, do you have a human-adjudicated subset to calibrate precision/recall? How often do your “failures” reflect symbol-level mismatches vs true semantic errors? Consider reporting: (a) case study on type-checks but BEq+-fails; (b) human-judged correctness. \n\nAblations on retrieval → generation sensitivity. Please report end-to-end success vs top-k retrieval quality (e.g., R@k buckets) to quantify how much the generator depends on retrieval depth and filtering.", "limitations": "", "rating": 4, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "- Clear end-to-end systemization of a practical autoformalization pipeline for Lean 4, with sensible stages (retrieve → generate → check). The paper’s “illustrate” section is genuinely helpful: the qualitative visual walkthroughs of retrieved contexts, intermediate rewrites, and final Lean artifacts improve interpretability and reproducibility.\n- Ablations on retrieval are valuable; retrieval quality is a major bottleneck in Lean autoformalization, so any careful analysis there is welcome.\n- Timely topic & potential impact. There is fast-moving SOTA on Lean autoformalization and proof generation (Goedel/ Kimina/ process-supervised approaches); a robust, reproducible pipeline can help the community measure progress on statements specifically.", "weaknesses": "W1. Retriever novelty & baselines are weak.\n\nThe only trained component is a DPR-style dual encoder, which is basically the same as one in RAutouformalizer. Moreover, Lean-specific retrieval methods already exist (LeanSearch’s semantic search[3]; LeanExplore’s hybrid multi-signal retrieval[4]), and the paper neither compares against nor leverages them as baselines or components. This makes it hard to justify training a new DPR when stronger plug-ins are available. \n\nW2. Missing SOTA autoformalizer baselines.\n\n The paper compares primarily to generic LLMs (GPT-4.1, DeepSeek-V3.1) but omits direct comparisons to autoformalizer-specialized systems, notably Goedel-Formalizer[1] and Kimina-Autoformalizer[2], which are expressly designed to translate informal math to Lean 4 statements and are publicly available. Given their focus and reported quality, they are the most relevant baselines for this task. Including them (or explaining why they cannot be included) is essential for positioning. \n\nW3. Frontier model coverage is incomplete/out-of-date.\n\nFor the generator, the paper focuses on GPT-4.1 and DeepSeek V3.1. The current frontier for mathematical/logic tasks prominently features DeepSeek R1 (0528), OpenAI’s o-series (o3), Gemini 2.5 Pro, and Claude 4.1; these models publicly advertise stronger reasoning/coding capabilities and should be part of the comparison, at least in a retrieval-on vs retrieval-off ablation to substantiate the retriever’s benefit. Having only a single frontier model (Claude 4) is not persuasive in 2025. \n\nW4. Stale toolchain / dataset snapshot raises representativeness concerns.\n\n Experiments are run on Lean 4.7.0 / an older mathlib snapshot. Lean and mathlib have evolved significantly (Lean 4.25.0-rc2 exists; mathlib’s scale has expanded beyond 200k theorems), and style/namespace changes accumulate. Results confined to an older snapshot may under- or over-estimate real-world robustness. Authors should either (i) re-run on a contemporary toolchain and a recent mathlib commit or (ii) justify the choice and discuss compatibility gaps. \n\nW5. Evaluation metric (BEq+) may under-state performance without human adjudication.\n\n BEq+ is a reasonable automated proxy, but even its authors note a relatively high false-negative rate; strict symbol-level equivalence can mark semantically correct paraphrases as wrong. The paper reports low success rates (sub-25% in places); without a human-adjudicated subset or complementary metrics, it is hard to interpret practical significance. A small-scale human study or relaxed-equivalence cross-check (e.g., type-equivalence under definitional unfolding) would strengthen claims. \n\n[1] Yong Lin, et al. \"Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correction\" arXiv preprint arXiv:2508.03613 (2025)\n\n[2] Wang, Haiming, et al. \"Kimina-Prover Preview: Towards Large Formal Reasoning Models with Reinforcement Learning\" arXiv preprint arXiv:2504.11354 (2025).\n\n[3] Gao, Guoxiong, et al. \"A semantic search engine for Mathlib4.\" arXiv preprint arXiv:2403.13310 (2024).\n\n[4] Asher, Justin. \"LeanExplore: A search engine for Lean 4 declarations.\" arXiv preprint arXiv:2506.11085 (2025).", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Decision: Accept (Poster)