MEGA Hub

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

Authors

Do you know Fred Mesnard?You can claim authorship or link another user.Do you know Étienne Payet?You can claim authorship or link another user.Do you know Wim Vanhoof?You can claim authorship or link another user.

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.

Community

00

Publication notes

Author note
In Proceedings ICLP 2026, arXiv:2607.17707
Journal
EPTCS 450, 2026, pp. 67-80
DOI
10.4204/EPTCS.450.5