cs.LOJul 23, 2026

Case study: proving sqrt(2) irrational with LPTP and an LLM

Authors: Fred MesnardÉtienne PayetWim Vanhoof

Organizations: LIM, université de La Réunion, France · Université de Namur, Belgium

Abstract

We present the interactions with an LLM (Large Language Model) aiming at proving that the square root of 2 is not a rational number in an LP (Logic Programming) context. We start from a few basic pure logic programming predicate definitions. We rely on the LPTP (Logic Program Theorem Prover) system for stating and proving properties about logic programs. As the proof language of LPTP is based on natural deduction, the proofs are human readable. In our case study, we sketch in LPTP the usual proof showing the irrationality of the square root of 2. Then we describe the interactions we had with the LLM. We end up with a complete formal proof, partially generated by an LLM and fully proof-checked by LPTP.

Explore similar work

CardsList
  1. Case study: solving P-99 with LPTP and an LLM

    Jul 23, 2026Fred Mesnard, Thierry Marianne, Étienne Payet +1TheoremInductive Logic Programming

  2. Evaluation of LLMs for Mathematical Formalization in Lean

    Jun 4, 2026Tyson Klingner, Drew Bladek, Escher Crawford +6TheoremFormalization