[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-85303-en":3,"doc-seo-85303-105":30,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":21,"is_downloadable":21,"audit_status":21,"page_count":22,"language":23,"language_code":24,"site_id":25,"html_lang":24,"table_of_contents":26,"faqs":27,"seo_title":13,"seo_description":14,"update_tm":28,"read_time":29},85303,687197207919,"Theodora","https://ap-avatar.wpscdn.com/avatar/a000253d6f5f7c60be?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779446848396160552",8,"Research & Report","TREETHINK: A Modular Tree Search Library for Mathematical Reasoning with LLMs","Tree search algorithms enable systematic exploration of the proof space in neural theorem proving. Existing LLM tree search libraries mainly target natural-language reasoning and lack native integration with formal verifiers, while theorem proving systems often use task-specific search code. TREETHINK is an open-source modular Python library providing fully asynchronous tree search with vLLM inference, diverse node evaluators, and direct REPL integration for Lean 4, Rocq, Isabelle/HOL, and natural language verification.","TREETHINK: A Modular Tree Search Library for  \nMathematical Reasoning with LLMs  \nBurak S. Akbudak 1 , Zeynel A. Ulusan2 , Can S. Erer 1 , Gözde Gül ¸Sahin3 , 4 , 5  \n1 Computer Engineering Department, Bogazici University, Istanbul, Turkey  \n2 Codeway Studios  \n3 Friedrich-Alexander-Universität Erlangen-Nürnberg, Intelligent Language Systems  \n4 Computer Engineering Department, Koç University, Istanbul, Turkey  \n5 KUIS AI Lab, Istanbul, Turkey  \n[https://gglab-ku.github.io/](https://gglab-ku.github.io/)  \narXiv :2607 . 1 1258v 1 [ cs .CL] 13 Jul 2026  \nAbstract  \nTree search algorithms enable systematic exploration of the proof space in neural theorem proving. Existing LLM tree search libraries primarily target natural language reasoning and do not provide native integration with formal verifiers, while theorem proving systems often rely on task-specific search implementations. We introduce TREETHINK, an open-source Python library for modular, fully asynchronous tree search in neural theorem proving. It integrates established tree search methods with vLLM-based inference pipelinesand diverse node evaluation techniques, ranging from lightweight heuristics to neural evaluators. We support Lean 4, Rocq, and Isabelle/HOL alongside natural language. It connects directly to each language’s Read-EvalPrint Loop (REPL) server for real-time verification and proof state extraction. We evaluate TREETHINK on miniF2F and MATH500, demonstrating cross-language formal proof search, natural language reasoning support, and up to 6.3 × wall-clock speedup from asynchronous execution. Source code is released under the MIT license at [https://github.com/](https://github.com/)[ ](https://github.com/)GGLAB-KU/treethink, and the library is accessible as a downloadable package at [https:](https:)//[pypi.org/project/treethink/](pypi.org/project/treethink/) .  \n1 Introduction  \nMathematical reasoning remains a fundamental challenge for artificial intelligence, spanning both informal and formal paradigms (Wang et al., 2026) . While large language models (LLMs) have achieved impressive performance in informal mathematical reasoning, they remain susceptible to logical hallucinations and non-monotonic errors (Anhet al., 2025) . This has motivated an increasing interest in formal theorem proving, where interactive theorem provers (ITPs) such as Lean (de Moura and Ullrich, 2021), Rocq (The Coq Dev Team, 2024), and Isabelle (Nipkow et al., 2002) verify mathematical statements. Neural theorem proving (NTP)  \nFigure 1: NTP tree search process. 1. Select: search method selects a node using a search algorithm. 2. Expand: the policy LLM generates child nodes. 3. Evaluate: evaluator strategy scores the generated nodes. W stands for the value assigned to a node. 4. Verify: external systems verify the correctness of the proof. Main operations in individual sections are in red while batched processes are in blue.  \ncombines these approaches by using LLMs to propose proof steps while relying on the ITP as a strict verification environment. However, NTP remains a highly difficult problem as the action space of valid mathematical tactics is vast. To guide models into successful trajectories, recent works integrate structured search algorithms into the inference process (Li et al., 2024) . Fig. 1 illustrates a typical tree search loop: the search algorithm selects which partial proof to expand, an LLM proposes the next tactic, an evaluator scores nodes, and the proof assistant checks validity. Developing novel proof search systems often requires researchers to reimplement standard execution and verification components, resulting in substantial engineering overhead. For instance, to show the effectiveness of their proposed proof level reward evaluator, Wang et al., 2023a implement a tree search mechanism from the ground up, and Li et al., 2025 orchestrate a search system to evaluate the proposed process reward models. General LLM tree search libraries such as  \n\n|  | Search M","cbCaindLu2NFJODz","https://ap.wps.com/l/cbCaindLu2NFJODz","pdf",775714,3,1,11,"English","en",105,"# Abstract\n# Introduction\n## Background: neural theorem proving and tree search\n## Limitations of existing LLM tree search libraries\n## Contributions of TREETHINK","[{\"question\":\"What problem does TREETHINK address in neural theorem proving?\",\"answer\":\"TREETHINK targets the challenge of systematically exploring the proof space by combining LLM-proposed proof steps with strict verification using formal theorem provers, while avoiding duplicated, task-specific engineering.\"},{\"question\":\"How does TREETHINK integrate with formal verifiers?\",\"answer\":\"It provides unified REPL clients that connect directly to Lean 4, Rocq, and Isabelle/HOL servers for real-time verification and proof state extraction.\"},{\"question\":\"What performance improvements does TREETHINK demonstrate?\",\"answer\":\"Experiments on miniF2F and MATH500 show cross-language formal proof search, natural-language reasoning support, and up to 6.3× wall-clock speedup using fully asynchronous execution.\"}]",1784202350,28,{"code":4,"msg":31,"data":32},"ok",{"site_id":25,"language":24,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":28},"treethink-a-modular-tree-search-library-for-mathematical-reasoning-with-llms","",{"@graph":36,"@context":85},[37,53,68],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,50],{"item":41,"name":42,"@type":43,"position":21},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":20},"https://docshare.wps.com/document/research-report/",{"item":51,"name":13,"@type":43,"position":52},"https://docshare.wps.com/document/treethink-a-modular-tree-search-library-for-mathematical-reasoning-with-llms/85303/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":24,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-23","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does TREETHINK address in neural theorem proving?","Question",{"text":75,"@type":76},"TREETHINK targets the challenge of systematically exploring the proof space by combining LLM-proposed proof steps with strict verification using formal theorem provers, while avoiding duplicated, task-specific engineering.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does TREETHINK integrate with formal verifiers?",{"text":80,"@type":76},"It provides unified REPL clients that connect directly to Lean 4, Rocq, and Isabelle/HOL servers for real-time verification and proof state extraction.",{"name":82,"@type":73,"acceptedAnswer":83},"What performance improvements does TREETHINK demonstrate?",{"text":84,"@type":76},"Experiments on miniF2F and MATH500 show cross-language formal proof search, natural-language reasoning support, and up to 6.3× wall-clock speedup using fully asynchronous execution.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":25},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":21,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]