The invention discloses a mathematical automatic formalization method based on a large
language model, which comprises the following steps of: initializing a
system, setting an iteration counter t to be 1, and setting a
historical record H as an empty set; an automatic formalization generation module of a large
language model is adopted to generate a formalization statement St = pi (Q, Ht-1), and Q represents a
natural language mathematical problem; carrying out self-
verification Ct = pi (Q, Ht-1, St) by adopting a semantic self-
verification module of a large
language model; adding the current statement-evaluation pair (St, Ct) into a
historical record to form Ht = Ht-1 U {(St, Ct)}; judging a termination condition: if the Ct represents that the
semantics are consistent, outputting a formal statement Ans = St with consistent
semantics, and terminating; otherwise, t is equal to t + 1, iteration is continued, and the steps S2-S4 are repeated. The reflection-self-correction mechanism endows the model with an iterative improvement capability, and semantic errors can be actively recognized and corrected. Experimental data show that on the basis of four standard benchmark tests, the
semantic consistency is averagely improved by 17.2%, and the
semantic consistency is improved by 30% on the basis of the most challenging AIME2025
data set.