1 Introduction

The Infinite Descent is a mathematical method used in the theory of numbers. It is based on the third excluded principle and relies on the fact that the natural numbers are a well-ordered set. For example, given a certain known equation, typically a Diophantine one, while looking for its solutions, finally one can arrive to claim that it has no solution supposing that it has solutions and showing that under this hypothesis, an infinite descent in integers might be constructed. This is absurd. Hence, the equation has no solution. Nowadays, this mathematical argument is used in the Number Theory and in other branches of mathematics as abstract algebra. Pierre de FermatFootnote 1 (1601/7–1665) produced important results on this subject.

Along his childhood, Fermat followed the tradition of his family as dealer and then he was lawyer in Toulouse (Kline 1999, I, pp. 320–321). He wrote remarkable argumentations and results including several aspects of mathematics, as probability calculus, geometry and their applications to physics (cfr. Pisano and Capecchi 2013, 2015; Pisano and Bussotti 2013, 2016, 2017). Though he gave such important contributions to mathematics and science, he published few of his results. For, they are known thanks to several letters addressed to numerous scientific correspondents/friends. Such letters concern a vast panorama: number theory, infinitesimal calculus, geometry of coordinates, probability, optic (see e.g., the principle of least time or simply called Fermat’s principle). Among his many original contributions, probably the most outstanding ones regard number theory. Particularly his method of Infinite Descent is the specific object of this paper.

The method was invented by Fermat and written as descente infinie ou indéfinie (Fermat 1891–1922, II Correspondence, August 1659, p. 431; see also p. 213) in a letter entitled Relation des nouvelles découvertes en la science des nombre (Ivi, pp. 431–436) and addressed to Huygens (1629–1695) by the intermediation of Pierre de Carcavi (1600?1603?–1684) (Fig. 1a). It is also well known that the Diophantine equations were crucial references for Fermat. He read Arithmetica—written by Diophantus of Alexandria (fl. AD 201–215; fl. AD 285–299) in the third century AD—as translated into Latin (1621) by Claude-Gaspard Bachet de Méziriac (1581–1638) (Fig. 1b).

Fig. 1
figure 1

a The Infinite Descent (Fermat 1891–1922, II Correspondence to Carcavi, August 1659, pp. 431 [431–436]). Source: With kind permission of GallicaNational French Library (BnF). b Diophantus’ Arithmetica. (Bachet de Méziriac 1621). Source: Commons licensed | Public domain

Fermat, in his Observations sur Diophante, did not offer explicit roots to any Diophantine equation. Nevertheless, in the margin of this edition, Fermat wrote several annotations (posthumously published, 1670); among them, one also referred to what nowadays is called Fermat’s Last Theorem.

For our aim, we are interested in the theorem on the primes of the form 4n + 1 (Fig. 2)Footnote 2,Footnote 3. The proposition we are facing is the following:

Fig. 2
figure 2

Fermat's Theorem on Sums of Two Squares (Fermat 1891–1922, II Correspondence to Carcavi, August 1659, pp. 432). Source: With kind permission of GallicaNational French Library (BnF)

Fermat often mentioned this theorem:

  • Observations sur Diophante, (Fermat 1891–1922, I, 7, pp. 293–297).

  • Letter to Mersenne on 25 December 1640 (Ivi, II, p. 213).

  • Letter to Frenicle on 15 June 1641 (Ivi, II, p. 221).

Where for an odd prime a of the for 4n + 1 this statement can be written as:

a = b2 + c2 (where b and c are integers ↔ a ≡ − 1 (mod. 4) (for example see Pythagorean case study).


For example, we have:

$$13 \, = \, 2^{2} + \, 3^{2} .$$

Nevertheless, other prime numbers like 3, 7, 11, 19, 23 and 31 cannot be calculated (decomposed) as sum of two squares.Footnote 4 As Albert Girard (1595–1632) remarked: no number of the form 4n + 3 is the sum of two squares, which is, anyway, a trivial truth. He also realized that, to use modern terms, necessary condition for an odd number to be the sum of two squares is that it is congruous − 1 modulus 4. Dickson suggested that Girard dealt with both positive integral and prime numbers proving their determination by a sum of two squares of positive integers (Dickson [1919] 1920 [1923], II, p. 227–228). On our side we wonder: how is it possible to determinate a number (4n + 1) in order to prove that any prime of the form 4n + 1 is the sum of two squares? In other words, it is necessary to determinate the kind of number (a propriety) and its related equation (a form). Fermat faced this theorem by the Infinite Descent method. He left only an outline of his proof. Thus, a final question arises: how might the infinite descent method be applied to Fermat’s problem?

For example, let us consider the following decompositions of 17 and 29:

$$17 = 4^{2} + 1^{2} \;{\text{and}}\;29 = 5^{2} + 2^{2}$$

Fermat conceived an idea like this: By means of Infinite Descent method let us suppose that a prime p of the form 4n + 1 which does not have this propriety exists, that is, it is not the sum of two squares. If, given this hypothesis, it would be possible to show that, starting from p, a decreasing series of numbers (a descent, in fact) should exist until reaching numbers as 29 or 17, which, according to the descent should not be the sum of two squares, but, indeed, are, this would imply a contradiction. Such contradiction depends on the fact that p had been supposed not to be the sum of two squares.Footnote 5 Hence, p is the sum of two squares. Fermat applied the outlined reasoning not to 17 or 29, but to 5. For, when n = 1, we obtain the number 5, which can be written as:

$$5 = 2^{2} + 1^{2}$$

However, the prime number 5 should not have this propriety. But, effetely, the prime number 5 is uniquely determinable as the sum of two squares: 22 + 12. Thus, the assertion is valid for any prime of form 4n + 1 (see Fermat’s correspondence to Huygens/Carcavi). Even if it could be considered similar, it is necessary to precise that Fermat’s Infinite Descent is different from mathematical induction method for the following mathematical reasons.Footnote 6 In the Infinite Descent:

  • Just after having claimed the ad absurdum hypothesis for a certain value of n, then it is possible to find another smaller number, having the same propriety; and this number must not be necessarily the immediately next number along the series of the natural number (descending).

  • The method is able to falsify some assumptions. This is the main use of it.

Leonhard Euler (1707–1783), basing on Fermat’s Infinite Descent, proposed—maybe—the first published and complete proof of the 4n + 1 primes theorem. It is in letters (1747, April 6th and 1749, April 12th) to Christian Goldbach (1690–1764) and then it was published in two articles (Euler 1752–1753, pp. 3–40, 1754–1755, pp. 3–13).

Fermat’s studies on number theory were the theoretical base for many scholars (Euler, Lagrange, Gauss, Dedekind, Minkowski, etc.).

2 The Aim of this Paper

Since this paper aims at explaining the logic of the infinite or indefinite descent, an application of this method concerning the 4n + 1-primes theorem and dating back to the beginning of the twenty first century will be proposed because it is particularly significant in order to:

  1. (1)

    Show the general features of the method;

  2. (2)

    Specify the mathematical and logical differences among the possible uses of the descent.

The proof on which we will focus has been explained by Sergio Paolini (1938–2009).Footnote 7 By his reasoning, it is possible to analyse and re–interpret the steps that characterize an application based on Fermat’s method. The core of this paper has the following structure:

  1. (1)

    Initial section in which the general logic of the descent is expounded;

  2. (2)

    A historical outline of the theorems enunciated by Fermat and proved by infinite descent after Fermat;

  3. (3)

    A detailed summary of the way in which Paolini proved the 4n + 1 primes theorem;

  4. (4)

    A deeper explanation of the logic connoting the infinite descent as a consequence of the analysis carried out in the previous sections.

The foundational reasons behind this article are historical–mathematical and logical (Pisano and Gaudiello 2009).

From a historical point of view, Paolini’s proof of the 4n + 1 primes theorem follows step by step the scarce indications left by Fermat. This is a novelty.

From a mathematical point of view this proof exploits methods, which were available to Fermat.

From a logical standpoint, it allows to spread a light on a rather obscure subject: the different applications of the method invented by Fermat.

3 The Logical Structure of the Infinite Descent

The infinite descent is a method of reductio ad absurdum. For example, let us suppose that a theorem T has to be proved. Let us assume (ad absurdum) that \(\neg T\) is true. If it is possible to demonstrate that \(\neg T\) implies the existence of an infinity of integers between n and 1 (or 0), this is absurd. Therefore \(\neg T\) is false and T is true. The smallest limit of the descent is not necessarily 0 or 1. It can be an integer \(m < n\). In this case \(\neg T\) would imply the existence of an infinite quantity of numbers betweenFootnote 8m and n.

A quite easy example of a theorem that can be proved by descent was proposed by Euclid in his Elements (VII, 31) where he proved that every composite number p is divided by a prime number. The proof runs as follows:

Let be \(p = p_{1} p_{2}\). Both \(p_{1}\) and \(p_{2}\) are composite numbers, otherwise the theorem is true. Both \(p_{1}\) and \(p_{2}\) divide p and are greater than 1 because p is composite. Hence they are smaller than p. Euclid considered then \(p_{1} = p_{3} p_{4}\), once again \(p_{3}\) and \(p_{4}\) are composite numbers and they are smaller than \(p_{1}\) and greater than 1. But if we want to deny the truth of the theorem, we would admit an infinite descent \(p < p_{1} < p_{3} < \cdots < 1\) in integers. This is absurd, hence the theorem is true.

This proof by Euclid is interesting because it represents the first case of a complete proof by descent in mathematical literature. On the other hand, the application is so elementary that it is sufficient to create an easy descent based on a reduction from p to \(p_{1}\) and from \(p_{1}\) to \(p_{3}\) in order to obtain the proof, whereas the application of the descent to more difficult theorems is often complicated and the reduction from a value to a smaller value for which the theorem is supposed false can be problematic. However, Euclid’s proof is a useful introduction to the subject.

4 On the Theorems Proved by Infinite Descent

In the letterFootnote 9 above mentioned sent to Christian Huygens through Pierre de Carcavi and entitled Relation des nouvelles découvertes en la science des nombres (Fermat 1891–1922, II, pp. 431–436) Fermat pointed out that the classical methods used in arithmetic were not sufficient to deal with the most difficult theorems. He had been able to invent a new method, which allowed him to solve a series of complicate problems. This method is exactly the infinite descent. We read:

1. And since the ordinary methods explained in the Books, are not sufficient to prove so difficult propositions, finally I have found a particular way to reach the demonstration. I will call this method of proof infinite descent or indefinite [descente infinie ou indéfinie]; at the beginning, I used it in order to prove negative propositions as for example […] there is no right triangle in numbers [that is a Pythagorean triangle] of which the area is equal to the square of an integer number […].

The proof is based on the \(\alpha \pi \alpha \gamma \omega \gamma \eta \nu \, \varepsilon \iota \varsigma \, \alpha \delta \upsilon \nu \alpha \tau o\nu\) [reductio ad absurdum] […]Footnote 10

By these words, Fermat declared himself to be the inventor of the infinite descent (Ibidem). Certainly, he knew Euclid’s work, but the Euclidean proof by descent is not quite indicative insofar as it is applied to a very elementary proposition. Furthermore, it is not part of a context in which the descent has a primary role: it is an application. On the contrary, Fermat claimed that a great part of his most significant theorems could be proved by descent. But which are the “difficult propositions” (Ibidem) of which Fermat was speaking? In the aforementioned letter to Huygens we find the answer. Fermat explained four different kinds of applications of his method:

  1. (a)

    To ordinaryFootnote 11 negative propositions. He quoted two theorems in this category:

    1. (1)

      The mentioned theorem concerning the fact that the area of a Pythagorean triangle is never the square of an integerFootnote 12;

    2. (2)

      No number of the form \(3n - 1\) is of the form \(x^{2} + 3y^{2}\).

    The case of this last theorem is interesting from a historical point of view because its demonstration is really easy. It is enough to write the numbers mod.3 and to see that the square of a number which is not a multiple of 3 is of the form 3n + 1. In this sense, no descent is necessary. Fermat was one of the first mathematicians who fully understood the importance to write the numbers in function of a modulus k and a remainder h, that is, in the formFootnote 13kn + h. However, the science of numbers was at the beginning of its development, so we cannot exclude that the inventor of the modern way to conceive a number had not completely explored the potentiality of this way of writing. Therefore, we should not be surprised that Fermat claimed to have used the descent for theorems, which are difficult nowadays, too, and for theorems, which are very easy in a modern perspective. Exactly the perspectives were different.

  2. (b)

    To affirmative propositions. Here the use of the descent is quite more difficult and—following Fermat’s words—new principles are necessary. Fermat included in this category his theorems concerning the binary quadratic forms. That is:

    1. (1)

      Every prime numbers of the form 4n + 1 is the sum of two squares, namely it is of the form \(x^{2} + y^{2}\).

      In this letter, Fermat claimed: “3. There are infinite questions of this kind […]”.Footnote 14 It is almost sure he was referring to the problems concerning the binary quadratic forms of the prime numbers. In particular, in a letter to Blaise Pascal (1623–1662) on 25 September 1654, Fermat argued thatFootnote 15 (Fermat 1891–1922, II, p. 313):

    2. (2)

      Every prime of the form 8n + 1 and every prime of the form 8n + 3 are the sum of a square and of the double of another square. This means that these two classes of primes are of the form \(x^{2} + 2y^{2}\);

    3. (3)

      Every prime number of the form 6n + 1 is the sum of a square and of the triple of another square. It can hence be written as \(x^{2} + 3y^{2}\).

    He wrote cryptal words with regard to the 4n + 1 primes theorem. We will mention them at the beginning of the next section and show that they can be understood in the light of Paolini’s proof which we will explain in Sect. 5.

  3. (c)

    To particularly difficult affirmative propositions. Here Fermat mentioned two problems:

    1. (1)

      Every integer is the sum of four integer squares;

    2. (2)

      the equation \(Ny^{2} = x^{2} - 1\) (N is not a square) has always an infinite number of integer solutions.Footnote 16

    This is the famous so wrongly called Pell (1611–1685) equation.Footnote 17 The correct name would be Fermat equation.

  4. (d)

    To particularly difficult negative propositions. Fermat mentioned the following ones:

    1. (1)

      The cubic case of Fermat’s last theorem, that is \(x^{3} + y^{3} \ne z^{3}\), with x, y, z positive integersFootnote 18;

    2. (2)

      The equation \(x^{2} + 2 = y^{3}\) has only the integral solution (5,3);

    3. (3)

      The equation \(x^{2} + 4 = y^{3}\) has only the integral solutions (2, 2); (11, 5);

    4. (4)

      Every number of the form \(2^{{2^{n} }} + 1\) is prime.

The last proposition (4) is false as Euler proved (Euler 1732–1738).

Therefore, Fermat—in the above mentioned letter (Fermat 1891–1922, II, pp. 431–436)—claimed that there are four different ways to apply the infinite descent. Unfortunately, he left only one complete demonstration: that concerning the Pythagorean triangle and the indications relative to the theorem on the primes of the form 4n + 1 that we will refer to.

After Fermat, as above cited, Euler tried to reconstruct Fermat’s results (Euler 1732–1738)Footnote 19 and methods and supplied many demonstrations by descent, also considering some Diophantine problems not mentioned by Fermat. However, Euler’s most important applications of the method regard the propositions by Fermat. Particularly Euler proved:

  1. (1)

    Three theorems concerning the divisors of the binary quadratic forms and precisely: the form \(x^{2} + Ay^{2}\), with x and y mutually prime and A = 1, 2 or 3, can be divided only by numbers of its same formFootnote 20;

  2. (2)

    Fermat’s last theorem for the exponentFootnote 21 3 (Euler 1770, Ch. 15, § 243).

  3. (3)

    Every integer that divides the sum of four mutually prime squares is the sum of four squaresFootnote 22 (Euler 1773). By means of this theorem, he was also able to prove that every integer is the sum of four squares. Nevertheless, in this case, Lagrange (1736–1813) had preceded Euler (Lagrange 1770).

The theorems in (1) were used by Euler as lemmas in order to prove Fermat’s theorems on binary quadratic forms.

The theorem in (3) is a lemma to prove that every integer is the sum of four integer squares.

Euler proposed two different versions of the theorems in (1) and in (3) (see note 20 and Sect. 5 of this paper). The first version is not expounded in a complete manner, but it can be made complete (Bussotti 2006, pp. 222–226). From a historical standpoint, it is maybe more interesting than the second one, because the procedure used by Euler is—in the first version—closer to Fermat’s assertions. However, Fermat claimed to have used the descent in the proof of 4n + 1 primes itself and not in a lemma, although—in Euler’s procedure—the theorem on the divisors of the binary quadratic forms is a fundamental step to prove the decompositions of such forms in sum of squares. This is one of the reasons why it is difficult to ascribe Euler’s proof to Fermat. After Euler, Lagrange played a fundamental role in the history of number theory. His contributions are less numerous than Euler’s, but they are very important. As Euler, Lagrange was interested in reconstructing and using Fermat’s method. We find different applications in:

  1. (1)

    Sur la solution des problèmes indéterminés du second degré (Lagrange 1769), where he solved all undetermined equations of second degree with two unknowns;

  2. (2)

    Some argumentations in the context of the proof that every integer is the sum of four squares (1770).

  3. (3)

    Sur quelques problèmes de l’analyse de Diophante (Lagrange 1777), where the solution of some Diophantine equations is expounded.

  4. (4)

    Given a binary quadratic form, a reduced binary quadratic form with the same determinant exists (both cases of positive and negative determinants). These two are the only proofsFootnote 23 (Bussotti 2006, pp. 293–417) by descent given in the Recherches d’Arithmétique (1773 and 1775).

Therefore, Euler and Lagrange had an interest in rediscovering and applying Fermat’s method and in the reconstruction of Fermat’s number theory. After Lagrange there were many applications of this procedure in number theory and in algebra,Footnote 24 but a complete methodological research on this subject was still missing.Footnote 25

Given this reference frame, the demonstrations by Paolini are interesting for the following reasons:

  1. (1)

    For the first time Fermat’s theorems concerning the binary quadratic forms are proved by descent. We mean the method is not used to prove lemmas, but it is exploited in the theorems themselves;

  2. (2)

    This method can be extended to a wide class of numbers of the form \(x^{2} + Ay^{2}\), while Euler’s method is valid only when A = 1, 2, 3;

  3. (3)

    The single steps of the descent are well clarified;

  4. (4)

    It is possible to give a sense to some of Fermat’s assertions, which, without an explanation and interpretation, seem strange or even absurd;

  5. (5)

    The descent, or in any case infinitary methods similar to the descent, are the centre of an arithmetical world because as Paolini proved (Cfr. Bussotti 2006, Appendix, pp. 507–547; for the commentaries, pp. 109–171) by these methods it is possible to prove that every integer is the sum of three triangular numbers and of four squares in the context of enquiries concerning the polygonal numbers.

Furthermore he also supplied a proof of Fermat’s last theorem for the exponent 3 without using \(\sqrt { - 3}\). For all these reasons, it seems to us that such demonstrations have a mathematical, a methodological and a historical interest. Let us now explain and comment the main reasoning carried out in Paolini’s proof that every prime number of the form 4n + 1 is the sum of two squares. This proof is a prototype for the other theorems concerning the binary quadratic forms and proved by Paolini (Ibidem).

5 The Proof: Every Prime Numbers of the Form 4n + 1 is the Sum of Two Squares

This is the first proposition on the binary quadratic forms enunciated by Fermat. In a sense, this theorem opens the modern theory of numbers.

5.1 What Fermat Wrote

In the letter to Huygens, Fermat wrote as to the 4n + 1 primes theorem (Table 1):

Table 1 What Fermat wrote on the demonstration of the 4n + 1 primes theorem

A reconstruction of the proof, which could be ascribed to Fermat, should explain:

  1. (1)

    Which are the new principles connoting the application of the descent to affirmative propositions.

  2. (2)

    The way in which it is possible to pass from a prime number which is—ad absurdum—supposed not to be the sum of two squares, to a smaller number, which should not be the sum of two squares.

Furthermore, this proof should be based only upon mathematical means available to Fermat.

In this section, we will answer the latter question, while dealing with the former in the next section. A clarification with regard to Fermat’s words: when he claimed that the descent should be continued infinitely till reaching 5, these words make in themselves no sense because if a descent in integers reaches any number (in this case 5) it cannot be infinite. However, what Fermat claimed is clear, as the mechanism of the descent can be continued until reaching 5.

5.2 Paolini’s Proof that Every Prime of the Form 4n + 1 is the Sum of Two Squares

In order to understand how Paolini applies the descent, it is useful to present a brief picture of the preliminary definitions and assertions that are necessary to demonstrate the theorem. Almost all the elementary proofs of this proposition start from the fact that − 1 is a quadratic residue of the primes of the form 4n + 1. The proof we are analysing starts from this property, as well.

Since the value \(- 1\) is a quadratic residue of the prime numbers of the form p = 4n + 1 (that is, the congruence \(x^{2} \equiv - 1(\bmod .p)\) has solutions), the equation

$$kp = x^{2} + 1$$

has solutions for k < x<p, which is the form in which Paolini presents this property (Bussotti 2006, Appendix, Theorem 1, Sect. 3, pp. 484–485). The second passage consists in defining the notion of resolving fraction associated to an integer number m. We read (see also Table 2):

I associate the fraction \(\frac{m}{x}\) to an integer number m [m is not necessarily a prime number] such that \(km = x^{2} + 1\), with m > x. I develop this fraction in a continued fraction and I invert the convergents. Let \(g_{n}\) be the biggest of the \(g_{i}\) such that \(g_{i}^{2} < m\). It is possible that there is a convergent \(\frac{{f_{n} }}{{g_{n} }}\) such that \(m = g_{n}^{2} + (xg_{n} - mf_{n} )^{2}\). If such a convergent exists, then I define \(\frac{m}{x}\) as a resolving fraction of m, in the sense that m is the sum of two squares.Footnote 26

That is, a number is a sum of two squares if and only if its associated fraction is resolving.

Table 2 Explanation of the role of the resolving fractions to decompose a number in sum of two squares

Paolini’s idea consists in proving that, if m is a prime number of the form 4n + 1, then a resolving fraction associated to m exists. The resolving fractions have three properties, proved in the following Paolini’s Theorems 2, 3 and 4. To prove these properties, it is sufficient to know how to pass from a convergent of order n − 1 to a convergent of order n. In order to demonstrate the Theorem 3, an argument that is based on complete induction is used. Here we refer to these propositions without the proof. It is possible to check the proofs in Paolini’s mentioned work.Footnote 27

  1. (1)

    (Theorem 2): If \(km = x^{2} + 1\) (m > x) and if and only if m/x is a resolving fraction of m, then the fraction \(\frac{m - x}{m}\) [or better \(\frac{m}{m - x}\)] is resolving of m too. This fraction is defined as complementary fraction of m/x.

  2. (2)

    (Theorem 3): Given an integer number m such that \(km = x^{2} + 1\), k < x<m, let \(\frac{{x^{2} + 1}}{kx}\)be developed in continued fraction and let \(q_{0} ,q_{1} ,\ldots,q_{n - 1} ,q_{n}\)be its incomplete quotients, then the incomplete quotients of the continued fraction \(\frac{{(x + k)^{2} + 1}}{k(x + k)}\)are the same as \(\frac{{x^{2} + 1}}{kx}\), if we exclude the first one, which is \(q_{0} + 1\)and the last one.

  3. (3)

    (Theorem 4): Let m be an integer and k and x integers such that k < x<m. Let us suppose that the equation \(km = x^{2} + 1\)has solutions and that \(\frac{m}{x}\) = \(\frac{{x^{2} + 1}}{kx}\)is a resolving fraction of m. Then the number m’ = m+2x + k is such that \(km' = (x + k)^{2} + 1\)and the fraction \(\frac{{(x + k)^{2} + 1}}{k(x + k)}\)is resolving of m’.

In the following additional applications of previous theorems (Table 3):

Table 3 Example of an application of the Theorem 2 and of the Theorem 4

The Theorem 3 is used only to prove the Theorem 4.

The conceptual basis of Paolini’s argument consists in excluding the cases, in which the theorem is trivially proved. The general structure of the reasoning is like this.

Paolini considers a prime p of the form 4n + 1 and the two complementary fractions associated to p. He supposes ad absurdum that p is not the sum of two squares. This means that the two fractions associated to p, let us indicate them by A and \(A_{1}\), are not resolving. From A or \(A_{1}\), it is possible to deduce a fraction B which is associated to a number m less than p. The fraction B is not resolving of m otherwise, by means of the Theorem 4, the fraction associated to p from which B derives, should be resolving of p. Hence, p would be the sum of two squares. Because of Theorem 2, neither the fraction associated to m nor the complementary of B—let us indicate by \(B_{1}\)—are resolving of m. This process can be iterated finding a decreasing sequence of numbers \(m_{n} < m_{n - 1} < \cdots m < p\) the associated fractions to which are note resolving, otherwise those associated to p should be resolving. But the fraction associated to the “small”—the meaning of this word will be clarified in the proof—number \(m_{n}\) is in fact resolving. Then—by means of the Theorem 4—one concludes that the fractions associated to p are resolving, as well. Against the hypothesis that p is not the sum of two squares. This absurdum proves that p is the sum of two squares.

Let us see the proof in detail.

If p is a prime number of the form 4n + 1, the equation \(kp = x^{2} + 1\) has always solutions. If k = 1, the number p is the sum of the two squares \(x^{2}\) and 1.

If k = 2, in an argument by reductio ad absurdum, it is necessary to suppose that no one of the two complementary fractions associated to p are resolving of p, otherwise p would be the sum of two squares.

If k = 2, it is possible to subtract progressively the multiples of k (that is of 2) from x, at the condition that \(k < \frac{{x_{n} }}{2}\).Footnote 28 In this way, we obtain a series of numbers, which can be indicated by m, for which the identityFootnote 29

$$2m = (x - 2l)^{2} + 1\;{\text{is}}\;{\text{valid}}.$$

None of the fractions \(\frac{m}{x - 2l}\) is resolving, otherwise the fractions associated to p would be resolving and p would be the sum of two squares (Theorem 4). Neither their complementary fractions \(\frac{m}{m - (x - 2l)}\) are resolving (Theorem 2). By subtracting progressively 2 from x, one arrives at

$$k = 2,x_{n + 1} = 3,\;{\text{with}}\;k > \frac{{x_{n + 1} }}{2}.$$

The fraction \(\frac{{3^{2} + 1}}{2 \cdot 3} = \frac{5}{3}\) is associated to 5 (2·5 = 3 \(^{2}\) +1) and it is resolving of 5 because if we develop \(\frac{5}{3}\) in a continued fraction, its convergents are: 1, 2, \(\frac{5}{3}\). Inverting them one has \(\frac{1}{1},\frac{1}{2},\frac{3}{5}\). Applying the already explained method, one obtains \(5 = (3 \cdot 2 - 1 \cdot 5)^{2} + 2^{2}\), where 2 is the biggest \(g_{i}\) such that \(g_{i}^{2} < 5\). Then the Theorems 2 and 4 ensure that every step of the descent is in fact composed of numbers to which resolving fractions are associated. Therefore, the fractions associated to p are resolving, hence p is the sum of two squares. But our hypothesis was that p was not. This contradiction proves the theorem. One could claim: since the fractions associated to the small numbers are resolving and since it is possible to ascend backwards from the fractions associated to the small numbers to those associated to p, these fractions are resolving, but they should not be.

Contradiction, hence the theorem is true. This logical scheme in which, given a proposition A, it is (Cfr. Bellissima and Pagli 1996):

$$\begin{aligned} &(\neg A \to A) \to A \hfill \\\,\,\,\,\,\,\, {\text{is}}\;{\text{called}}\;&{{Consequentia}}\;{{mirabilis}}. \hfill \\ \end{aligned}$$

Paolini’s demonstration continues analysing the cases in which k > 2. We will see that it is possible to construct a descent that can be continued without limits from a theoretical point of view. But this descent has an end at 5 or before 5. The descent—or more appropriately the reduction—has its end with a number, to which a resolving fraction is associated, so that also p is the sum of two squares.

Let k be an even number bigger than 2. The reasoning starts, as always, from the equation

$$kp = x^{2} + 1$$
(1)

The first important consideration concerns the value of k. If \(k = \frac{x}{2}\), replacing this value in the equation, it follows that the possible solutions for p and x are respectively (4.1) and (5.2). But p is bigger than 5. Thus \(k \ne \frac{x}{2}\). In addition, Paolini proves that if \(k > \frac{x}{2}\), then in the identity

$$k'p = (p - x)^{2} + 1 = y^{2} + 1$$
(2)

(identity that is the complementary of \(kp = x^{2} + 1\)), one has \(k' < \frac{y}{2}\) (this part of the demonstration is not difficult). Using the same technique as in the case k = 2, one subtracts progressively k from x till \(k < x - nk\) and \(k > \frac{x - nk}{2}\). Posing \(x - nk = x_{n}\), it is \(k \ne \frac{{x_{n} }}{2}\) because k is even and \(x_{n}\) is odd. Thus, we have the following equation

$$km_{1} = x_{n}^{2} + 1$$
(3)

It is trivial to prove that \(x_{n} < m_{1} < 2x_{n}\).

Now, let us pose \(y_{n} = m_{1} - x_{n}\). It is \(m_{1} > 2y_{n}\) and from Eq. 3), one obtains the equation

$$k_{1} m_{1} = y_{n}^{2} + 1$$
(4)

Since \(k > \frac{{x_{n} }}{2}\), it is \(1 \le k_{1} \le \frac{{y_{n} }}{2}\).

Furthermore \(x_{n} > y_{n}\) and therefore \(k_{1} < k\). All these conditions ensure that the descent can be continued, that is, the two equations

$$kp = x^{2} + 1$$

and

$$k_{1} m_{1} = y_{n}^{2} + 1$$
(5)

have the same formal properties, but the components of the first equation are bigger than the corresponding components of the second one. It is necessary to precise that:

  1. (1)

    if in \(k_{1} m_{1} = y_{n}^{2} + 1\), \(k_{1} = 1\), then the fraction \(\frac{{y_{1}^{2} + 1}}{{y_{1} }}\) is resolving of \(m_{1}\) and hence \(m_{1}\) is the sum of two squares. By applying the Theorem 2, also the fraction \(\frac{{m_{1} }}{{x_{n} }} = \frac{{x_{n}^{2} + 1}}{{kx_{n} }}\) (the complementary fraction of \(\frac{{y_{1}^{2} + 1}}{{y_{1} }}\)) is resolving of \(m_{1}\), and applying the Theorem 4, one reaches the conclusion that the fraction \(\frac{p}{x} = \frac{{x^{2} + 1}}{kx}\) is resolving of p, so that p is the sum of two squares.

  2. (2)

    If \(k_{1} = \frac{{y_{n} }}{2}\), it is \(m_{1} = 5\). In this case \(y_{n} = 2\) is the only solution that is compatible with the fact that \(m_{1} , \, y_{n}\) and k are integer numbers. But in this case one has the equation \(1 \cdot 5 = 2^{2} + 1\). The fraction \(\frac{5}{2}\) is resolving of 5, and according to Theorem 2, the fraction \(\frac{5}{3}\) is resolving of 5, as well. Thus, by applying the Theorem 4, one returns to p which, for this reason, is the sum of two squares. So, really (2) is a particular case of (1).

When \(k_{1} < \frac{{y_{n} }}{2}\) the descent continues. But this descent cannot be infinite, so we reach either the case 1), or the case 2) or an y* = 3, for which one has \(2 \cdot 5 = 3^{2} + 1\). This fraction is resolving of 5, and the reasoning is the same as the one analysed if k = 2.

The cases for which in the equation \(kp = x^{2} + 1\) the number k is odd, can be dealt with a completely similar technique.

Finally, every prime number of the form 4n + 1 is the sum of two squares.

In the following we propose an example of descent in order to see how this procedure is applied in a specific case (Table 4).

Table 4 An application to a specific case of the explained procedure

5.3 Relations between Fermat’s Assertions and Paolini’s Proof

After Fermat, the elementary demonstrations concerning the form \(x^{2} + Ay^{2}\) (A = 1, 2, 3), in which the descent or a reduction is used and which are not inscribed inside a general theory of the binary quadratic forms as Lagrange’s or Gauss’ (1777–1855) are of two types (both derive from Euler’s ideas):

1. Given a number p which divides the sum of two coprime squares, then p is the sum of two squares. In the case of \(x^{2} + y^{2}\), starting from the identity \(n \cdot p = x^{2} + y^{2}\), the number n is progressively reduced until reaching 1 in identities of the form \(n_{i} \cdot p = x_{i}^{2} + y_{i}^{2}\). Since it is possible to reach \(n_{i} = 1\), then p is the sum of two squares. If p is a prime of the form 4n + 1, due to the congruence \(x^{2} \equiv - 1(\bmod .p)\), p divides the sum of two squares and hence it is the sum of two squares. Mutatis mutandis, the reasoning when A = 2,3 is the same (Euler 1773; Conrad s.d., p. 13).


This argumentation cannot be attributed to Fermat because there is no reduction ad absurdum, n is reduced until reaching 1, but no apagoge eis adynaton, to use Fermat’s words, exists. Furthermore, n is reduced, but not p, while, according to Fermat’s words, p has to be reduced.

2. In a phase of his career as a number theoretician which dates back about to the period 1750–1755, Euler had not yet fully developed his ideas and methods on the quadratic residues. In this phase a theorem was discovered, proved and used by him as a lemma to prove the 4n + 1 primes theorem: “a number which is the sum of two coprime squares can be divided only by numbers which are the sum of two coprime squares”. Here the reasoning is similar to what Fermat could have been thought: the “little” numbers which are the sum of two mutually prime squares are either primes or can be divided only by numbers which are the sum of two mutually prime squares. This is an inductive basis. Let us now suppose, ad absurdum, that \(a^{2} + b^{2}\), (a, b) = 1, is divided by a number p which is not the sum of two coprime squares. Euler was able to prove that a number \(c^{2} + d^{2}\), which is less than \(a^{2} + b^{2}\), exists (c, d) = 1, and is divided by a number which is not the sum of two squares. The process can be iterated until reaching the “small” numbers which are the sum of two coprime squares. But these numbers are divided only by numbers which are the sum of two squares, while, they should not be. This contradiction proves the theorem.Footnote 30


Here the resort to the reductio ad absurdum exists, but the reasoning is applied to an important lemma to prove the 4n + 1 primes theorem, not to the theorem itself. Therefore, even if Euler’s proof is likely close to Fermat’s way of thinking, it is difficult to ascribe it to Fermat. The proof given by Paolini gets all the elements Fermat spoke about:

  1. (a)

    It is conceived as a reductio ad absurdum

  2. (b)

    It is applied directly in the proof of the theorem, not in a lemma.

  3. (c)

    Given the identity \(k \cdot p = x^{2} + 1\), the reduction we have seen acts either reducing k, or reducing p, according to the specific conditions characterizing every step of the process. Therefore either a value \(k_{i} = 1\) is reached before \(m_{i} = 5\) or \(m_{j} = 5\) is reached, as Fermat claimed.

  4. (d)

    The continued fractions were well known and used in Fermat’s time and the properties of the continued fractions exploited in the shown proof are elementary and need no mathematical element extraneous to Fermat’s way of thinking (Bussotti 2006, pp. 68–77).

  5. (e)

    Fermat wrote of new principles of the infinite descent applied to affirmative propositions and, as we will see in the next section, new principles exist in Paolini’s proof: (1) there is an inductive basis for which the theorem is true, the small numbers; (2) after the descent there is an ascent which permits to prove that the fractions associated to p, are resolving. The reasoning is an example of consequantia mirabilis.

Given this picture, we think that this proof can be reasonably ascribed to Fermat. This is clearly an epistemological consequence based on the historical-logical reconstruction. However it is important—from a mathematical and methodological standpoint—that, in the historical-epistemological reconstruction of Fermat’s methods; a procedure which fits with almost all his assertions has been found. Therefore, two further remarks are necessary:


(a) Fermat wrote that all numbers of the descent are prime of the form 4n + 1. This seems difficult to admit because in this manner Fermat would have found a series consisting only of primes, a result which was, maybe, more important than the theorem in itself. It is enough to admit that every step of the descent contains numbers which should not be—ad absurdum—the sum of two squares, without the further request they are prime. A posteriori, since the proof shows that every number of the descent is in fact the sum of two squares, and has − 1 as a quadratic residue, such numbers have no factor of the form 4n + 3, but this truth is known only a posteriori.

(b) By means of the method of the resolving fractions it is possible to decompose in the form \(x^{2} + Ay^{2}\) a wider class of prime numbers than those belonging to the forms 4n + 1, 6n + 1, 8n + 1 and 8n + 3, the classes of which Fermat spoke and whose properties can be proved by Euler’s methods. For example, it is possible to prove that every prime of the form 20n + 1 is of the form \(x^{2} + 5y^{2}\)(Fermat did not deal with this form). A theoretical research concerning all the classes of primes to which this technique can be applied is still missing.

6 Intermezzo: A logical Variant of the Infinite Descent and the New Principles

In this section, after having provided a symbolization of the proposed proof, the variants of the descent will be analysed.

6.1 The logical structure of the proposed proof

First, let us specify the logical scheme of this demonstration. Let us denote:

By p the proposition “the two fractions associated to the prime number 4n + 1 are not resolving”.

By \(p_{1}\) the proposition “the two fractions associated to the first number of the descent are not resolving”.

By \(p_{n}\) the proposition “the two fractions associated to the n-th number of the descent are not resolving”.

By \(p_{n + 1}\) the proposition “the two fractions associated to 5 are not resolving”. The argument by descent proves that

$$((p \to p_{1} ) \wedge (p_{1} \to p_{2} ) \wedge \ldots \wedge (p_{n} \to p_{n + 1} ))$$

But

$$((p \to p_{1} ) \wedge (p_{1} \to p_{2} ) \wedge \ldots \wedge (p_{n} \to p_{n + 1} )) \to (p \to p_{n + 1} )$$

is a tautology. Therefore, we deduce \((p \to p_{n + 1} )\) by modus ponens. On the other hand, \(\neg p_{n + 1}\) is true, so that we have, applying modus tollens:

$$\begin{aligned} &p \to p_{n + 1} \hfill \\ &\neg p_{n + 1} \hfill \\ &\_\_\_\_\_\_\_\_\_\_\_\_\hfill \\ &\neg p \hfill \\ \end{aligned}$$

That is, every prime number of the form 4n + 1 has a resolving fraction and therefore it is the sum of two squares.

6.2 The Variants of the Infinite Descent

In every argument by descent, the presence of a form, that has the same formal properties with different order of size, is an essential element. Also in Paolini’s reasoning there is such a form and it is represented by the two identities \(kp = x^{2} + 1\) and \(k'p = y^{2} + 1\). The identities that we obtain in the descent have the same formal properties of these two, but they represent numbers which become progressively smaller. The same reasoning is valid for the fraction that are associated to the numbers \(p, \, m, \, m_{1} , \ldots , \, 5.\) All of them are constructed in the same way. The existence of numerical forms having the same formal properties, but representing, in the descent, progressively decreasing numbers, are typical of all the arguments in which this method is applied. However, the ways in which the reasoning is developed are so different case by case that Fermat was justified to speak of new principles.

Let us start from the application to what, following the distinction by Fermat, one could call the application to ordinary negative propositions. An appropriate and paradigmatic example is given by the only proposition of which Fermat left an almost complete proof: the area of a Pythagorean triangle is not the square of an integer. Given a Pythagorean triple (x,y,z), the area of the triangle whose sides are x, y, z is \(\frac{xy}{2}\). In the two triples (0,0,0) and (1,0,1), it is \(\frac{xy}{2}\) = 0 and 0 is the square of an integer. Clearly no triangle can have a side equal to 0, nevertheless it is important to take into account this property of the triples (0,0,0) and (1,0,1). At the beginning of the demonstration, it is necessary to suppose—ad absurdum—that a Pythagorean triple \((x,y,z)\), which is different from (0,0,0) and (1,0,1), exists, such that \(\frac{xy}{2}\) is equal to the square of an integer. But one proves that, given some properties of the Pythagorean triples and the particular conditions of the theorem, it is possible to construct a triple \((x_{1} ,y_{1} ,z_{1} )\) such that \(z_{1} < z\) but \(z_{1} > 1\) with the condition that \(\frac{{x_{1} y_{1} }}{2}\) is the square of an integer. This procedure can be iterated, obtaining a value \(z_{2} < z_{1}\) and \(z_{2} > 1\), being \(\frac{{x_{2} y_{2} }}{2}\) the square of an integer.

Under these conditions, an infinite descent in integers would be given because an infinite quantity of integers would exist between z and 1, this is absurd and hence the theorem is true. There are three fundamental steps in this demonstration:

  1. 1.

    To show that the hypotenuses of the hypothetical triangles have an invariant form.

  2. 2.

    To prove that the sequence of the hypotenuses is decreasing.

  3. 3.

    To prove that every hypotenuse is bigger than 1.

The latter is an important condition because if the descent reached the triple \(1^{2} + 0^{2} = 1^{2}\), this descent would not have been infinite, but finite and, by repeating this finite process backwards, a set of Pythagorean triangles would have been obtained whose area would be equal to the square of an integer. That is, the opposite of Fermat’s assertion. But since \(1 < \cdots z_{n} \cdots < z\) and the process can be iterated, an infinite descent is constructed. Therefore the existence of a lower limit, in this case the triples (0,0,0) and (1,0,1), which cannot be reached is fundamental for the application of the infinite descent to negative propositions. For what Fermat called the affirmative propositions, things work in another manner:

  1. 1.

    There is a set of values—which can be considered small—for which the theorem T to prove is true.

  2. 2.

    Supposing that T is not true for a certain value V, it is possible to construct an algorithm which proves T to be false for a value W less than V. This algorithm can be iterated, but not indefinitely, it is a finite algorithm which reaches the small values with the condition that for such values the theorem T should be false, whereas it is true. This contradiction, deriving from the supposition that T is false for a certain number, proves that T is, in fact, true for every number. In some cases, as the analysed one, an ascent follows the descent.

The logical scheme of the consequentia mirabilis is applied.


Here the final point of the descent is reached, which is the opposite of the application to negative propositions and the algorithm, though it can be indefinitely prosecuted from a formal point of view, is in fact finite. Therefore, the reductio ad absurdum is used; the algorithm is potentially infinite, but really finite.

At all appearances, these are the new principles of which Fermat spoke. Now Fermat’s words have a complete interpretation. We have called this application to affirmative propositions reduction-descent because the algorithm is a reduction rather than an infinite descent.

In what follows we will clarify the differences between the reduction-descent and the procedure we call ordinary reduction. It is worth underlining that affirmative propositions exist which are proved by applications of the descent, based on the same principles as those characterizing the application to negative propositions. Lagrange and Gauss offer examples of these demonstrations (Lagrange 1773–1775, pp. 723–737; Gauss 1801, p. 146).

With regard to the ordinary reduction, let us consider the way in which John Wallis (1616–1703) and William Brouncker (1620–1684) solved Pell equation. For, it is based on a reduction. That is, given Pell equation \(x^{2} = Ny^{2} + 1\), the two English mathematicians constructed a series of equations having a solution if and only if \(x^{2} = Ny^{2} + 1\) has solutions.

Furthermore the possible solutions of the n-th equation are smaller than the ones of the (n − 1)-th. But from this reduction it is not absolutely possible to conclude that there is an infinite descent and that therefore Pell equation has no solutions. On the contrary, Wallis and Brouncker reached the solution (1,1) and therefore Pell’s equations has always solution. In this case, a definite descent has been obtained. We call this method ordinary reduction. From a methodological point of view, the second version of Euler proofs that if a number divides the form \(x^{2} + Ay^{2}\), with A = 1, 2 or 3, (x,y) = 1, then it has the same form as the dividend, and that if a number divides the sum of four squares, then it is the sum of four squares are based on ordinary reductions. Here there is neither a reductio ad absurdum nor an infinite descent. It is difficult to say if, when Fermat thought of the particularly difficult affirmative propositions, he was referring to this method. The lack of a reductio ad absurdum can induce to think he was not. Hence three different applications of procedures based on a reduction can be identified:

  1. 1.

    Infinite descent in a proper sense, supposing T to be false, the existence of an infinity of integers between two integers m and n follows.

  2. 2.

    Reduction descent, when the theorem is true for an initial segment of integers and denying that it is valid for any integer, we are able to construct a procedure which obliges to admit it is false for the initial segment. This contradiction proves the theorem.

  3. 3.

    Ordinary reduction, when one is able to prove that a theorem is true for any value if and only if it is true for small values, but for small values it is true, hence it is true for any value.

The reduction descent, with its resort to an ad absurdum reasoning, can be used when an ordinary reductions fails. For example in case of Paolini’s proof, if he had proved that if the fractions associated to a number p are resolving, then also the fractions associated to a number less than p are, then an ordinary reduction could have been applied. But he proved that if the fraction associated to p is resolving than the fraction associated to a number which is greater, no less, than p is resolving. This proposition can be used only in a demonstration ad absurdum—as the one explained—not in a direct proof of the 4n + 1 primes theorem.

6.3 Internal and External Logic

In this sectionFootnote 31 three methods have been analysed:

  1. (1)

    Infinite descent in a proper sense;

  2. (2)

    Reduction descent;

  3. (3)

    Ordinary reduction.

In some way, all three can be connected to Fermat and to the problems and theorems he posed and discovered. There is a method which is strictly correlated to 1) and 2): the principle of the smallest integer. It is based on the idea that if a problem has solutions in integers, then it has a solution which is the smallest one. Therefore—dealing with integers –, in a reasoning by reductio ad absurdum for the theorem T, it is possible to hypothesize that a certain value or set of values are the smallest ones for which \(\neg\)T is true and, after that, to show that a smaller value or set of values exist. This contradiction proves T is true. The first mathematician who used explicitly the method of the smallest integer was probably Lagrange.Footnote 32 This way of reasoning can be applied both while dealing with infinite descent or reduction descent. These methods can hence be included inside the more general scheme of the principle of the smallest integer, even if some doubts might be expressed on the fact that this inclusion embraces all the cases in which infinite descent and reduction descent are applied (Cfr. Bussotti 2006, pp. 451–456).

The relation between infinite descent, reduction descent and principle of the smallest integer introduces an important problem: what is the role of formal logic in mathematics? It is well known that, from the point of view of the mathematical logic all the methods we have analysed are logically equivalent to mathematical induction. However, in history and in practice of mathematics these methods have been used for different classes of problems: for example, no demonstration by mathematical induction exists of the fact that every prime of the form 4n + 1 is the sum of two squares or that the equation \(x^{3} + y^{3} = z^{3}\) has no integral solutions if we exclude the trivial ones. This is true for most theorems proved by the methods we have expounded. The question is: does a general mechanism M which allows us to transcribe a proof by descent into a proof by mathematical induction, so that, after having obtained this proof, we can avoid to consider all the steps of M and obtain a proof by mathematical induction which seems independent of its deduction from the proof by descent? This is exactly what happens in projective geometry: for example, in space projective geometry the law of duality permits to obtain (for axioms and theorems) and demonstrate (for theorems) a graphical proposition from another one replacing the word “point” by “plane”, the word “to cut” by “to project” and leaving unmodified the word “straight line” (Table 5).

Table 5 One of the most elementary examples in which the duality law is applied

It would be interesting to determine whether such automatic transformation of a proof given by descent in a proof given by mathematical induction can exist. In any case, though from the point of view of the formal logic the analysed methods are equivalent to mathematical induction, their internal logic is different (Cfr. Gauthier 1991, 2002):

  1. (1)

    As far as mathematical logic is concerned, the distinction between affirmative and negative propositions makes no sense because an affirmative proposition can be transformed into a negative one and viceversa. Any deductive scheme is a tautology. But for a mathematician this distinction can be significant because the way in which a proposition is presented can open the possibility to a proof which—otherwise—could not have been conceived.

  2. (2)

    The possibility to use the reductio ad absurdum can also open perspectives of proof, which are excluded otherwise. Therefore, even if from a logical point of view, schemes of proof by reductio ad absurdum are proved to be logically equivalent to schemes in which the reductio is not used, in the practice of mathematics these schemes can be applied to different kinds of situations.

  3. (3)

    Infinite descent, reduction descent and principle of the smallest integer allow us “to go backwards”, that is given a value, they are based on the construction of a smaller value, whereas the mathematical induction allows us “to go forwards”. This feature can also represent a great difference from a mathematical point of view, because the first three methods permit to exploit the property that, given two integers, only a finite number of integers can exist between them, while this is not the case with mathematical induction.

Finally, the internal logic of the infinite descent and of the mathematical induction is different because these methods are based on different properties of the mathematical objects (the integers, in this case) and on different ways of thinking of the mathematicians. The internal logic can highlight properties of the mathematical methods and of mathematics as an activity carried out by human beings, with their hard work, their failures and their successes, which, with a mere formal approach, might remain obscure. Mathematical logic provides an external approach to mathematics. It is quite useful to classify methods, theorems and problems and to avoid logical mistakes, but it cannot be confused with the internal logic of mathematics. These methods are hence different from a mathematical standpoint, even if they are logically equivalent.

7 Conclusion

The seventeenth century is well–known as the century of the scientific revolution. For, several fields of the human knowledge—especially in relation to exact sciences—were either created or improved in a substantial manner. Taking into account this context, new interests raised in the Scientia de ponderibus, ballistic, practical geometry (Pisano and Capecchi 2015) until new Mechanics (Bussotti and Pisano 2014). This new movement of ideas stimulated the parallel developing of mathematical science: the use and theory of the equations in geometry, symbolism, pure calculus and obviously its relationship with physical science (Pisano and Capecchi 2013).

The modern theory of numbers also dates back to the seventeenth century and it has to be inscribed, generally speaking, within the outlined picture. Fermat was the main protagonist of this new mathematical current of studies. However, he provided no publication in which his statements and proofs were explained. Rather, he suggested several arguments close to the modern Number Theory within several letter to his scientific correspondents.

7.1 An Assumption

From a historical–mathematical viewpoint, the infinite descent has often been used in the context of the Diophantine analysis in order to determine the possible solutions of certain equations or classes of equations achieved through this method. It is a particular kind of proof by contradiction based on the wellordering principle.

One might assume that Fermat might have created an entire number theoretical construction and that the 4n + 1 theorem represented, in a sense, the core of Fermat’s number theory. For, it is connected with several of his most profound researches.

With regard to the problem of the Pythagorean triples, the fact that every prime number of the form 4n + 1 is the sum of two squares allowed Fermat to grasp the class of numbers which can be the hypotenuse of a Pythagorean triangle and how many times a composite number can be hypotenuse (Bussotti, 2006, pp. 177–180). Fermat, for example, wrote in a letter to Frenicle (15 June 1641):

The fundamental proposition of the right triangles is that every prime number which exceeds by a unity a multiple of 4 is composed of two squares.Footnote 33

Therefore, this fundamental theorem is the basis to solve the traditional Diophantine problems concerning the right triangles. Furthermore, it is the basic statement for the theory of binary quadratic forms of the kind Ax2 + By2. Fermat dealt with the form x2 + By2 (A = 1, B = 1,2,3). The form x2 + y2 is a prototype for the study of the others. Moreover, the theorem is also connected with the following equation:

$$x^{2} - Ny^{2} = - \, 1$$

faced by Fermat, too. This equation is the easiest extension of Pell’s equation. But, in contrast to the latter, there is a precise necessary condition for the equation to have a solution. For, it is necessary that N has –1 as a quadratic residue, that is, if it is a prime number, it must be of the form 4n + 1.

Fermat also assumed that the 4n + 1 primes theorem is necessary to prove the polygonal numbers theorem. This theorem is stated both in Observations sur Diophante (Fermat 1891–1922, I, Observation XVIII, p. 305; in order to comment Diophantus’ quaestio XXXI, Book IV), and in many letters and is considered by Fermat as one of the most significant and general in number theory. It is worth pointing out that it appears in Fermat’s correspondence from 1637 (Fermat 1891–1922, II), while the 4n + 1-primes theorem appears from 1640 (Ibidem). Therefore, one could conjecture that

$$Fermat\,first\,proved\,the\,three\,\text{``}triangles\text{''}\,theorem\,and\,on\,its\,basis\,the\,four\,squares$$
$$theorem,\,and\,then\,the\,general\,theorem\,on\,the\,polygonal\,numbers.$$

Why? Because it can also historically–epistemologically justify that:

  1. (a)

    In a phase of the proof of the three triangulars theorem, the property according to which every prime number of the form 4n + 1 is the sum of two squares might be necessary (Cfr. Paolini, in Bussotti 2006, pp. 507–534 and, for an explanation see Bussotti, 2006, pp. 129–142).

  2. (b)

    Fermat declared that he had to prove—“[…] lorsqu’il me fallut démontrer […]” (Fermat 1891–1922, II, p. 432)—the theorem on the prime numbers of the form 4n + 1; as if this proposition represented a lemma for proving other propositions.

This could be a reasonable–so–possible reconstruction of Fermat’s work. Following these conjectural assumptions:

  1. (c)

    Fermat could have also assumed this property 4n + 1 primes as hypothesis delaying its proof some years later.

  2. (d)

    The relations between the 4n + 1 theorem and the polygonal numbers theorem are historically consistent with Fermat’s assertions (cfr. Letter to Pascal in 1654; Fermat 1891–1922, II) and with a recent proof (also given by Paolini) in which the 4n + 1-primes theorem is used to prove the three triangulars theorem, which, in its turn, is exploited to demonstrate the other assertions on the polygonal numbers Theorem.

For, Fermat’s edifice of number theory acquires an admirable inner coherence and interconnection.

7.2 Concluding Remarks

In the letter to Mersenne, dating to 1640, 23rd December (Fig. 3), Fermat claimed (Fermat 1891–1922, II, pp. 212–213) that the prime numbers of the form 4n + 1 and its square are the sum of two squares, and that this decomposition is possible in only one way. Thus, of any prime of the form 4n + 1 cube and bi-square are obtained in two ways only, as sum of two square, and so on to the infinitum (Fig. 3).

Fig. 3
figure 3

Fermat’s Letter to Mersenne on the Sums of Two Squares (Fermat 1891–1922, II Correspondence to Mersenne, December 1640, pp. 212–213). Source: With kind permission of GallicaNational French Library (BnF)

For example, when n = 1, we have:

$$\begin{aligned} 5 \, &= \, 2^{2} + \, 1^{2} \hfill \\ 5^{2} &= \, 3^{2} + \, 4^{2} \hfill \\ 5^{3} &= \, 2^{2} + \, 11^{2} \hfill \\ &{\text{and}} \hfill \\ 5^{3} &= \, 5^{2} + \, 10^{2} \hfill \\ \end{aligned}$$

and so on.

Fermat did not deal only with the sums of two squares, but also with other binary quadratic forms such as:

$$\begin{aligned} x^{2} + \, 2y^{2} \hfill \\ x^{2} + \, 3y^{2} \hfill \\ x^{2} - \, 2y^{2} \hfill \\ \end{aligned}$$

In this sense, each prime number can be represented as follows:

$$\begin{aligned} 6n\, + \, 1 {\text {can be represented by the form}}\, x^{2} \, + \, 3y^{2} \\ 8n\, + \, 1 {\text {can be represented by the form}}\, x^{2} \, + \, 2y^{2} \\ 8n\, + \, 3 {\text {can be represented by the form}}\, x^{2} \, + \, 2y^{2}\end{aligned}$$

By the way, it was known from a long time that, since the squares are the sum of the successive odd numbers, every odd number—therefore both prime and composite numbers—can be represented as the difference of two squares (Cfr. Pisano and Capecchi 2015, 2013).

We should remark that Fermat thought to have found a general formula in order to determine prime numbers for each arbitrary value of n. However, this argument lacked of proofs. For, Fermat’s statement is false; so, epistemologically, it also loses its general supposed evidence.

As a matter of fact, since 1640, in another letter (Fig. 4), Fermat believed to have found a series exclusively composed of prime numbers. Such series is

$$\left( 2 \right)^{{2^{n} }} + \, 1$$

In an initial phase, he admitted not to be able to prove such a proposition (Fermat 1891–1922, II, p. 206),—which hence—he proposed as a conjecture (Fig. 4), but, afterwards, in the above mentioned letter to Huygens (1659) via Carcavi he claimed to have proved his statement, which is impossible (Fermat 1891–1922, II, p. 431–432).

Fig. 4
figure 4

Fermat’s Letter to Frenicle on the Sums of Two Squares (Fermat 1891–1922, II Correspondence to Frenicle, August (?) 1640, p. 206) Source: With kind permission of GallicaNational French Library (BnF)

Until nowadays, we know that for the above formula the primes are the first following numbers only: 3, 5, 17, 257, 65,537 (Fermat 1891–1922, II, XLIII, p. 206). However, as above mentioned, he claimed (letter to Huygens; Ibidem) to have proved this proposition, which is impossible, as this proposition is false, as Euler proved (Euler 1752-1753, pp. 3–40, 1754–1755, pp. 3–13).

Fermat also dealt with other questions that he solved by infinite descent. As above said, his most remarkable one concerns the theorem according to which the area of a Pythagorean triangle is not the square of an integer. Particularly, Fermat proposed an almost complete proof (Fermat 1891–1922, I, p. 340, III, p. 271) based on Infinite Descent concerning this theorem. A corollary of such a theorem by Fermat is that the following equation, by means of integers only, is impossible:

$$x^{4} + y^{4} = z^{4}$$

It has no integral solution.

To conclude, this paper has to be considered as a contribution to the following problems:

  1. (1)

    History of mathematics: it is possible to prove Fermat’s theorems on binary quadratic forms following the scarce indications left by Fermat and by means of methods, which were available to him.

  2. (2)

    Explanations on mathematical methods: under the name infinite descent are, in general, included three different methods: infinite descent, reduction descent, ordinary reduction. We have clarified their differences and shown that, following these differences, many assertions by Fermat, which seemed difficult to be understood, are subject to a reasonable interpretation.

  3. (3)

    Difference between internal and external logic of mathematics. This is connected with the relations between mathematical logic and mathematics. This is an interesting research field on which still many specifications and clarifications have to be given by the scholars.

  4. (4)

    Inner connections of Fermat’s number theory. Fermat was working to a whole number-theoretical edifice in which the 4n + 1-primes theorems was one of the fundamental bases and the polygonal numbers theorem was the most relevant result.