SITA: A Framework for Structure-to-Instance Theorem Autoformalization

Chenyi Li, Wanli Ma, Zichen Wang, Zaiwen Wen · 2025

Read SITA: A Framework for Structure-to-Instance Theorem Autoformalization by Chenyi Li, Wanli Ma, Zichen Wang, Zaiwen Wen (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2511-10356.txt.

Introduction

Chenyi Li, Wanli Ma, Zichen Wang, and Zaiwen Wen present SITA, an approach for autoformalizing theorems that instantiate abstract mathematical structures in concrete settings. Language models reason informally with growing skill but stumble when a research result must be written as a machine-checked Lean proof about a specific example of an abstract theory. SITA treats formalized abstract structures as modular templates carrying definitions, assumptions, operations, and theorems.

For a given instance, the system generates the Lean definitions and declarations, wires them through the typeclass mechanism, and builds verified theorems by checking the structural assumptions. Language model generation is refined with feedback to keep output formally correct. Tests on optimization problems show the approach formalizing diverse instances grounded in abstract structures.

Catalog record

CREATORChenyi Li, Wanli Ma, Zichen Wang, Zaiwen Wen
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE114 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2511-10356

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

SITA: A Framework for Structure-to-Instance Theorem Autoformalization Chenyi Li, Wanli Ma, Zichen Wang, Zaiwen Wen Abstract While large language models (LLMs) have shown progress in mathematical reasoning, they still face challenges in formalizing theorems that arise from instantiating abstract structures in concrete settings. With the goal of auto-formalizing mathematical results at the research level, we develop a framework for structure-to-instance theorem autoformalization (SITA), which systematically bridges the gap between abstract mathematical theories and their concrete applications in Lean proof assistant. Formalized abstract structures are treated as modular templates that contain definitions, assumptions, operations, and theorems. These templates serve as reusable guides for the formalization of concrete instances. Given a specific instantiation, we generate corresponding Lean definitions and instance declarations, integrate them using Lean’s typeclass mechanism, and construct verified theorems by checking structural assumptions. We incorporate LLM-based generation with feedback-guided refinement to ensure both automation and formal correctness. Experiments on a dataset of optimization problems demonstrate that SITA effectively formalizes diverse instances grounded in abstract structures. Code — https://github.com/chenyili0818/SITA 1 Introduction Recent advances in large language models (LLMs) have demonstrated impressive capabilities in solving mathematical problems and generating natural language proofs ( 1 ; 33 ) . However, such informal outputs often lack the formal rigor required for verification by proof assistants. To address this limitation, interactive theorem provers such as Lean ( 7 ) , Coq ( 13 ) , and Isabelle ( 25 ) have been developed to rigorously validate each step of a proof. These systems enhance the soundness and reliability of machine-generated mathematical reasoning ( 37 ) . Several recent efforts have explored the use of LLMs to construct formal proofs from given formal statements. Two main paradigms have emerged: stepwise generation and whole-proof generation. The stepwise approach, exemplified by Leandojo ( 38 ) , decomposes the proof process into premise selection and tactic generation, modeling proof search as a sequence of local decisions. BFS-prover ( 36 ) utilizes best-first tree search in generation. In contrast, whole-proof generation attempts to synthesize an entire proof in a single pass, typically by first producing a rough draft and then refining it into a valid proof ( 15 ) . These approaches often integrate natural language reasoning with formal symbolic reasoning, and are further improved through reinforcement learning techniques via expert iterations ( 35 ; 29 ; 31 ; 20 ) . In parallel, the task of autoformalization, i.e. translating mathematical problems stated in natural language into formal statements, has also received increasing attention. Early approaches leverage few-shot prompting ( 6 ) to perform this translation ( 34 ; 2 ) . Building on this foundation, subsequent work improves output quality through sampling strategies that select optimal outputs from multiple generations ( 19 ; 28 ) , or by retrieving related theorems from formal libraries ( 21 ) . While these methods are relatively easy to implement, their effectiveness remains limited by the capabilities of the underlying language model. Training-based approaches have also been explored for statement formalization ( 14 ) . The Lean Workbook ( 39 ) introduces an iterative data generation and filtering pipeline to formalize problems from online math forums in Lean 4. ATLAS ( 22 ) further improves formalization performance through expert iteration and knowledge distillation. Figure 1: Overall pipeline of SITA In this paper, we focus on a specific and widely used form of mathematical reasoning: deriving concrete instances from abstract structures. This reasoning pattern involves applying abstract theorems, defined over general mathematical structures, such as convergence guarantees of gradient descent on convex functions, to derive instance-specific results, such as the convergence of gradient descent for ridge regression. While this form of reasoning might seem straightforward, verifying that a specific instance satisfies the assumptions of an abstract theorem often demands non-trivial effort. This process may involve reformulating definitions, proving auxiliary lemmas, or performing symbolic manipulations, and in some cases, it occupies entire sections of theoretical papers ( 10 ) . Although this reasoning paradigm is common in algorithmic mathematics and research-level papers ( 4 ) , it heavily relies on expert intuition and manual work. It has not been systematically explored in the context of automated formalization yet. Our goal is to automate this process using the Lean proof assistant by translating natural language statements into formal definitions, verifying structural assumptions, and applying general theorems to construct formal proofs. While most prior formalization research has focused on Olympiad-style mathematical problems, our study targets a broader and practically important form of reasoning: structure-to-instance theorems, with the goal of auto-formalizing mathematical results at the research level. We introduce SITA, an end-to-end automated pipeline (see Figure 1 ), which leverages LLMs to formalize structure-to-instance reasoning end-to-end. Given a formalized abstract structure and an informal instance description, the pipeline generates instance-specific formal definitions, verifies structural conditions, and applies the abstract result to produce a complete formal proof. This pipeline enables the reliable reuse of high-level mathematical theories in domain-specific applications, supporting the construction of modular and verifiable formal reasoning workflows. Our framework is applicable to domains such as optimization, signal processing, and algebraic computation, and contributes toward the development of scalable, theorem-grounded formal libraries. Our main contributions are as follows. 1) We define the structure-to-instance reasoning task by identifying relevant mathematical structures, their concrete instances, and the key sub-tasks involved to apply general results to specific problems. 2) We propose SITA, a framework that leverages LLMs to automatically generate formal definitions, lemmas, and theorems for instance-specific problems. An iterative refinement and error-feedback mechanism–guided by a growing knowledge base–enhances both the reasoning accuracy and the quality of generated formal code. 3) We construct a benchmark of optimization problems grounded in real-world applications to evaluate the proposed framework. Experimental results demonstrate that SITA successfully generates formal definitions, instantiates abstract theorems, and performs assumption verification. 2 The Structure-to-Instance Problem 2.1 Mathematical Structures and Their Instances We mainly focus on operations defined over abstract mathematical structures. Following the approach ( 3 ) of bundling parameters and conditions into unified structures, a mathematical structure together with its associated operations is defined as follows. Definition 1 (Mathematical Structures with Operations) A mathematical structure is a four-tuple \mathcal{S}=\bigl\langle\mathcal{D},\;\mathcal{O},\;\mathcal{C},\;\mathcal{T}\bigr\rangle. • \mathcal{D} ( Definitions ): Primitive notions or axioms introducing the fundamental objects of the theory. • \mathcal{O} (Operations): Computational procedures, symbolic operations, or constructive rules built on \mathcal{D} , serving as the algorithmic or operational core of the structure. These may include algorithms, transformation rules, or abstract procedures defined over the definitions. • \mathcal{C} ( Conditions ): Assumptions imposed on elements in \mathcal{D} and \mathcal{O} to guarantee the correctness or performance. • \mathcal{T} ( Theorems ): Theorems and lemmas concerning the behavior of \mathcal{O} , derived from the definitions in \mathcal{D} under the assumptions in \mathcal{C} . Such abstract structures are ubiquitous in mathematics. We provide an illustrative example below, with additional cases in the Appendix B. Operations as optimization algorithms are mainly studied in this paper. Example 1 The gradient descent method for unconstrained optimization can be expressed as \mathcal{S}_{\mathrm{GD}}=\bigl\langle\mathcal{D},\,\mathcal{O},\,\mathcal{C},\,\mathcal{T}\bigr\rangle. • \mathcal{D} : The unconstrained optimization problem is defined as \min_{x}f(x) , where f:\mathbb{R}^{n}\to\mathbb{R} . • \mathcal{O} : The update scheme of the gradient descent method to solve the problem is x_{k+1}=x_{k}-\eta_{k}\nabla f(x_{k}). • \mathcal{C} :

Read the complete text