Pell’s Equation

Open access


In this article we formalize several basic theorems that correspond to Pell’s equation. We focus on two aspects: that the Pell’s equation x2Dy2 = 1 has infinitely many solutions in positive integers for a given D not being a perfect square, and that based on the least fundamental solution of the equation when we can simply calculate algebraically each remaining solution.

“Solutions to Pell’s Equation” are listed as item #39 from the “Formalizing 100 Theorems” list maintained by Freek Wiedijk at

[1] Grzegorz Bancerek, Czesław Byliński, Adam Grabowski, Artur Korniłowicz, Roman Matuszewski, Adam Naumowicz, Karol Pąk, and Josef Urban. Mizar: State-of-the-art and beyond. In Manfred Kerber, Jacques Carette, Cezary Kaliszyk, Florian Rabe, and Volker Sorge, editors, Intelligent Computer Mathematics, volume 9150 of Lecture Notes in Computer Science, pages 261–279. Springer International Publishing, 2015. ISBN 978-3-319-20614-1. doi:10.1007/978-3-319-20615-8_17.

[2] John Harrison. The HOL Light system REFERENCE. 2014.

[3] B. Krumbiegel and A. Amthor. Das Problema Bovinum des Archimedes. Historischliterarische Abteilung der Zeitschrift fur Mathematik und Physik, 25:121–136, 153–171, 1880.

[4] Joseph L. Lagrange. Solution d’un probleème d’arithmétique. Mélanges de philosophie et de math. de la Société Royale de Turin, (44–97), 1773.

[5] Hendrik W. Lenstra. Solving the Pell equation. Algorithmic Number Theory, 44:1–24, 2008.

[6] Yuri Matiyasevich. Martin Davis and Hilbert’s Tenth Problem. Martin Davis on Computability, Computational Logic and Mathematical Foundations, pages 35–54, 2017.

[7] Norman D. Megill. Metamath: A Computer Language for Pure Mathematics. 2007.

[8] Konrad Raczkowski and Andrzej Nędzusiak. Real exponents and logarithms. Formalized Mathematics, 2(2):213–216, 1991.

[9] Wacław Sierpiński. Elementary Theory of Numbers. PWN, Warsaw, 1964.

[10] André Weil. Number Theory. An Approach through History from Hammurapi to Legendre. Birkhäuser, Boston, Mass., 1983.

Formalized Mathematics

(a computer assisted approach)

Journal Information

SCImago Journal Rank (SJR) 2017: 0.119
Source Normalized Impact per Paper (SNIP) 2017: 0.237

Target Group

researchers in the fields of formal methods and computer-checked mathematics

Cited By


All Time Past Year Past 30 Days
Abstract Views 0 0 0
Full Text Views 189 189 26
PDF Downloads 95 95 15