LongCat-Flash-Prover: Advancing Native Formal Reasoning via Agentic Tool-Integrated Reinforcement Learning
Organizations: Meituan LongCat Team
Abstract
We introduce LongCat-Flash-Prover, a flagship 560-billion-parameter open-source Mixture-of- Experts (MoE) model that advances Native Formal Reasoning in Lean4 through agentic tool-integrated reasoning (TIR). We decompose the native formal reasoning task into three independent formal capabilities, i.e., auto-formalization, sketching, and proving. To facilitate these capabilities, we propose a Hybrid-Experts Iteration Framework to expand high-quality task trajectories, including generating a formal statement based on a given informal problem, producing a whole-proof directly from the statement, or a lemma-style sketch. During agentic RL, we present a Hierarchical Importance Sampling Policy Optimization (HisPO) algorithm, which aims to stabilize the MoE model training on such long-horizon tasks. It employs a gradient masking strategy that accounts for the policy staleness and the inherent train-inference engine discrepancies at both sequence and token levels. Additionally, we also incorporate theorem consistency and legality detection mechanisms to eliminate reward hacking issues. Extensive evaluations show that our LongCat-Flash-Prover sets a new state-of-the-art for open-weights models in both auto-formalization and theorem proving. Demonstrating remarkable sample efficiency, it achieves a 97.1% pass rate on MiniF2F-Test using only 72 inference budget per problem. On more challenging benchmarks, it solves 70.8% of ProverBench and 41.5% of PutnamBench with no more than 220 attempts per problem, significantly outperforming existing open-weights baselines.
Figures & tables
| Auto-Formalization | Combi- | FormalMath- | MathOlympiad- | MiniF2F- | ProofNet- | Prover- | Putnam- |
| Bench | Lite | Bench | Test | Test | Bench | Bench | |
| Open-Weights Reasoning Models | |||||||
| DeepSeek-V3.2 | 65.0 | 95.2 | 85.6 | 97.5 | 81.8 | 83.0 | 46.7 |
| Kimi-K2.5 | 84.0 | 97.9 | 91.1 | 98.4 | 88.2 | 91.7 | 82.8 |
| Close-Weights Reasoning Models | |||||||
| Theorem-Proving | MathOlympiad- | MiniF2F- | ProofNet | Prover- | Putnam- |
| Bench | Test | Test | Bench | Bench | |
| Open-Weights Reasoning Models | |||||
| DeepSeek-V3.2 | 14.7 | 77.9 | 20.4 | 42.8 | 5.8 |
| Kimi-K2.5 | 7.5 | 76.6 | 19.9 | 44.3 | 1.2 |
| Close-Weights Reasoning Models | |||||
| Theorem-Proving | MathOlympiad- | MiniF2F- | ProofNet- | Prover- | Putnam- |
| Bench | Test | Test | Bench | Bench | |
| Open-Weights Prover Models | |||||
| Kimina-Prover-72B | - | 87.7 † / 1,024 | - | - | - |
| w/ TTRL | - | 92.2 † / UNK | - | - | - |
| DeepSeek-Prover-V2-671B | - | 88.9 † / 8,192 | 37.1 † / 1,024 | 59.1 † / 512 | 7.1 † / 1,024 |
| Self-play Theorem Proving | - | 67.6 † / 2,560 | 26.9 † / 2,560 | - | 1.2 † / 3,200 |
| Informal Tasks | Prior | Ours |
| LongCat-Flash- | LongCat-Flash- | |
| Thinking-2601 | Prover | |
| AIME-25 | 99.6 | 97.7 |
| HMMT-25 | 93.4 | 90.8 |
| IMO-AnswerBench | 78.6 | 77.3 |
| AMO-Bench EN | 61.6 | 62.2 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Pattern & Description | Code Example |
|---|---|
| Original Problem Definition Example: putnam_2025_b3 . | ⬇ import Mathlib open Finset theorem putnam_2025_b3 : (( True ) : Prop ) S : Set , S . Nonempty ( n S , 0 < n ) ( n S , d : , 0 < d d | (2025 ^ n - 15 ^ n ) d S ) S = { n : | 0 < n } := by sorry |
| 1. Tampering with the Theorem Changing the proposition formalization into a trivial one with the same name, and proving the trivial proposition instead of the original one. | ⬇ import Mathlib open Finset -- Secretly change the theorem ‘ s proposition to a trivial tautology theorem putnam_2025_b3 : (( True ) : Prop ) True := by rfl |
| 2. Early Termination via #exit Using the #exit command to instruct the Lean compiler to stop processing the rest of the file, hiding the proof obligations. | ⬇ import Mathlib open Finset -- Terminate compilation early ; the compiler ignores everything below # exit -- The actual theorem signature is hidden in the ignored content theorem putnam_2025_b3 : (( True ) : Prop ) S : Set , S . Nonempty ( n S , 0 < n ) ( n S , d : , 0 < d d | (2025 ^ n - 15 ^ n ) d S ) S = { n : | 0 < n } := by sorry |
| 3. Introducing Unproven Assumptions Using axiom or opaque definitions to introduce unproven assumptions that are leveraged to prove the target theorem. | ⬇ import Mathlib open Finset -- Introduce an absurd axiom axiom cheat_axiom : False theorem putnam_2025_b3 : (( True ) : Prop ) S : Set , S . Nonempty ( n S , 0 < n ) ( n S , d : , 0 < d d | (2025 ^ n - 15 ^ n ) d S ) S = { n : | 0 < n } := by -- Use the absurd axiom to prove the target exact False . elim cheat_axiom |
| 4. Modifying or Adding Meta/Syntax Components Leveraging meta-programming components ( macro , elab , syntax , notation ) to bypass standard elaboration or suppress kernel errors. | ⬇ import Mathlib open Finset -- Secretly define a macro that expands ‘ trivial_proof ‘ to ‘ sorry ‘ macro ” trivial_proof ” : tactic => `( tactic | sorry ) theorem putnam_2025_b3 : (( True ) : Prop ) S : Set , S . Nonempty ( n S , 0 < n ) ( n S , d : , 0 < d d | (2025 ^ n - 15 ^ n ) d S ) S = { n : | 0 < n } := by trivial_proof |
| 5. Bypassing Safety Checks Using unsafe or partial modifiers to bypass Lean’s termination checker or type safety mechanisms. | ⬇ import Mathlib import Aesop mutual -- Use ‘ unsafe ‘ to bypass termination checks and allow circular reasoning unsafe def solve_set_condition ( S : Set ) ( h_ne : S . Nonempty ) ( h_pos : n S , 0 < n ) ( h_div : n S , d : , 0 < d d | (2025 ^ n - 15 ^ n ) d S ) : S = { n : | 0 < n } := by -- Recursively invoke the main theorem to ‘ prove ‘ the sub - goal have h_main := putnam_2025_b3 . mp ( by trivial ) exact h_main S h_ne h_pos h_div -- Formulate a mutual dependency that never terminates but satisfies the type checker unsafe def putnam_2025_b3 : (( True ) : Prop ) S : Set , S . Nonempty ( n S , 0 < n ) ( n S , d : , 0 < d d | (2025 ^ n - 15 ^ n ) d S ) S = { n : | 0 < n } := by apply Iff . intro intro _ S h_ne h_pos h_div -- Delegate the proof to the mutually defined unsafe function exact solve_set_condition S h_ne h_pos h_div intro _ trivial end |