cs.ARNov 27, 2026

QiMeng-TheoremV: Agentic Theorem Proving with Speculated IRs for Large-Scale RTL Formal Verification

Authors: Chenrui Cao, Chongxiao Li, Yutong Wu, Hongqin Lyu, Di Huang, Chuanhao Wang, Lei Zhang, Chao Wang, 

Organizations: University of Science and Technology of China, Hefei, China · State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences, Beijing, China · University of Chinese Academy of Sciences, Beijing, China · Cambricon Technologies, Beijing, China · 

Abstract

As LLMs speed up automated Register-Transfer Level (RTL) code generation, verifying that generated designs meet their specs has become a key bottleneck. We present TheoremV, an agentic framework that uses Lean 4 theorem proving to automatically build complete proofs of end-to-end functional equivalence between large-scale RTL designs and high-level reference models. TheoremV bridges two gaps: the abstraction gap between cycle-accurate RTL and high-level reference models, and the representation gap between RTL and proof languages. For the abstraction gap, TheoremV introduces Speculated IRs: an LLM agent proposes candidate intermediate models, quickly filters out bad ones via differential simulation, and revises them using proof feedback, breaking an end-to-end proof across abstraction levels into a chain of equivalence lemmas. For the representation gap, a Yosys-based RTL-to-Lean compiler keeps industrial frontend coverage while preserving word-level signals and module hierarchy, and port-level dependency analysis removes false combinational loops at module interfaces. On tasks where commercial high-level equivalence checkers time out and existing automated provers fail, TheoremV proves the functional equivalence of silicon-proven floating-point and matrix units (XiangShan Fudian and NVDLA CMAC) against high-level reference models, as well as the PicoRV32 core against the official RISC-V Sail spec, finding a real RISC-V spec bug (in the FENCE instruction) in PicoRV32.

Figures & tables

Explore similar work

CardsList
  1. CorrectRTL: Boost RTL Generation Quality Through Automated Self-Correction with Instruction Decomposition

    Oct 18, 2026Jing Wang, Shang Liu, Hangan Zhou +4RTL Code GenerationLLM Self-Correction