On as Real Analytic Varieties of an Extended Fermat Equation

Giri Prabhakar∗

Abstract On the one hand, triangles play an important role in the solution of elliptic curves, as exemplified in studies by Tunnell on the congruent number problem, or Ono relating arbitrary triangles to elliptic curves. On the other hand, Frey-Hellegouarch curves are deeply connected to Fermat’s equation. Thus, we are motivated to explore the relationship between triangles and Fermat’s equation. We show that triangles in Euclidean space can be exactly described by real analytic varieties of an extension of the Fermat equation. To the 3 best of our knowledge, this formulation has not been explored previously. Let S = {(a, b, c) ∈ R≥0 | (c > φ φ φ 0 ∧ ∃ φ ∈ R≥1)[a + b = c ]} be the set of real non-negative solutions to the Fermat equation extended to admit real valued exponents φ ≥ 1, which we term the Fermat index. Let E be the set of triplets of side lengths of all non-degenerate and degenerate 2-simplices. We show that S = E, and that each has a unique Fermat index. We show that there exists a deformation retraction F based on the extended Fermat equation, that maps all possible sides a ≤ c and b ≤ c of 2-simplices (a, b, c) ∈ S, to the retract c of fixed length at a fixed to a. However, (a, b, c) is also governed by the ; thus an alternate map P exists based on the law of cosines, which must be geometrically identical to F . Setting F = P generates an algebraic equation that yields a class of polynomials closely related to the 2mth cyclotomic polynomial. We propose criteria for the irreducibility of these polynomials in Q[x], and present an extension of the Schoenemann-Eisenstein theorem, which we employ along with additive shifts and Gauss’s Lemma to prove the propositions. The approach yields new geometric insights about triangles: in particular, a simple proof that no rational triangle exists with a Fermat index of 4, and in general, the result that no non-degenerate oblique rational triangle can have an Fermat index. Keywords: Euclidean , Pythagorean theorem, Diophantine equations 2010 MSC: 51N20, 51M04, 51M05

1. Introduction

Trigonometric methods are indispensable in a wide spectrum of modern scientific and technological fields, but the fundamental representations and analyses of triangles is one of the oldest and most established subjects [1]. Therefore, the expectation that studies in these have little that is new to offer should come as no surprise. Nevertheless, there is still a possibility that one comes across undiscovered insight, such as the work by Kendig extending the interpretation of Heron’s formula to the complex plane[2]. Considerations in plane trigonometry result from the root presumption of the Pythagorean theorem. The cosine law is a prime example that relates all three sides of a triangle, and we will call this the Pythagorean representation of a triangle. Note that the term “triangle” in this paper refers to 2-simplices in Euclidean space. On the one hand, many studies arising from the congruent number problem and generalizations of this problem have shown that rational triangles are closely related to solutions of elliptic curves[1, 3–6]. Tunnell related the congruent number problem to the Birch and Swinnerton-Dyer conjecture [6]. Ono describes

∗Corresponding author Email address: [email protected] (Giri Prabhakar) On Triangles and an Extended Fermat Equation Giri Prabhakar a method by which it is possible to generate an infinite number of elliptic curves over an algebraic field by replacing right triangles in the congruent number problem with arbitrary triangles [7]. On the other hand, elliptic curves are also strongly connected to Fermat’s equation; Frey-Hellegouarch curves of the form 2 m m m m m 3 y = x(x − a )(x + b ) are connected to Fermat’s equation a + b = c where (a, b, c) ∈ Z>0 and m is an odd prime [8]. The contributions of Frey, Serre, Shimura, Taniyama and others on the modularity of these elliptic curves over the field of rational numbers played a critical role in the breakthrough and celebrated proof of Fermat’s theorem by Wiles[8–15]. The strong relationship between triangles and elliptic curves on the one hand, and elliptic curves and Fermat’s equation on the other, motivated us to study the connection between triangles and an extension of Fermat’s equation. We have discovered an alternate representation of the relationship between the sides of a triangle, that is not a general consequence of the Pythagorean theorem. We call this the Fermat representation. In addition to making connections to Kendig’s observations and cyclotomic polynomials, we also present an extension of the Schoenemann-Eisenstein theorem and fresh insight into the properties of triangles that, to the best of our knowledge, have been previously unexplored. We begin in this section by showing that the extended Fermat equation offers an alternate, exact, real analytic description of any triangle. It is naturally interesting to then consider the relationship between the Fermat and Pythagorean representations, and its consequent implications. Therefore, in section 2, we estab- lish the geometric framework which is the basis upon which the Fermat and Pythagorean representations are related in section 3. The relationship suggests the formulation of an analytic function, which takes the form of univariate polynomials for positive integer values of the exponent. We then propose the irreducibility of the resultant polynomials in section 4, and prove these propositions by means of an extension of the Schoenemann-Eisenstein theorem [16] and Gauss’s Lemma [17]; these are our main results.

3 φ φ φ Theorem 1. Let S = {(a, b, c) ∈ R≥0 | (c > 0 ∧ ∃ φ ∈ R≥1)[a + b = c ]} be triplets of non-negative real numbers that satisfy aφ + bφ = cφ. (1)

The number φ will be called Fermat index. Let E be the set of triplets of side lengths of all non-degenerate and degenerate 2-simplices. Then, S = E, and each 2-simplex has a unique Fermat index. Proof. First let b > a and φ ∈ (1, ∞); and consider the expression

(a + b)φ = bφ[1 + (a/b)]φ,

φ which, on expanding [1 + (a/b)] as a convergent binomial series with k ∈ Z≥0, becomes

∞ X φ φ bφ (a/b)k, where := φ(φ − 1) ... (φ − k + 1)/k!, k k k=0

∞ X φ = bφ + φabφ−1 + bφ (a/b)k, k k=2 which holds for both integer and non-integer real values of φ. Since aφ−1 < φbφ−1,

∞ X φ (a + b)φ > bφ + aφ + bφ (a/b)k. (2) k k=2

th P∞ φ k The k term of k=2 k (a/b) is

k tk = [φ(φ − 1) ... (φ − k + 1)/k!](a/b) , so that tk + tk+1 = tk{1 + [(φ − k)/(k + 1)](a/b)}. 2 On Triangles and an Extended Fermat Equation Giri Prabhakar

n Let n be the first integer that is greater than φ; then tn = [φ(φ − 1) ... (φ − n + 1)/n!](a/b) ≥ 0, and in fact φ ∀ i ∈ Z≥0 3 r = n + 2i, tr ≥ 0, because r is either 0 (when φ is an integer) or contains the product of an even number of negative terms in the numerator (when φ is a non-integer real number). Since 1 < φ < r, it follows that r − φ < r − 1 < r + 1. Therefore, φ − r < 0 and |(φ − r)/(r + 1)| < 1 =⇒ 0 < tr + tr+1 ≤ tr, with the equality applying when φ = n − 1. Hence

∞ ∞ n−1 X φ X X (a/b)k = t = t + (t + t ) + (t + t ) + ..., k k k n n+1 n+2 n+3 k=2 k=2 k=2 which implies that n−1 ∞ X X φ 0 < t < (a/b)k < (1 + a/b)n, k k k=2 k=2 and from (2) leading to the inequality

(a + b)φ > aφ + bφ = cφ, from which we conclude that a + b > c. Since c > a and c > b, we get b + c > a and c + a > b. Thus, for a 6= b and φ > 1, (1) implies the triangle inequalities, which are necessary and sufficient for the triplet (a, b, c) to form a 2-simplex [18]. When φ = 1, (1) implies that (a, b, c) is a degenerate 2-simplex. For a = b, the is trivially satisfied in S, since in (1), 21/φa = c (taking only the positive real root), thus 2a > c, but also c > a. Clearly, a triplet (a, b, c) satisfying (1) is equivalent to (λa, λb, λc) ∀ λ ∈ R, and hence S ⊂ P2(R). Conversely, consider a triangle (a, b, c) ∈ E which is either degenerate or non-degenerate (in the former case with c and at least one of a, b non-zero), with the length of all non-zero sides greater than 1. The assumption about the length does not lose generality, since E ⊂ P2(R), but is simpler for analysis. Let c be (one of) the longest side(s). We have, in the degenerate case (without loss of generality) a+b = c, a < c, b ≤ c, and in the non-degenerate case, a + b > c, a ≤ c, b ≤ c. First we assume strict inequality, and defer the equality cases to Lemmas 2 and 3 (where they will be shown to correspond to the extreme cases φ → 1 and φ → ∞). Thus, a + b > c, a < c, b < c. Note also that ln(c) > ln(a) and ln(c) > ln(b). For every real number x > 1, let y(x) = cx/(ax + bx). Then

y0(x) = cx{ax[ln(c) − ln(a)] + bx[ln(c) − ln(b)]}/(ax + bx)2

= [cx/(ax + bx)]{ax[ln(c) − ln(a)] + bx[ln(c) − ln(b)]}/(ax + bx), thus y0(x) = y(x){ax[ln(c) − ln(a)] + bx[ln(c) − ln(b)]}/(ax + bx). (3) Let ε = min([ln(c) − ln(a)], [ln(c) − ln(b)]). Moreover, when we take away the terms ln(a) and ln(b) in (3) we see that 0 < ε < {ax[ln(c) − ln(a)] + bx[ln(c) − ln(b)]}/(ax + bx) < ln(c), hence we have 0 < εy(x) < y0(x) < ln(c)y(x), and y is smooth and real analytic, so that for some value of z > 1 Z z Z z Z z εdx < dy/y < ln(c)dx, 1 1 1 hence ε(z − 1) < ln[y(z)/y(1)] < ln(c)(z − 1) =⇒ y(1)eε(z−1) < y(z) < y(1)e[ln(c)](z−1).

Therefore, it is possible to choose z = z1 and z = z2 such that

ε(z1−1) y(1) < y(1)e = 1 =⇒ z1 = 1 − (1/ε)ln[y(1)] > 1, 3 On Triangles and an Extended Fermat Equation Giri Prabhakar

ln(c)(z2−1) y(1)e = 1 =⇒ z2 = 1 − [1/ln(c)]ln[y(1)] > 1.

Since ε < ln(c), 1 − (1/ε)ln[y(1)] > 1 − [1/ln(c)]ln[y(1)]. Thus, there exists 0 < 1, 2 < 1 such that 1 − 1 ≤ y(z) ≤ 1 + 2 whenever 1 − [1/ln(c)]ln[y(1)] ≤ z ≤ 1 − (1/ε)ln[y(1)]. Since y is continuous in this interval, from Cauchy’s Intermediate Value Theorem [19], there exists φ ∈ [1 − [1/ln(c)]ln[y(1)], 1 − (1/ε)ln[y(1)]] such that y(φ) = 1, or cφ = aφ + bφ. Moreover, y0(x) > εy(x) > 0 ∀ x. Then, from Cauchy’s Mean Value Theorem [20], there exists some ξ such that ∀ δ > 0, [y(φ + δ) − y(φ)]/δ = y0(ξ) > 0, hence y(φ + δ) > y(φ), and therefore φ is the unique value at which y(x) = 1. For completeness, the degenerate case a + b = c, a < c, b ≤ c, and the equality case a + b > c, a ≤ c, b ≤ c must also be considered. Lemma 2. The Fermat index of a degenerate 2-simplex is 1. Proof. Let γ be the angle opposite the longest side c of triangle (a, b, c) with Fermat index φ. As φ → 1, a2 + b2 − c2 −2ab (a + b)2 → c2, therefore, cos γ = → = −1. Hence, 2ab 2ab lim (γ | aφ + bφ = cφ)γ = π. φ→1 Clearly the converse is true since a + b = c =⇒ φ = 1, and both a, b cannot be 0 together. Lemma 3. The Fermat index of isoceles triangles, in which equal sides are the longest sides, is unbounded,

∀ (a, b, c) ∈ S, lim φ → ∞. c→max(a,b) Proof. We first assume b > a. As c → b, for some small positive real , let c = b + . Dividing the equation aφ + bφ = (b + )φ throughout by b and expanding the equation as a (convergent) binomial series, we get a  φ ( )φ + 1 = (1 + )φ = 1 + + δ(), b b b ∞ X φ φ where δ() = (/b)k, with := φ(φ − 1) ... (φ − k + 1)/k!, k k k=2 (a/b)φ  δ() thus, = + , φ b φ φ and since lim→0 δ() → 0, lim→0(a/b) /φ → 0; the limit on the left hand side of the equation can be evaluated with the application of the L’Hˆopitalrule [21], by differentiating the numerator and denominator by φ in the interval (1, ∞) to get lim(a/b)φln(a/b) → 0 =⇒ (a/b)φ → 0 =⇒ lim(φ)ln(a/b) → −∞, →0 →0 φ φ φ and since a < b, ln(a/b) < 1, and lim→0 φ → ∞. Conversely, given φ → ∞ in a + b = c =⇒ (a/c)φ + (b/c)φ = 1, the left hand side goes to 0 since a < c and b < c, unless, as φ → ∞, either a → c or b → c, so that the triangle must have two equal longest sides if φ becomes unbounded. As a corollary, we also see that the Fermat index of an is unbounded. An alternate way to prove this is: let 1 and 2 both be small positive real numbers, and let a = c − 1 and b = c − 2. φ φ Now letting 1 →  → 0 and 2 →  → 0, we get from the last equation 2[c − ] = c , which, on taking th positive real φ roots (since c and c −  ∈ R>0), leads to the equation 1/φ c ln(2) 2 = =⇒ φ = c c −  ln( ) c −  from which we conclude that lim→0 φ → ∞; conversely limφ→∞  → 0. From Theorem 1, and Lemmas 2 and 3, we see that 3 ∀ (a, b, c) ∈ R≥0 [(a, b, c) ∈ S ⇐⇒ (a, b, c) ∈ E], therefore, S = E. 4 On Triangles and an Extended Fermat Equation Giri Prabhakar

Corollary 1. If (a, b, c) ∈ S and φ is the Fermat index of (a, b, c), then

x x x δ(a, b, c) = {(a , b , c ) | x ∈ [1, φ]} ⊂ S.

Proof. Since aφ + bφ = cφ, ∀ x ∈ [1, φ], (ax)φ/x + (bx)φ/x = (cx)φ/x ∧ φ/x ≥ 1 =⇒ (ax, bx, cx) ∈ S from Theorem 1 and Lemma 2. The condition is trivially satisfied for a degenerate triangle since φ = 1. For an isoceles triangle in which one or both of a and b equal c, the triangle inequality for (ax, bx, cx) is clearly satisfied regardless of the value of x ≥ 1. Since (ax, bx, cx) is a triangle for 1 ≤ x ≤ φ, with the triangle being degenerate at x = φ, it follows that ax + bx > cx for 1 ≤ x < φ. From Heron’s formula, A(x) = ps(s − ax)(s − bx)(s − cx), is the of the triangle, where s = (ax + bx + cx)/2, so that s − cx = (ax + bx − cx)/2. Intuitively, one may visualize the triangle (ax, bx, cx) as “stretching”, with a continuously decreasing area; thus A(φ) = 0, and A(x) is imaginary for x > φ, questions around which have been explored by Kendig [2]). Triangles with imaginary areas therefore have Fermat indices less than 1. Corollary 1 can be used to determine the Fermat index φ of a non-isoceles and non-degenerate triangle (a, b, c). If one took the logarithms of the sides of any triangles in δ(a, b, c) with Fermat index x, the triplet thus obtained: [xln(a), xln(b), xln(c)] is the same point in P2(R). Let (ar, br, cr) be any triangle in δ(a, b, c). We therefore have ln(ar)/ln(br) = ln(a)/ln(b). Without losing generality, we will assume that c = 1 (any triangle may be brought to this condition by normalizing the sides by c). Let us assume that (a0, b0, 1) is the in the set δ(a, b, 1). Let a0 := t0 < 1 be the initial assumption. Then

ln(b)/ln(a) ln(b0) := ln(t0)ln(b)/ln(a) =⇒ b0 := t0 . q p 2 [2ln(b)/ln(a)] Compute the corrected value a0 := t1 = 1 − b0 = 1 − t0 , and iterate until convergence. Thus, we summarize the algorithm as Algorithm 1.

Initialize 0 < t0 < 1, r = ln(b)/ln(a) For i = 1, 2, 3, ··· q 2r ti := 1 − ti−1 (4)

Terminate at i = k when |tk − tk−1| <  2 a0 = lim tn ≈ tk, φ = 2ln(a0)/ln(a) = ln(1 − a0)/ln(b). n→∞

The convergence of the iterations in Algorithm 1 can be seen as follows: the sequence of values tk are 3 defined in R≥0 and hence in a metric space; the relevant subspace to which all tk belong, we will call tδ, and ∀ k, tk ∈ [0, 1], hence tδ is compact. Assume without loss of generality that b > a (the case b = a is easily 2 solvable: φ = ln(2)/ln(c/a)). Let us rewrite (4) with xi = 1 − ti to obtain

r xi = (1 − xi−1) . (5)

The solution to (5) is the intersection of the curve f(x) = (1 − x)r and g(x) = x; hence this point is unique for a given value of r, is the only solution, and always exists for x ∈ [0, 1]. Moreover, since f(x) is continuous and defined on the same domain and range as g(x), f(x) = x is a Brouwer fixed point. Let this fixed point be (x∗, f(x∗)). The slope of the curve is f 0(x) = −r(1 − x)r−1, and is strictly decreasing with the limits f 0(0) = −r and f 0(1) = −∞. Therefore, for x < x∗, f(x) > f(x∗), and for x > x∗, f(x) < f(x∗). Since ∗ r < 1, (5) shows that xi > 1−xi−1, and xi−1 > 1−xi−2, ∴ xi > xi−2. Now let x0 < x , =⇒ f(x0) = x1 > ∗ ∗ ∗ ∗ x and f(x1) = x2 < x , but x0 > x2 =⇒ f(x0) = x1 < f(x2) = x3, thus x0 < x2 < x , and x > x3 > x1. In this manner one of the subsequences generated by has the ordering sh = {x0 < ··· < xi−2 < xi < ∗ ∗ xi+2 < ··· < x }, and the other, sl = {x > ··· > xi+1 > xi−1 > ··· > x3 > x1}. Let us define the distance ∗ ∗ ∗ ∗ d(x, y) = |x−y|. Then ∀ i ∈ Q≥−1 , d(xi+1, x ) < d(xi−1, x ) =⇒ ∃ q ∈ (0, 1] 3 d(xi+1, x ) ≤ qd(xi−1, x ), 5 On Triangles and an Extended Fermat Equation Giri Prabhakar

∗ ∗ ∗ ∗ with such a q being chosen from the interval (d(x2, x )/d(x0, x ), 1) for sh and (d(x3, x )/d(x1, x ), 1) for ∗ φ/2 sl. Thus, from the Banach Fixed Point Theorem [22], the recursion (5) converges to x = 1 − a as two convergent sequences sl and sh under the metric d(x, y) = |x − y|. We now explore the relationship between the Fermat index and the geometry of the triangle. Lemma 4. For obtuse triangles, 1 ≤ φ < 2, and for acute triangles 2 < φ < ∞. Proof. Note from Lemma 2 that the line segment is an obtuse degenerate 2-simplex, so this takes care of the case φ = 1, and we will assume φ ∈ (1, ∞). Let us assume a triangle (a, b, c) with c the longest side, and x γ the (largest) angle opposite c. Without loss of generality, let a, b, c > 1. For any x ∈ R>0, let h(x) = c and l(x) = ax + bx. From Theorem 1, there is a unique number x = φ such that (1) holds. Set x = φ + y, so that h(φ + y) = c(φ+y) = cφeyln(c) = aφeyln(c) + bφeyln(c), and similarly l(φ + y) = aφeyln(a) + bφeyln(b). Since ln(c) > ln(a) and ln(c) > ln(b), for 1 < φ + y < φ =⇒ 1 − φ < y < 0, l(φ + y) > h(φ + y) and for φ < φ + y < ∞ =⇒ 0 < y < ∞, l(φ + y) < h(φ + y). Therefore,

aφ+y + bφ+y > cφ+y, 1 − φ < y < 0; aφ+y + bφ+y = cφ+y, y = 0; (6) aφ+y + bφ+y < cφ+y, y > 0.

When the Fermat index of (a, b, c) is 1 < φ < 2, (6) implies a2 + b2 < c2, and cos γ = (a2 + b2 − c2)/2ab < 0, thus π/2 < γ < π and the triangle is obtuse. When 2 < φ < ∞, then from (6), a2 + b2 > c2, and cos γ = (a2 + b2 − c2)/2ab > 0, therefore, γ < π/2 and the triangle is acute. We further note from the preceding definitions of h(φ + y) and l(φ + y) that,

If y2 > y1 > 0, then

l(φ + y2) − h(φ + y2) < l(φ + y1) − h(φ + y1) =⇒ a(φ+y2) + b(φ+y2) − c(φ+y2) < a(φ+y1) + b(φ+y1) − c(φ+y1) (7)

and if 1 − φ < y2 < y1 < 0, then

l(φ + y2) − h(φ + y2) > l(φ + y1) − h(φ + y1) =⇒ a(φ+y2) + b(φ+y2) − c(φ+y2) > a(φ+y1) + b(φ+y1) − c(φ+y1)

We will now establish a geometric framework that enables systematic analysis of all possible triangles. The geometric framework comprises of definitions and terminology, along with the construction of a geometric mapping that will enable the creation of an effective procedure, in other words, an algorithm, for choosing triangles in an ordered sequence.

2. Geometric Framework

2.1. Definitions and Terminology The following definitions and terminology will hold unless explicitly mentioned otherwise. The triplet (a, b, c) will always refer to an element of E (equivalently, of S), with non-zero b and c (one of) the longest side(s), and we will assume the triplet (a, b, c) scaled such that all non-zero values of a, b, c > 1 without loss of generality. We will also call c the , regardless of whether (a, b, c) is right, oblique or degenerate. This is a convenient choice for us as we need to frequently refer to the longest side. A triangle is called integer if the sides all have positive integer lengths, primitive if the sides of an integer triangle do not have a greatest common divisor except 1, and rational if the sides are rational numbers. The Fermat index φ of a triangle (a, b, c) will be alternatively be indicated as φ(a, b, c), or other parametric forms introduced when needed. The angle between a and c is denoted by θ, while that between b and c is denoted by λ. The angle opposite c is denoted by γ. We will denote altitudes perpendicular to sides a and b as ha (= c sin θ) and hb (= c sin λ) respectively, and the projection of c on sides a and b, as α (= c cos θ) and β (= c cos λ) respectively. Therefore 6 On Triangles and an Extended Fermat Equation Giri Prabhakar

(α, ha, c) and (β, hb, c) are right triangles. As a convention, we will adopt the symbol p (respectively, r) whenever α (respectively, β) is an integer, and p/q (respectively, r/s) whenever α (respectively, β) is a proper fraction, with p, q, r, s ∈ Z>0. Further, when α = p/q, we scale the triangle (a, b, c) to (qa, qb, qc) = (A, B, C). Thus, in triangle (A, B, C), α = p ∈ Z>0. Note that (A, B, C) = (a, b, c) ∈ P2(R), but the triangle (A, B, C) cannot be primitive. We will denote of the triangles by (A, B, C) ∼ (a, b, c) (which is equality in P2(R)). The notation is depicted in Fig. 1.

Figure 1: Notation for a triangle (a, b, c).

2.2. Triangle Deformation Retraction Map Having established the basic definitions and terminology, we will now construct a geometric map between orthogonal and oblique triangles, with a goal that all triangles can be selected in a systematic manner allowing us to define an alogrithm for the selection process. First, we describe an example of how an oblique triangle maps to a corresponding orthogonal triangle, and then we will investigate the nature of this mapping.

2.2.1. Construction relating oblique and orthogonal triangles

Figure 2: Construction Choose the point of intersection of two lines in general linear position in R2 as the origin of a two dimensional Cartesian coordinate system. Draw a circle with radius c, and consider only the first quadrant (hence all coordinates are non-negative). Select a right triangle OJL, with hypotenuse c, at an angle θ to the X−axis, and restricted to the interval [0, π/2). Let the base of the right triangle be α = c cos θ, and height 7 On Triangles and an Extended Fermat Equation Giri Prabhakar ha = c sin θ. Any triangle (a, b, c) sharing the hypotenuse c at angle θ to a, can be constructed by choosing a side of length a = 2ηα, with η restricted to values within [0, ηc] where ηc = min[1, c/(2α)]. The reason for the restriction of η is that the length of this side does not exceed the length of the hypotenuse. We denote such a triangle by Tη(c, α). Hence, triangle OJL is denoted by T1/2(c, α). At the limit η → 0, the triangle degenerates to a line segment (OL), which is the hypotenuse of T1/2(c, α), and is denoted by T0(c, α). The triangle Tηc (c, α) is always isoceles. Following the notation described in Sect. 2.1, γ is the angle opposite c (between a and b), and λ the angle between b and c. There can only be one obtuse angle in a triangle, and as γ is defined as the largest angle in (a, b, c), we see that 0 ≤ θ < π/2. Since, by definition, a and b cannot exceed c, we will denote the value of η at which max(a, b) = c, as ηc. When θ ≥ π/3, ηc = 1 and for θ < π/3, ηc < 1: specifically, when θ < π/3, a = c, b < c, when θ > π/3, a < c, b = c, and when θ = π/3, a = b = c. Hence we have the restriction ηc = min[1, c/(2α)], and 0 ≤ η ≤ ηc. All triangles Tη(c, α) will be called as identifiable triangles. Now we need to examine if the set of all identifiable triangles is equal to the set of all triangles in E. 3 Lemma 5. Let F = {(a, b, c) = Tη(c, α) | (a, b, c) ∈ R≥0 ∧ η, α ∈ R≥0)[max(a, b, c) = c > 0, η ∈ [0, ηc], ηc = min[1, c/(2α)], α/c ∈ (0, 1]]} be the set of identifiable triangles. Then F = E. 3 Proof. A triplet (a, b, c) ∈ R≥0 with the constraint c > 0 can be formed by choosing 3 numbers independently of each other. On further imposing the triangle inequality [18] as a condition to admit the triplet into the set E, the triplet is a triangle if the condition holds. Note that the triangle inequality is suitably modified to include degenerate cases (for example, a + b ≥ c, b + c > a, c + a ≥ b will account for the degenerate case a = 0, b 6= 0). Every triangle that can be formed from the symmetric group of (a, b, c) is the same triangle, and will be a member of E. Let us now generate the minimal set of triangles, by choosing one member from each of the sets Sym[(a, b, c)], such that c ≥ a, b. Then the angle between c and either a or b is acute. Therefore, it is possible find this triangle in F. Let Pij be a permutation operation that exchanges the element in the ith position with that the one in the jth position. For example P12(x, y, z) = (y, x, z). Also, let o(x) represent the numerical position of the element x in the triplet (a, b, c). 3 Then ∀ (a, b, c) ∈ R≥0 [(a, b, c) ∈ E ⇐⇒ Po[max(a,b,c)]3(a, b, c) ∈ F], hence F = E.

Let us denote all values of η > ηc by the symbol η+, thus ηc < η+ < ∞. Whenever a > c or b > c, then (a, b, c) 6∈ F. However, the permutation Po[max(a,b,c)]3(a, b, c) ∈ F. We therefore see that, for a right triangle with a given hypotenuse c and a fixed angle θ to a, it is possible to generate a continuous sequence of triangles parametrized by η = [0, ηc]. Each triangle in this sequence has a Fermat index φ which varies with its largest angle γ. We will now explore the relationship between φ and γ as η varies.

2.2.2. Mapping φ to γ Lemma 6. Let ω = max[θ, (π −θ)/2]. For constant c and θ, γ in the interval (ω, π) is a continuous, strictly decreasing and (hence) bijective function of φ. Proof. As implied in the proof to Theorem 1, given a triangle (a, b, c), (ax + bx)/cx, and hence ax + bx − cx, is strictly decreasing for x ≥ 1. Refer to Fig. 2; let us hold c and α constant (hence angle θ constant) while η increases in the interval [0, ηc). From the construction, we see that γ is strictly decreasing with respect to η; since θ is constant, as η increases, a = 2ηα increases, hence λ increases, and γ decreases. This implies that, since 0 ≤ γ ≤ π, cos γ is strictly increasing with respect to η. For each triangle Tη, (1) can also be written in the following alternate (dual) form:

sinφθ + sinφλ = sinφγ = sinφ(θ + λ) (8)

Equation (8) is derived by invoking the rule [21]: sin λ/a = sin θ/b = sin γ/c = 1/(2R) where R is the circumradius of the triangle with sides a, b and c. Consider two triangles Tη1 and Tη2 at values η1 < η2 respectively with angles γ1 > γ2 and λ1 < λ2, sides (a1, b1, c) = (α + δ1, b1, c) and (a2, b2, c) = (α + δ2, b2, c), circumradii R1, R2 and Fermat indices φ1, φ2. We will consider the following two cases: 1) γ1, γ2 ∈ (π/2, π), and 2) γ1, γ2 ∈ (0, π/2), with the condition that γ1 > γ2 in both cases.

8 On Triangles and an Extended Fermat Equation Giri Prabhakar

Case 1 (π > γ1 > γ2 > π/2): Since we have 2R1sin γ1 = 2R2sin γ2 = c, and a2 > a1 =⇒ R2sin λ2 > th R1sin λ1, the relations together yield: sin λ2/sin γ2 > sin λ1/sin γ1. Taking φ1 powers and subtracting 1 φ1 φ1 φ1 φ1 φ1 φ1 from both sides then gives [sin λ2 − sin γ2]/sin γ2 > [sin λ1 − sin γ1]/sin γ1 (note that φ1 > 1). φ1 φ1 φ1 φ1 φ1 φ1 Using sin γ2 > sin γ1 > 0 we further obtain [sin λ2 − sin γ2]/sin γ2 > [sin λ1 − sin γ1]/sin γ2, which leads to φ1 φ1 φ1 φ1 sin λ2 − sin γ2 > sin λ1 − sin γ1, (9)

φ1 φ1 φ1 in which the right hand side, from (8), gives sin λ1 − sin γ1 = −sin θ, which upon substitution in (9) yields φ1 φ1 φ1 sin θ + sin λ2 > sin γ2. (10)

φ1 Now we multiply (10) throughout with the factor (2R2) and get

φ1 φ1 φ1 a2 + b2 > c , (11) which from (7) in Lemma 4 leads to φ2 > φ1. 2 2 2 Case 2 (π/2 > γ1 > γ2 > 0): Recalling the law of cosines [21] as cos γ = (a + b − c )/2ab, η1 < 2 2 2 2 2 2 η2 ⇐⇒ γ1 > γ2 ⇐⇒ cos γ1 < cos γ2, =⇒ (a1 + b1 − c )/2a1b1 < (a2 + b2 − c )/2a2b2, ∵ a1 < 2 2 2 2 2 2 a2 ∧ b1 < b2, =⇒ a1 + b1 − c < a2 + b2 − c , and since 2 < φ < ∞, this implies from (7) in Lemma 4, that 2 2 2 2+ 2+ 2+ 2+ 2+ 2+ ∃  > 0 3 a1+b1−c1 = (a2) +(b2) −(c2) , at which value of  we also have (a1) +(b1) −(c1) < 2+ 2+ 2+ (a2) + (b2) − (c2) , repeating which leads to the relationships holding ∀  > 0. Since φ1, φ2 > 2, we φ1 φ1 φ1 φ1 φ1 φ1 can choose  = φ1 − 2 to get a1 + b1 − c1 = 0 < a2 + b2 − c2 , which leads to φ2 > φ1. From Cases 1 and 2, η1 < η2 ⇐⇒ γ1 > γ2 ⇐⇒ φ1 < φ2. (12) Assuming θ ≤ π/3, an isoceles triangle occurs when a = c (or b = c, if θ ≥ π/3 to begin with). For the condition a = c, γ = (π − θ)/2, and if b = c, γ = θ. When γ = ω, η = ηc, and Tηc (c, α) is isoceles, and from Lemma 3, φ is unbounded. Thus, the interval (ω, π) is a bijection of φ ∈ [1, ∞), with the special points φ(π) = φ(0) = 1, φ(π/2) = 2 and φ(γ → ω) → ∞ defining degenerate, right and isoceles triangles respectively.

Moreover, there exists a one-to-one mapping between every point on ha and a corresponding point on b or c. Thus, we have

Theorem 7. For a constant c and α, let Tη(c, α) represent any identifiable triangle in F, with η ∈ [0, ηc) ⊂ φ φ 1/φ Iηc and Fermat index φ = φη(c, α). Then, Tη(c, α) = [2ηα, fη(c, α), c], where fη(c, α) = [c − (2ηα) ] , 2 and the mapping F : T × Iηc → T with F (c, α, η) = Tη(c, α) is a deformation retraction of T ∈ ∆ onto 1 T0 ∈ ∆ .

2.3. Algorithm for Selection of Rational Triangles For a given c and θ, the mapping F orders the sequence of triangles in strictly increasing order of φ relative to η, as shown in (12). While for fixed values of c and α,(c, α, η) is strictly ordered in product order [23], the fact that (a, b, c) = P12(a, b, c) = (b, a, c) shows that for two triplets (c1, α1, η1) (c2, α2, η2) =6 ⇒

Tη1 (c1, α1) Tη2 (c2, α2). Thus, F induces only a partial ordering on S, which is a strict ordering over η (equivalently, γ) for each fixed value of c and α (equivalently, θ). Nevertheless, the ordering induced by F on S makes it possible to uniquely identify any triangle by the triplet [c, θ, γ] or, equivalently, [c, θ, 2ηα]. Hence we determine the algorithm to traverse all rational triangles as follows: Algorithm 2. Initialize c = 1.

Step 1: Fix the value of c ∈ Z>0 (without loss of generality).

Step 2: For the fixed c, fix a rational value of cos θ ∈ (0, 1] =⇒ α ∈ Q>0 ≤ c.

Step 3: With c and α thus fixed, select η ∈ Q ∈ [0, ηc], so that a = 2ηα is rational.

9 On Triangles and an Extended Fermat Equation Giri Prabhakar

Step 4: Check for the rationality of side b, discard η if b is irrational.

Step 5: Repeat steps (iii) and (iv) for all rational values of η ∈ [0, ηc]. Step 6: Set c := c + 1 and go to step (i)

Since for a fixed c and α all triangles Tη(c, α) share a common hypotenuse and θ, all maps F (c, α, η) with the same ratio α/c differ in R2 only by a scaling factor, and are (respectively) mapped to the same sequence of points (triangles) in P2(R). The ratio cos θ = α/c therefore defines an equivalence class of maps F (c, α, η), and we will denote the sequence of all triangles Tη(c, α) in this class by the symbol τ(c, α). This equivalence property is later used in simplifying our analysis over rational triangles by restriction to integer triangles. In Algorithm 2, α ∈ Q>0, therefore, α can be either an integer or a proper fraction. In further analysis, we will be considering both cases of α.

2.4. Pythagorean Representation Consider a map P : T × I → T with P (c, α, η) = Tη(c, α) = [2ηα, p(c, α, η), c], where p(c, α, η) = [c2 + 4ηα2(η − 1)]1/2 derives from the law of cosines [21, 24]. This can be easily seen by applying the law of cosines to the side b = LQ in Fig. 2, so that b = [c2 +a2 −2(a)(c)cos θ]1/2 = [c2 +(2ηα)2 −2(2ηα)(c)(α/c)]1/2. For a given c, θ and η, each such triangle generated by P will also have a Fermat index, φη(c, α), which depends only on c, α and η, and the latter is also defined for the triangle at η generated by the map F . Having established the necessary geometric framework, in which we defined the Fermat representation (F ), and the Pythagorean representation (P ), we now examine the relationship between them.

3. The Between F and P Since F = P , Tη(c, α) = [2ηα, p(c, α, η), c] = [2ηα, f(c, α, η), c], (13) which motivates the definition of a function for any t ∈ R≥1: 2 2 t t t 2 ψt(c, α, x) = [c + x − 2xα] − [c − x ] , (14) where 0 < α < c ∈ R>0. When c and α are fixed, and t = n ∈ Z>0, then ψn(c, α, x) is a univariate polynomial in x that we denote by the symbol un(c, α, x), in order to emphasize the polynomial nature of this function as distinguished from ψt(c, α, x) with any real value of t. As can be verified by a binomial series expansion of terms in (14), only triangles with integer values of the Fermat index can generate such polynomials, while triangles with non-integer values of the Fermat index will generate infinite series, so ψt(c, α, x) acts as a filter, by which we can separate triangles with integer Fermat indices from those with non-integer Fermat indices, and “enforce” the integer Fermat index as a constraint in our analysis. The congruence F = P is satisfied for integer values of the Fermat index whenever un(c, α, x) attains a zero.

3.1. Roots of the polynomial un(c, α, x) We will denote the positive integer values of t by the symbol n, and expand un(c, α, x) to get,

2 2 n n n 2 2 n n n 2 un(c, α, x) = [c + x − 2xα] − [c − x ] = [c + x(x − 2α)] − [c − x ] (15)

n−1 X n = nc2(n−1)x(x − 2α) + xn(x − 2α)n + c2(n−k)xk(x − 2α)k + 2cnxn − x2n (15a) k k=2 Thus 2(n−1) n−1 n un(c, α, x) = xsn(c, α, x) = x[nc (x − 2α) + x (x − 2α) + n−1 X n (15b) c2(n−k)xk−1(x − 2α)k + 2cnx(n−1) − x(2n−1)] k k=2 10 On Triangles and an Extended Fermat Equation Giri Prabhakar

n n Let us now examine the zeros of un(c, α, x). Firstly, setting un(c, α, x) = 0 in (15) leads to [c − x ] = p n 2 2 2 2 2 ± [c2 + x2 − 2xα]n = ±b , which is always real since ∀ x ∈ R, c +x −2xα = (x−α) +c −α > 0 ∵ c > α. Here b can be regarded as the third side of a triangle with sides c, x and b, and Fermat index n; the side b can also be seen to result from the cosine law applied to this triangle. Therefore, un(c, α, x) = 0 represents two forms of the Fermat equation: cn = xn + bn (a triangle with c as hypotenuse), and cn + bn = xn (a triangle with x as hypotenuse). This means that there are exactly two real solutions for x. Note the term −2xα in un(c, α, x): this term in the cosine law is sign dependent, and our assumption that 0 ≤ α < 1, along with (x, b, c) being acute geometrically implies that x > 0 is the only possibility in the non-trivial solution. Secondly, since un(c, α, x) = xsn(c, α, x) in (15b), the term x is either a trivial zero, or factors out of un(c, α, x). The value x = 0 corresponds to one of a = 0 or b = 0 in (1). Also note that for n = 1 in (15b), s1[c, α, x] = 2x(c − α), and hence there is just the trivial solution x = 0 (corresponding to the degenerate triangle, or 1-simplex, ∆1). Hence we will assume n ≥ 2, and there are two non-trivial real solutions to un(c, α, x) = 0, both of which are necessarily triangles with Fermat index n. Refer to Fig. 3; let x = α + h. We divide the real line x into three domains or cases: (a) h < 0, (b) 0 ≤ h ≤ min(c − α, α), and (c) min(c − α, α) < h < ∞. Consider case (a): for all values of h < 0, the triangle formed by line segments x and c is obtuse, for example Q2OL in the figure. From Lemma 4, the Fermat index of such triangles is not a whole number: 1 < φ < 2, and for n ≥ 2 ∈ Z, sn(c, α, x) 6= 0 in this case, because the Fermat index of any possible obtuse triangle can never equal n (except n = 1, which is the degenerate case). Therefore, in case (a), sn(c, α, x) cannot have a real root. In case (b) φ is a strictly increasing function of h as shown in (12), and 2 ≤ φ < ∞, with φ unbounded as h → min(c − α, α). ∗ Therefore, there is exactly one value of h (corresponding to α + h = 2η α) at which φη∗ (c, α) = n, and ∗ ∗ ∗ sn(c, α, x ) = sn(c, α, α+h ) = sn(c, α, 2αη ) = 0. This is the first non-trivial real solution for un(c, α, x) = 0 with c as hypotenuse. In this case, the corresponding Fermat equation is (x∗)n + bn = cn. Multiplying this ∗ n n ∗ n 2 ∗ n equation throughout by the factor (c/x ) , we get c +(bc/x ) = (c /x ) . Since the hypotenuse of Tη(c, α) is already fixed as c, for increasing values of x, we expect a second solution, at x = c2/x∗. Given there are ∗ only two possible real solutions, and given that the first zero of sn(c, α, x) = 0 at x = x , the second must occur at x = c2/x∗. Since x∗ < c, c2/x∗ > c which means (x∗, b, c) ∈ F, but (c2/x∗, cb/x∗, c) 6∈ F. However, as shown earlier, (c, cb/x∗, c2/x∗) ∈ τ(c, α) ∈ F.

Figure 3: Geometric interpretation of (15): x is the variable side of the triangle on the x−axis, c is fixed, and b is determined simultaneously by (13). ∗ Summarizing, un(c, α, x) has exactly one trivial zero, and two nontrivial real zeros of the form x and 2 ∗ c /x . Note from (15) that sn(c, α, x) is a polynomial of degree 2(n − 1). From the fundamental theorem of algebra [25], sn(c, α, x) must have 2(n − 2) complex roots, which comprise of n − 2 complex conjugate pairs.

3.1.1. Computed Example: Roots of u7(15, 7, x) 2 n n n 2 A sample plot of un(c, α, x) = [c + x(x − 2α)] − [c − x ] for c = 15, α = 7 and n = 7 is shown in Fig. (4a) [26]. u7(15, 7, x) may be expanded as [26]:

12 11 10 9 8 u7(15, 7, x) = xs7(15, 7, x) = −x(98x − 5691x + 228340x − 7038185x + 172149054x

−3442681627x7 + 56343906554x6 − 774603366075x5 + 8715045858750x4 − 80169326015625x3

11 On Triangles and an Extended Fermat Equation Giri Prabhakar

+585210445312500x2 − 3281717373046875x + 12715141113281250) As expected from (15), there are a total of 2(7 − 1) = 12 non-trivial roots corresponding to the polynomial ∗ s7(15, 7, x) of degree 12, of which 2 are real: one occurs before 2α = 14, at x ≈ 12.4431, and the other after 14, at x = c2/x∗ ≈ 225/(12.4431)2 ≈ 18.0824 as shown in Fig.(4).

(a) Plot of u7(15, 7, x). (b) Roots of u7(15, 7, x) in the complex plane.

2 n n n 2 Figure 4: Polynomial un(c, α, x) = [c + x(x − 2α)] − [c − x ] evaluated for c = 15, α = 7 and n = 7 [26].

Remark 1. For n = 2, a quadratic equation of the form (α + h)2 − α(α + h) = 0 results, which has two real roots h = −α corresponding to a (degenerate) triangle with zero area, and h = 0, corresponding to a right triangle. As expected, a second solution occurs when x = α + h = c2/α, or, c2 = α(α + h), which implies that α + h forms a right triangle with sides c and b, which can be seen by applying the cosine law, b2 = c2 + c4/α2 − 2c(c2/α)(α/c), which results in c2 + b2 = (c2/α)2. Geometrically, the solution x = α + h = c2/α simply corresponds to scaling the original right triangle with sides (α, b, c), by the factor c/α, to get a right triangle (c, bc/α, c2/α).

4. Main Results

We will state and prove two propositions about the irreducibility of polynomials sn(c, α, x), and the rationality of their roots. Before we state the propositions, we define some terminology and symbols, which we will use in addition to the terminology described in Sect. 2.1.

4.1. Preliminaries

Let us denote S = {sn(c, α, x)[c, α ∈ R>0 ∧ n ∈ Z>0]}. Then S ⊂ R[x], the ring of polynomials over R. When c, α ∈ Q>0, this subset of S contains only polynomials with rational coefficients, which will be denoted by SQ, and SQ ⊂ Q[x]. Also, SZ ⊂ SQ contains only polynomials with integer coefficients. Further, let M be the set of all odd primes, with elements symbolized by m, and SM be the subset of polynomials sm(c, α, x) ∈ SZ with Fermat index an element of M. Note that SM ⊂ SZ ⊂ Z[x]. Let the algebraic set σn = {(x | sn(c, α, x) = 0)[sn(c, α, x) ∈ S]} ∈ σ, where σ is the set of all such algebraic sets, and ρ ⊂ σ be the set of algebraic sets ρn = {(x | sn(c, α, x) = 0)[sn(c, α, x) ∈ SQ]}. Further, let ρZ>k ⊂ ρ be the set of algebraic sets of polynomials sn(c, α, x) ∈ SZ with integer coefficients, and integer Fermat indices greater than k, while ρM ⊂ ρZ>2 is the set of algebraic sets of polynomials sm(c, α, x) ∈ SM with integer coefficients and Fermat indices being odd prime numbers m, which are the elements of M.

Proposition 1. Let Tη(c, α) = (a, b, c) ∈ F be a primitive integer triangle with c the longest side, α the projection of c on a, and m an odd . Let α = p/q, where p and q are positive , and C = qc. Then, if C, p and C − p 6≡ 0 (mod m), sm(c, α, x) is either irreducible in Q[x], or reducible to a 12 On Triangles and an Extended Fermat Equation Giri Prabhakar product of at most two polynomials with rational coefficients and of equal degree m − 1, both of which are irreducible in Q[x].

Proposition 2. The algebraic sets of the polynomial sn(c, α, x) have no rational numbers for n > 2, hence {ρ − ρ2} ∩ Q = ∅ The main results of this paper are the proofs of propositions 1 and 2. We present below a few theorems and lemmas that will be used in our proofs.

Lemma 8. (Gauss [17]) A nonconstant polynomial is irreducible in Z[x] only if it is irreducible in Q[x] and primitive in Z[x]. The rational root theorem is a consequence of Gauss’s Lemma. Given an nth degree polynomial Q(x) with integer coefficients, if Q(x) is reducible in Q[x] and has a factor (x − q/p), then from Gauss’s Lemma Q(x) is also reducible in Z[x], to (px − q)g(x), where p multiplies into the coefficient of xn−1 in g(x), and q multiplies into the constant term [27]. Therefore we have Theorem 9. (Rational Root [27, 28]) Let a polynomial with integer coefficients be defined as following,

n n−1 Q(x) = anx + an−1x + ··· + a1x + a0.

If Q(x) has a rational root of the form p/q, p is a factor of a0, while q is a factor of an. Any integer root of Q(x) must be a factor of a0 only. These conditions hold irrespective of the sign of the root. Theorem 10. (Schoenemann-Eisenstein, [29–31]) Suppose we have the following polynomial with integer coefficients. n n−1 Q(x) = anx + an−1x + ··· + a1x + a0 If there exists a prime number m such that the following three conditions all apply:

(i) m divides each ai for i 6= n,

(ii) m does not divide an, and

2 (iii) m does not divide a0, then Q(x) is irreducible over the rational numbers. Theorem 11. (Fermat [32]) If p is a prime and a is any integer not divisible by p, ap−1 ≡ 1 (mod p). Remark 2. We will invoke two well-known results that have been long established in the course of the mathematical developments towards the proof of Fermat’s last theorem: firstly, that if the theorem is true for all odd primes (m as per our notation) and 4, then it is true for all positive integers [3]. We also note that the case n = 4 was proved long before the case n = m was proved by Wiles [33]. Secondly, two cases have been historically been formulated, and only these cases hold [34]: Case I, in which none of a, b and c are divisible by m, and Case II, in which exactly one of a, b and c are divisible by m.

4.2. Proof of Proposition 1 We will begin by proposing and proving an extension of the Schoenemann-Eisenstein theorem. Theorem 12. Suppose we have the following polynomial with integer coefficients.

n n−1 Q(x) = anx + an−1x + ··· + a1x + a0

If there exists a prime number m, and an integer 0 ≤ k ≤ n such that the following three conditions all apply:

(i) m divides each ai for i 6= k 13 On Triangles and an Extended Fermat Equation Giri Prabhakar

(ii) m does not divide ak, and

2 (iii) m does not divide a0 and an, then Q(x) is either irreducible over the rational numbers, or can be reduced to a product of at most two polynomials with rational coeffcients, one of degree k and the other of degree n − k, both of which are irreducible over the rational numbers. Proof. We adopt a method based upon the approach in [31]. We assume Q(x) is primitive but reducible in R[x] so that as a consequence of Gauss’s Lemma (8), without loss of generality, we let Q(x) = g(x)h(x), where g(x) and h(x) are two polynomials with integer coefficients:

u u−1 u−2 2 g(x) = gux + gu−1x + gu−2x + ··· + g2x + g1x + g0, v v−1 v−2 2 (16) h(x) = hvx + hv−1x + hv−2x + ··· + h2x + h1x + h0, so that u + v = n. We begin by assuming v ≥ u, and first consider which coefficients of h(x) and g(x) must necessarily be nonzero. We claim that these are the coefficients h0, g0, hv, gu, and at least one of hk, gk. Clearly hv, h0 and gv, g0 have to be nonzero since an = hvgu and a0 = h0g0. If both the following hold: hk = 0, gk = 0, then for ak 6= 0 to hold, there must be at least two integers i0 6= k and j0 6= k such that i0 + j0 = k and hi0 gj0 6= 0. But we know hi0 gj0 6≡ 0 (mod m), since ak 6≡ 0 (mod m). This 2 means that both of hi0 , gj0 6≡ 0 (mod m). Since we must have an = hvgu 6≡ 0 (mod m ), without loss of generality, let us assume that gu 6≡ 0 (mod m). This means that the product hi0 gu 6≡ 0 (mod m).

However, we know that ai0+u ≡ 0 (mod m). Therefore, there must be at least one index i1 such that hi1 gj1 + hi0 gu ≡ 0 (mod m) =⇒ hi1 gj1 6≡ 0 (mod m). Note that i0 + u = i1 + j1 > k. Now if we assumed that i1 < i0, then j1 > u, which is not possible. Therefore, i1 > i0. We repeat the same argument for index i1, and in this manner, generate a sequence of indices i0 < i1 < i2 < . . . . Clearly, this cannot happen indefinitely since the largest possible index of h(x) is v. This means that there will be at least one index in h(x), for which no higher index in can be found in h(x), along with a corresponding index jn in g(x), that renders ain+jn ≡ 0 (mod m). This implies that there must exist some ain+jn 6≡ 0 (mod m), where in + jn > k. This contradicts our assumption. Hence, it is not possible that both hk = 0 and gk = 0. 2 Since a0, an 6≡ 0 (mod m ), m must be a factor of only one of hv or gu and h0 or g0 respectively. Let us first assume that m is a factor of hv, and not gu. Now an−1 = hv−1gu + hvgu−1 ≡ 0 (mod m) =⇒ hv−1 ≡ 0 (mod m). Extending this argument to an−2, an−3, . . . , au we have hn−2, hn−3, .., h0 ≡ 0 (mod m). Pk Noting that u > k, we see that ak = i=0 higk−i ≡ 0 (mod m), which cannot be possible since we assumed ak 6≡ 0 (mod m). Moreover, the choice of hv ≡ 0 (mod m) and gu 6≡ 0 (mod m) means that ∀ n ≥ j ≥ u, aj ≡ 0 (mod m) necessarily implies hv, hv−1, . . . , hv+j−n ≡ 0 (mod m). Since ak+u ≡ 0 (mod m), we must also have hk ≡ 0 (mod m). Then the only possibility to ensure ak 6≡ 0 (mod m) is that gkh0 6≡ 0 (mod m). This means that we must have g0 ≡ 0 (mod m) whereas h0 6≡ 0 (mod m). Then, a1 = h1g0 + h0g1 =⇒ g1 ≡ 0 (mod m). This argument is extended to a2, a3, . . . , ak−1, and necessarily implies that g0, g1, . . . , gk−1 ≡ 0 (mod m). Then gk 6≡ 0 (mod m) ensures that ak 6≡ 0 (mod m), and thereafter, we ensure that ak+1, ak+2, · · · ≡ 0 (mod m) by setting gk+1, gk+2, · · · ≡ 0 (mod m) and noting that h1, h2, . . . , hv ≡ 0 (mod m). However, this leaves guh0 6≡ 0(mod m) =⇒ au 6≡ 0(mod m), which could be resolved if h0 ≡ 0 (mod m), since by definition gu 6≡ 0 (mod m), but this would render ak ≡ 0 (mod m) because h0gk ≡ 0 (mod m), and thus cannot be allowed. Assuming u < k eliminates the term gk, and therefore cannot meet the criterion ak 6≡ 0 (mod m). Hence the only possibility is u = k, since au = ak 6≡ 0(mod m) satisfying both conditions simultaneously. The same arguments are applicable upon initially choosing gu ≡ 0 (mod m) and hv 6≡ 0 (mod m). Note that these arguments hold even if only hv, gu, h0, g0, and at least one of hk, gk are nonzero, thus addressing every possible occurrence of zeros as coefficients under the given conditions. We have shown that the only possibility for Q(x) = h(x)g(x) is when the degrees of h(x) and g(x) are n − k and k respectively, given v ≥ u, which is an assumption without loss of generality. Further, assuming without loss of generality that g(x) is the kth degree polynomial, we note in this case, that g(x) is already in a form that satisfies the criteria in Theorem 10, since gu = gk 6≡ 0 (mod m), all other coefficients are 14 On Triangles and an Extended Fermat Equation Giri Prabhakar

2 divisible by m, and g0 6≡ 0 (mod m ). Upon setting x = 1/y and multiplying throughout h(x) by the term yv, h(x) can also be transformed into a polynomial h(x) = H(y)/yv, where H(y) is irreducible as it satisfies the criteria in Theorem 10, and hence h(x) is irreducible. The same can also be seen with g(x) as a special case of the proof of Theorem 12 given above for k = 0, and h(x) as a special case of the above proof with k = n, since in each case the second polynomial factor will need to be an n − k = 0th degree polynomial. Therefore, h(x) and g(x) cannot be further reduced.

Every polynomial in SM arises from a triangle with a rational value of cos θ, so that cos θ = α/c = p/qc = p/C where p and q are coprime. Moreover, we assume C, p 6≡ 0 (mod m), therefore m is coprime to both p and C.

2(m−1) m−1 m sm(C, p, x) = mC (x − 2p) + x (x − 2p) m−1 X m + C2(m−k)xk−1(x − 2p)k + 2Cmxm−1 − x2m−1, k k=2 (17) which upon some simplification becomes

2(m−1) 2 2m−3 m m m−1 m m−1 −sm(C, p, x) = 2mpx − 2m(m − 1)p x + ··· + 2 p x − 2C x m−1 X m − C2(m−k)xk−1(x − 2p)k − mC2(m−1)x + 2mC2(m−1)p. k k=2 (18)

m We observe in (18) that m is always a factor of k because m is odd prime. Therefore, the coefficient of every m m m−1 m m−1 power of x in −sm(C, p, x) is a multiple of m, except for 2 p x − 2C x , in which the coefficient is (2p)m − 2Cm, which does not have an explicit product with m. In addition to our assumption that C, p 6≡ 0 (mod m), let us also assume that C −p 6≡ 0 (mod m). From Theorem 11, Fermat’s (little) theorem, 2Cm ≡ 2C (mod m) and (2p)m ≡ 2p (mod m), therefore 2Cm − (2p)m ≡ 2(C − p)(mod m) 6≡ 0 (mod m) by assumption. Further, the coefficient of the leading term, x2(m−1), is 2mp 6≡ 0 (mod m2), and that of the 2(m−1) 2 constant term is 2mC p 6≡ 0 (mod m ). We then apply Theorem 12 to sm(C, p, x), and note that, if C, p, C − p 6≡ 0 (mod m), then from (18), sm(C, p, x) is either irreducible, or can be factored into a product of at most 2 polynomials of degree (m − 1), both of which are irreducible.

4.3. Proof of Proposition 2

The polynomial sm(C, p, x) in (18) along with Theorem 9 immediately implies the following very inter- esting result: Theorem 13. The prime factors of any of the smaller two sides of an integer triangle with a finite integer Fermat index must be the prime factors of (and only of) the product of the Fermat index, the hypotenuse, the numerator and the denominator of the projection of the hypotenuse on that side.

4.3.1. Necessary and sufficient conditions For every rational triangle (ar, br, cr), there exists a primitive integer triangle (a, b, c) ∼ (ar, br, cr). Since E ⊂ P2(R), for all triangles (ar, br, cr) ∈ τ(c, α), it is sufficient if proposition 2 is proved only for the corresponding primitive integer triangles (a, b, c) ∈ τ(c, α), as they are the same point in E, and E = S from Theorem 1. Combined with remark 2, we summarize our strategy for the proof of Proposition 2:

∵ E = S ⊂ P2(R), ρM ∩ Z = ∅ ∧ ρ4 ∩ Z = ∅,

=⇒ ρZ>2 ∩ Z = ∅, (19) =⇒ {ρ − ρ2} ∩ Q = ∅.

15 On Triangles and an Extended Fermat Equation Giri Prabhakar

According to Algorithm 2, therefore, we choose only positive integer values of the hypotenuse c without loss of generality, and traverse through all rational values of cosθ = α/c ∈ (0, π/2). Here there are two cases: α is either an integer, α = p (Case A), or a proper , α = p/q where p and q are positive , and q > 1 (Case B). Case A is in fact a special consequence of Case B with q = 1. However, Case A lends itself to a simpler approach, results from which are then used in Case B.

4.3.2. Case A: α = p, where p is an integer Set x = p+h, and q = 1, in (18), so that C = c. Without expanding the polynomial −sm(c, α, x), we find, by inspection, that it has integer coefficients, and a constant term 2mc2(m−1)p. According to Theorem 9 (the 2(m−1) rational root theorem), every integer root of sm(c, α, x) must necessarily be some factor of 2mc p. We will therefore consider each term and all combinations of the terms of 2mc2(m−1)p, and examine if they can be a root of (18). Refer to Fig. 2; firstly, no factor of p can be a root, since by construction, x = α + h > p (unless, of course, m = 2, in which case h = 0 as already discussed in remark 1). Replacing any proper factor of p with 2 will only lead to a number less than or equal to p; therefore, no proper factor of 2p can be a root of (18). Further, 2p itself cannot be a root unless m → ∞, because at h = p, the triangle T1(c, α) is isoceles, and φ → ∞ from Lemma 3. Hence, no factor of 2p can be an integer root of (18) for bounded values of m. The next possibility we consider is that the root is some factor of c. That this is not possible is seen by means of the following Lemma 14. The sides of a primitive integer triangle with an integer Fermat index are pairwise coprime. This is because for (1) with all variables as positive integers, a, b, and c must be pairwise coprime [3]. Lemma 14 shows that no factor of c can be a factor in an integer root of (1), and hence of sm(c, α, x), if such an integer root exists. We have thus far shown that no factor of 2c2(m−1)p can be a root. The remaining possibility is that the root is a factor of 2mp. Since we have already shown that no factor of 2p can be a root, and m is an odd prime, the only possibility in Case A is that m must be a factor of the integer root of sm(c, α, x), if such a root exists. We keep this possibility in mind, and then turn to Case B.

4.3.3. Case B: α = p/q, where p and q are coprime integers, and q > 1 A well known and basic result for (1) is the basis for the following ([3]) Lemma 15. In a primitive integer triangle (a, b, c) with integer Fermat index n, exactly two of sides a, b and c are odd, and the remaining side is even. If n is even, c must be odd. a2 + c2 − b2 p a2 + c2 − b2 p The integer q is a factor of a. This is because cos θ = = . Hence = , and p 2ac qc 2a q and q are coprime by definition. Since a, b and c are assumed integers, from the parity condition described by Lemma 15, two of the sides are odd while one is even, hence a2 + c2 − b2 is even. Thus, q must be a factor of a. Therefore, it will be assumed that, for some positive integer y,

x = qy. (20) p The polynomial s (c, p/q, x) for side a is obtained by setting x = + δ = qy in (15). u (c, p/q, x) = m q m p [c2 + x(x − 2 )]m − (cm − xm)2 = [c2 + y(yq2 − 2p)]m − (cm − qmym)2 q

m−1 X m = c2m + yk(yq2 − 2p)k + ym(yq2 − 2p)m − c2m − (yq)2m + 2cmymqm. (21) k k=1

Setting um(c, p/q, x) = −yvm(c, p, y) = 0 and discarding the trivial case y = 0, and after some simplifi- cation,

2(m−1) 2(m−1) 2 2(m−2) 2m−3 m m−1 m vm(c, p, y) = 2mpq y − 2m(m − 1)p q y + · · · − 2c y q (22) −mc2ym−2(yq2 − 2p)m−1 − · · · − yq2mc2(m−1) + 2mc2(m−1)p = 0. 16 On Triangles and an Extended Fermat Equation Giri Prabhakar

Let m X m χ (p, q, y) = mc2(m−1) + yk−1(yq2 − 2p)k−1, (23) m k k=2 and substitute χm(p, q, y) in (21) setting um(c, p/q, x) = 0, assuming the non-trivial solution y 6= 0, to get y(2p − yq2)χ(p, q, m, y) = ymqm(2cm − ymqm). (24)

The polynomial χm(p, q, y) is a nonzero integer when y 6= 0, and can be written in the form m X m χ (p, q, y) = mc2(m−1) + y yk−2(yq2 − 2p)k−1. (25) m k k=2 2 2 2 We will now establish a simple, but important relationship. From Fig. 2, we see that b = ha + δ = c2 − α2 + δ2, therefore (α + δ)(α − δ) = c2 − b2. (26) Applying (26) in (24), y(2p − yq2) = (yq)(2p/q − yq) = c2 − b2. (27) Substituting (27) in (24), and using (1) to set ymqm = cm −bm, one obtains the product (c2m −b2m)/(c2 −b2) on both sides of (24) as an identity. When normalized by b, we see that, since m is an odd integer, this th is the 2m cyclotomic polynomial Φ2m(b/c) = Φm(−b/c) [3]. Refer to (22). As in Case A, vm(c, p, y) is a polynomial with integer coefficients, which is verified by inspection. According to the Theorem 9 (the rational root theorem), any integer root of this polynomial will necessarily need to be a factor only of the constant term 2mc2(m−1)p. Again as in Case A, all possible combinations of the constant term are examined, and it is to be shown that no combination can be an integer root of vm(c, p, y), or alternatively, that vm(c, p, y) is irreducible. According to Remark 2 and Lemma 14, m is a factor of at most one of a, b or c. Let us first assume that m is a factor of a = yq; this implies that m can be a proper factor of y, or q, or both. We observe that, since q is a factor of a, it is coprime to c. Let us begin by assuming that m is a factor of both y and q, say mi and mj respectively, with i and j being positive integers. Then on the right hand side of (24), there is a power of m greater than or equal to mm(i+j). On the left hand side of the equation, we divide y(yq2 − 2p) by y, leaving behind (yq2 − 2p), and this leaves ym−1 on the right 2 m hand side. Since q is coprime to p, it is coprime to (yq − 2p). Therefore, q can only divide χm(p, q, y). Furthermore, (25) shows that, since m does not divide c, χm(p, q, y) yields a factor of m leaving behind the expression c2(m−1) +(y/m)[m(··· )+ym−2(yq2 −2p)m−1], which, upon applying Theorem 11, gives a residue of 1 modulo m. This means that none of the factors of mmj in qm can divide any expression on the left hand side of (24). Therefore, it is not possible that m is a factor of both y and q. Let us now consider that m is a factor of q and not of y. Then m cannot be a factor of p since p and q are coprime. Here, y is coprime m to m and c, and from (25), χm(p, q, y) 6≡ 0 (mod y). Therefore, y on the right hand side of (24) is coprime 2 2 to χm(p, q, y), and hence must divide y(2p − yq ). On the other hand, since q cannot divide y(2p − yq ), m 2 m q is coprime to y(2p − yq ). Therefore, q must divide χm(p, q, y) in (24), but the latter is coprime to m as (25) rearranged in this manner: mc2(m−1) + y[m(··· ) + ym−2(yq2 − 2p)m−1] shows. This contradicts the assumption that q is divisible by m, since qm must contain at least mm. We therefore conclude that q cannot have m as a proper factor, and if a is divisible by m, the only possibility is that y is divisible by m, and not q. As y is a proper factor of 2mc2(m−1)p, and we showed that q is coprime to c, p and m, therefore (as already known, in fact) q is coprime to y. The remaining possibilities are that y is either divisible by m, or not. In the latter case, y must be a factor of 2p that is coprime to m. Therefore, for the present, we shall defer the possibility that y is divisible by m. Unless stated otherwise, therefore, we assume in the following discussions that y is a factor of 2p coprime to m. If a = yq is to satisfy (22), then we must have ymqm = cm − bm. Had m been even, then clearly cm − bm ≡ 0 [mod (c2 − b2)], and when m is odd, with k a natural number such that 4k + 1 the greatest integer less than or equal to m, we have cm − bm = (c − b)[(c + b)(cm−2 + cm−4b2 + ··· + bm−4c2 + bm−2) + (−1)(m−4k−1)/2c(m−1)/2b(m−1)/2]. (28) 17 On Triangles and an Extended Fermat Equation Giri Prabhakar hence, (cm − bm) 6≡ 0 [mod (c2 − b2)]. Since qm is coprime to y(2p − yq2) = (c2 − b2), q is coprime to (c − b). m m m We showed earlier that, since y is coprime to χm(p, q, y), y is the common factor between c − b and c2 − b2, and must be a proper factor of y(2p − yq2) in 24. Hence

c − b = ym, (29) and m m−1 m−2 (m−1)/2 (m−1)/2 m−2 m−1 q = (c + c b + ··· + c b + ··· + cb + b ), ∴

(c − b)qm = cm − bm, (30) From (30) and Theorem 11 we see that

(c − b)(mod m)qm (mod m) ≡ (c − b)(mod m)q (mod m)

m m = [(c − b )](mod m) ≡ (c − b)(mod m), ∴,

q ≡ 1 (mod m) (31) The equations (30) and (31) are consistent with the observation that m cannot divide q. Recalling that m is an odd prime, and setting b as −b in (28) shows that c − b cannot divide 2cm − ymqm = cm + bm. This also implies that the factor (c + b) in y(2p − yq2) on the left hand side of (24) can only divide the term (2cm − ymqm) = (cm + bm) on the right hand side, since

cm + bm = (c + b)(cm−1 − cm−2b + cm−3b2 − · · · + c2bm−3 − cbm−2 + bm−1). (32) and since c and b are coprime to m, taking the modulus of m on both sides of (32)

[(cm + bm)/(c + b)] (mod m) ≡ 1 (mod m) (33)

Since a is now assumed not to be divisible by m,(c−b) is coprime to (cm−1 +cm−2b+···+c(m−1)/2b(m−1)/2 + ··· + cbm−2 + bm−1) [3]. Let p = fpgp (34) where fp and gp are positive integers, and let y = fp. Note from Lemma 14 that if y = fp, then fp must be coprime to c, and furthermore, if m is a factor of p, then from our assumptions so far, y can only be a factor of p/m, hence fp is coprime to m also. The assumption that a is not divisible by m leaves us with the possibilities that: either exactly one of b and c is divisible by m, or none of a, b and c are divisible by m.

Let us first consider the case that none of a, b, and c being divisible by m. Since y = fp 6≡ 0 (mod m) as assumed, from Theorem 11, ym ≡ y (mod m). From (29)

c − b ≡ y (mod m), (35) and from (27) this implies that

2 2 c + b ≡ (2p − yq )(mod m) ≡ (2p − y)(mod m) ∵ q (mod m) ≡ q (mod m) ≡ 1 (mod m), hence c + b ≡ 2p − y (mod m) (36) and from (35), (36), 2c ≡ 2p (mod m), and we have

c ≡ p (mod m). (37)

18 On Triangles and an Extended Fermat Equation Giri Prabhakar

We recall that the projection of c on b is r/s. Equation (26) also applies with side b as the base (which is the triangle from the permutation P12(a, b, c) = (b, a, c)). Let

r = frgr (38) just as in (34). The assumption b = frs (where fr is an integer factor of r), leads to the set of equations (24) - (36), resulting in c ≡ r (mod m). In this case, too, we assume that m is not a factor of b, hence fr and s. We thus have c ≡ p (mod m) ≡ r (mod m) (39) We will now rewrite (21) by using the relations (27) with (26).

2 2 m m m m 2 um(c, p/q, x) = [c + y(yq − 2p)] − (c − q y ) = [c2 − (p/q − δ)(p/q + δ)]m − [cm − (p/q + δ)m]2, with z = qδ, (40) = (1/q2m){[q2c2 − (p − z)(p + z)]m − [qmcm − (p + z)m]2},

2m and let wm(c, p, q, z) = q um(c, p/q, x) so that

2 2 2 2 m m m m 2 wm(c, p, q, z) = [q c − p + z ] − [q c − (p + z) ] m X m (41) = (q2c2 − p2)m−kz2k − [q2mc2m + (p + z)2m − 2qmcm(p + z)m], k k=0 where [q2mc2m + (p + z)2m − 2qmcm(p + z)m]

2m m−1 X 2m X m = q2mc2m + p2m + p2m−kzk − 2qmcmpm − 2qmcm pm−kzk − 2qmcmzm k k k=1 k=1 (42) 2m m−1 X 2m X m = (qmcm − pm)2 + p2m−kzk − 2qmcm pm−kzk − 2qmcmzm. k k k=1 k=1 Substituting (42) in (41) we get

2 2 2 2 m m m m 2 wm(c, p, q, z) = [q c − p + z ] − [q c − (p + z) ] m−1 X m = (q2c2 − p2)m − (qmcm − pm)2 + (q2c2 − p2)m−kz2k k k=1 (43) 2m−1 m−1 X 2m X m − p2m−kzk + 2qmcm pm−kzk + 2qmcmzm. k k k=1 k=1 As shown by considerations leading up to (37), since a, b 6≡ 0 (mod m), c ≡ p (mod m) regardless of whether c is divisible by m or not. Therefore, along with (31) we see that (q2c2 − p2) ≡ (qmcm − pm) ≡ 0 (mod m). 2 Then the polynomial wm(c, p, q, z) modulo m is given by

2 wm(c, p, q, z)(mod m ) = m−1 2m−1 X m X 2m (44) zω (c, p, q, z) = 2qmcm pm−kzk − p2m−kzk + 2qmcmzm. m k k k=1 k=1

Assuming a nontrivial solution so that z 6= 0, ωm(c, p, q, z) is polynomial of degree 2(m − 1), the coefficients of which are integers as can be verified by inspection. The coefficient of the (m − 1)th power of z, 2qmcm, is not divisible by m, and all the other coefficients are divisible by m. Since m is an odd prime, no 2 coefficient in ωm(c, p, q, z) is divisible by m . Therefore, ωm(c, p, q, z) satisfies the conditions of Theorems 19 On Triangles and an Extended Fermat Equation Giri Prabhakar

10 and 12, and thus is reducible at most to two eisenstein polynomials each of degree (m − 1), both of which are irreducible in Z(x). Since wm(c, p, q, z) is also a polynomial of degree 2(m − 1) as seen in 43, it therefore cannot be reduced over the finite field Zm2 to more than two polynomials of equal degree (m − 1), which therefore implies that it cannot be reduced over Z [35] to more than two polynomials of equal degree (m − 1). Hence, sm(c, p/q, y) cannot be reduced to more than two eisenstein polynomials of equal degree (m − 1) in Z, with the assumption (34). In the preceding analysis, we assumed that c was not divisible by m. Now let us assume that c is divisible by m. In particular, let mi be the greatest power m m of m that divides c, where i ∈ Z>0. Together with (1) this implies that a + b must also be divisible mi by exactly m , and no higher or lower power of m. Moreover, from (11), a ≡ −b (mod m) = δm. Given mi mi integers k1, k2, k3 6≡ 0 (mod m), a and b must be of the form k1m + δm and k2m − δm respectively, and i m m mi m−1 m−1 mi m−1 m−1 c = k3m , so that a + b = m [(k1 + k2 )(m ) + ··· + (k1 + k2)δm ]. Let us scale (a, b, c) by the factor 1/mi, so that (a0, b0, c0) = (a/mi, b/mi, c/mi) ∼ (a, b, c). From Heron’s formula of the area of triangle (a, b, c) [2], A = ps(s − a)(s − b)(s − c) with the s = (a + b + c)/2, we see that i (m−1)i factors s and s − c each have m as a proper factor, leaving behind the numerator [m (k1 + k2) ± k3] i i mi which is coprime to m , while the factors s − a and s − b are of the form [k3m ± (m (k1 − k2) + 2δm)], which is also coprime to mi. Hence A = miA0 where A0 is the area of the triangle formed by (a0, b0, c0). However, qA = (1/2)(a)(pq2c2 − p2) and since a 6≡ 0 (mod m), pq2c2 − p2 = mipq2c02 − p02, where c ≡ p (mod m) from (39), and hence qc ± p are divisible by mi. Now pq2c02 − p02 6≡ 0 (mod m) as shown by the area A0 using Heron’s formula (with no factor of m occurring under the of A0). Moreover, 2 p = [c + (a − b)(a + b)]/(2fp), from which we see that the highest power of m which is a factor of p, is 2i 0 i i 02 0 0 0 0 i 0 m . Then p = p/(m ) = (m )[c + (a − b )(a + b )]/(2fp)] has a factor of (m ), while c does not have any factors of m, therefore rendering qc0 − p0 6≡ 0 (mod m) and together with q ≡ 1 (mod m), C0 = qc0, we get 0 0 0 0 0 0 C 6≡ p (mod m). Then we see from (18) that sm(C , p , y) has all coefficients divisible by m except C , p 0 0 2 0 0 and C − p , and no cofficient divisible by m . Therefore, from Theorem 12, sm(C , p , y) cannot be reduced beyond a product of two polynomials both of degree (m − 1), and hence in Q[x]. Thus, by Gauss’s Lemma (8), with C = qc, sm(C, p, y) cannot be reduced in Q[x] to more than two polynomials of degree (m − 1) each. This therefore implies that when a and b are not divisible by m, (34) and (38) cannot hold, regardless of whether c is divisible by m or not. Let us also examine the possibility that y contains the factor 2, and assume that c is not divisible by m. Refer to (25); if any other proper factor of y apart from 2 divides mc2(m−1), then it either contains m or a factor of c. Since Lemma 14 shows that the latter is not possible, y must either contain m as a proper factor, or y = 2. If the latter were the case, then y cannot divide χm(p, q, y): m is an odd prime, and the factor mc2(m−1) would be divisible by 2, only if c were even. From Lemma 15, this is not possible unless b is also even (a is already even given our assumption that y contains 2 as a factor), which means that the triangle formed by a, b and c is not primitive, contradicting our assumption. Therefore, we either have y = 2fp, or y = 2. In either case, the analysis following (25) must hold, and from (41) - (43), 2 cannot be a factor of y. On the other hand, if y contains the factor 2, and c is divisible by m, the only options left for side b is to take either the value 2 or m as a factor, in either case of which it is not coprime to a or c respectively, both of which, from Lemma 14, are not possible. The only remaining possibility to consider is that y = 1. This means, from (20), that a = q. Since a2 + c2 − b2 p = , a = q implies that a has no common factors with a2 + c2 − b2 (note that if (a, b, c) satisfy 2a q (1) for m, a2 + c2 − b2 is always even, so that 2 in the denominator is factored out). This in turn implies that a has no common factors with c2 − b2, and hence, with c − b. On the other hand, we have assumed am = cm − bm = (c − b)(cm−1b + cm−2b2 + ··· + cbm−2 + bm−1), and hence c − b and am (and hence a) must have common factors, which contradicts the earlier conclusion that a has no common factors with c − b. Therefore, y cannot be 1. The preceding considerations eliminate cases in which c is divisible or not by m. Carrying out our analysis according to Algorithm 2, we will encounter both triangles (a, b, c) and P12(a, b, c) = (b, a, c). Then, the same reasoning applied to side a in Cases A and B will be applied to side b. The analysis for the case of b being divisible by m is therefore essentially identical to that in the case of a being divisible by m. As explained earlier, sides a and b can belong to Cases A and B in the following

20 On Triangles and an Extended Fermat Equation Giri Prabhakar manner: (i) a, b ∈ Case A, (α = p and β = r) (ii) a, b ∈ Case B, (α = p/q and β = r/s), and (iii) a (or b) ∈ Case A and b (or a) ∈ Case B.

In both cases A and B, it has been shown that no factor of 2mc2(m−1)p can be an integer solution to (22), except possibly in the case that both a and b are divisible by m, which contradicts remark 2 and Lemma (14). Consequently, the algebraic sets of sm(C, p, x) have an empty intersection with the set of integers: ∀ m, ρm(c, α) ∩ Z = ∅.

Corollary 2. The algebraic set of s4(C, p, x), with C = qc, and c, p, q ∈ Z>0 has an empty intersection with the set of integers: ρ4 ∩ Z = ∅ Proof. As usual, we assume a primitive triangle (a, b, c) with an integer hypotenuse c and a rational value of cos θ (and hence α).

2 4 4 4 2 u4(c, α, x) = [c + x(x − 2α)] − [c − x ]

= {[c2 + x(x − 2α)]2 − [c4 − x4]}{[c2 + x(x − 2α)]2 + [c4 − x4]} = {c4 + x2(x − 2α)2 + 2c2x(x − 2α) − c4 + x4}{c4 + x2(x − 2α)2 + 2c2x(x − 2α) + c4 − x4} = {x2(x2 + 4α2 − 2xα) + 2c2x2 − 4c2αx + x4}{2c4 + x2(x2 + 4α2 − 2xα) + 2c2x2 − 4c2αx − x4} = {2x4 + 2(2α2 + c2)x2 − 2αx3 − 4c2αx}{2c4 + 2(2α2 + c2)x2 − 2αx3 − 4c2αx} = −4x[x3 − 2αx2 + (2α2 + c2)x − 2c2α][αx3 − (2α2 + c2)x2 + 2c2αx − c4], which, upon assuming α = p/q, setting x = qy,

= −4qy{q3y3−2(p/q)q2y2+[2(p/q)2+c2]qy−2c2(p/q)}

{(p/q)3q3y3 − [2(p/q)2 + c2]q2y2 + 2c2(p/q)qy − c4}, = −4y[q4y3−2pq2y2+(2p2+q2c2)y−2c2p][p3y3−(2p2+q2c2)y2+2c2y−c4]. th Therefore u4(c, α, x) = −4ys4(c, p, y) = −4yh(y)g(y), where s4(c, p, y) is a 6 degree polynomial, that is factored into two 3rd degree polynomials, h(y) and g(y). From Lemma 14, the second polynomial, g(y), cannot have an integer root since the only possibility is that it is a factor of c4. However, g(y) is cubic and hence should have either one or three real roots, any one of which is therefore irrational; in which case h(y) cannot also have an integer root, since s4(c, p, y) can only have 2 real roots, and the second non-trivial root 2 ∗ ∗ ∗ of s4(c, p, y) is c /x , where x = qy is the first non-trivial root, as shown in Sect. 3.1. Theorem 16. In a triangle (a, b, c) with an integer hypotenuse c and an integer Fermat index n, the following relationships hold:

(i) if at least one of the polynomials sn(c, α, x) or sn(c, β, x) has rational coefficients, then both the sides a and b must be irrational; and

(ii) if at least one of the sides a or b is rational, then both the polynomials sn(c, α, x) and sn(c, β, x) have irrational coefficients.

Proof. From (26), for side a, x(2α − x) = c2 − b2, which is a quadratic equation that yields x = α ± pα2 − (c2 − b2).

p 2 2 2 Theorem 17. (Radical conjugate roots [36]) If α ∈ Q and α + α − (c − b ) is a root of sn(c, α, x), then α − pα2 − (c2 − b2) is also be a root of the polynomial. 21 On Triangles and an Extended Fermat Equation Giri Prabhakar

Let g(x) = [x − (α + pα2 − (c2 − b2))][x − (α − pα2 − (c2 − b2))] = (x − α)2 − (α2 − (c2 − b2))2. p 2 2 2 Let sn(c, α, x) = g(x)f(x) + z(x). Then if sn(c, α, α + α − (c − b )) = 0, g(x) = 0, hence z(x) = p 2 2 2 z1(α + α − (c − b )) + z2 = 0 where z1, z2 ∈ Q =⇒ z1 = z2 = 0 =⇒ z(x) = 0, hence g(x) is a factor of p 2 2 2 sn(c, α, x), thus α − α − (c − b ) is also a root. However, Theorem 17 cannot be applicable to sn(c, α, x) when α ∈ Q, since there cannot be two distinct real nth roots of a real number. The situation can only be resolved if one or both of α2 and b2 are irrational. (In this way, the product (y + α + pα2 − (c2 − b2))(y + α − pα2 − (c2 − b2)) = (y + α)2 − (α2 − (c2 − b2)) is still irrational, and Theorem 17 is not applicable.) If sn(c, α, x) has rational coefficients, then α is rational, hence b must be irrational, and hence a is also irrational, which is confirmed from Theorem 18. (However, cos θ = α/c could be rational, which is possible since cos θ = (a2 + b2 − c2)/2ac, and both a and b are irrational, and this could also be true of cos λ = β/c for the same reason.) On the other hand, if a were rational, then from Theorem 18, it follows that either the Fermat index of the triangle is not an integer, or if it is an integer n, then sn(c, α, x) cannot have rational coefficients, and since c is an integer, α must be irrational. Since from (26) a(2α − a) = c2 − b2, and a is rational while α is irrational, b must be irrational. But this could mean that sn(c, β, x) might have rational coefficients. If so, then β is rational. But that would mean that sn(c, β, x) has two distinct roots, β + pβ2 − (c2 − a2), and β2 − pβ2 − (c2 − a2), which is not possible. Therefore, β must also be irrational, and hence sn(c, β, x) must also have irrational coefficients. Theorem 18. A non-degenerate oblique rational triangle cannot have an integer Fermat index. Proof. The proof follows from Proposition 2, Corollary 2 and (19).

5. Conclusions

The strong relationship between elliptic curves, triangles and the Fermat equation has led us to discover that the sides of any triangle is alternately described as real a analytic variety of an extension of the Fermat equation (leading us therefore to regard triangles as real analytic varieties of the extended Fermat equation). Equating the Fermat and Pythagorean representations of triangles, we arrive at some interesting results: the Fermat index partitions triangles, with its value lying between 1 and 2 for obtuse triangles, 2 for right triangles and greater than 2 for acute triangles, becoming unbounded for isoceles triangles. The polynomials that result from integer values of the Fermat index also yield important (and to the best of our knowledge, new) insights: the smaller sides of a primitive integer triangle with an integer Fermat index (should it exist) must necessarily have factors only from the hypotenuse and its projections on the respective side, and the Fermat index itself. We also present an extension of the Schoenemann-Eisenstein irreducibility theorem, and a simple proof that there cannot exist a rational triangle with Fermat index 4. In fact, there cannot exist an oblique non-degenerate rational triangle with an integer Fermat index. The relationship between Frey-Hellegouarch curves and the extended Fermat equation is also a potentially interesting area of exploration.

References

1. Maor E. The Pythagorean Theorem: A 4,000-year history. Princeton Univ Press 2007;:1–45. 2. Keith K. Is a 2000-Year-Old formula still keeping some secrets? Am Math Monthly 2000;107:402–15. 3. Edwards HM. Fermat’s Last Theorem: A genetic introduction to algebraic number theory. Graduate Texts in Mathematics, Springer-Verlag, New York 2000;: v – ix, 1–3. 4. Koblitz N. Introduction to Elliptic Curves and Modular Forms. Springer, 2nd Ed 1993;. 5. Mordell LJ. Diophantine Equations. Academic Press, New York 1969;:1–280. 6. Tunnell J. A classical Diophantine problem and modular forms of weight 3/2. Invent Math 1983;72(2):323–34. 7. Ono T. Triangles and elliptic curves. Proc Jpn Acad A-Math 1994;70(4):106–8. 8. Hellegouarch Y. Points d’ordre 2ph sur les courbes elliptiques. Polska Akademia Nauk Instytut Matematyczny Acta Arithmetica 1974;26(3):253–63. 9. Frey G. Links between stable elliptic curves and certain Diophantine equations. Ann Univ Saraviensis, Series Mathemat- icae 1986;1(1):1–40. 10. Hellegouarch Y. Invitation to the mathematics of Fermat-Wiles. Academic Press, Boston, MA 2002;.

22 On Triangles and an Extended Fermat Equation Giri Prabhakar

11. Mazur B. Number theory as gadfly. Am Math Monthly 1991;98(7):593–610. 12. Ribet AK. On modular representations of Gal(Q/Q) arising from modular forms. Invent Math 1990;100(2):431–76. 13. Serre JP. Sur les reprsentations modulaires de degr 2 de Gal(Q/Q). Duke Math Journal 1987;54(1):179–230. 14. Shimura G. Yutaka Taniyama and his time. Very personal recollections. Bull London Math Soc 1989;21(2):186–96. 15. Wiles A. Modular elliptic curves and Fermat’s Last Theorem. Ann Math 1995;142:443–551. 16. Eisenstein G. ber die Irredicibilitt une einige andere Eigenschaften der Gleichung von welche der Theilung der ganzen Lemniscate abhngt. J reine angew Math, Walter de Gruyter, Germany 1850;39:160–79. 17. Gauss CF. Disquisitiones Arithmeticae, Article 42. tr Arthur A Clarke, Yale University Press 1965;157. 18. Sir Heath TL. The Thirteen Books of Euclid’s Elements, Second Edition. Dover Publications, New York 1925;1:286–7. 19. Barany MJ. Stuck in the middle: Cauchy’s Intermediate Value Theorem and the history of analytic rigor. Notices Amer Math Soc 2013;60(10):1334–8. 20. Sastry S. Engineering Mathematics. PHI Learning 2004;:49. 21. Sastry S. Engineering Mathematics. PHI Learning 2004;:72–3. 22. Latif A. Banach contraction principles and its generalizations. Almezel S, Ansari Q and Khamsi M (Eds), Topics in Fixed Point Theory, Springer International Publishing, Switzerland 2014;:33–64. 23. Harzheim E. Ordered Sets. Springer 2006;:86–8. 24. Maor E. Trigonometric Delights. Princeton Univ Press 2013;:216. 25. de Oliviera ORB. The Fundamental Theorem of Algebra: from the four basic operations. Am Math Monthly 2012;119:753– 8. 26. LLC WA. Wolfram—Alpha. https://wwwwolframalphacom/input/?i=solve+(c%5E2%2Bx(x-+2(alpha)))%5En-(c%5En- x%5En)%5E2+%3D+0+for+c%3D15,alpha%3D7,n%3D7 2017;. 27. Wikipedia . Rational Root Theorem 2017;URL: https://en.wikipedia.org/wiki/Rational_root_theorem. 28. King JD. Integer roots of polynomials. Math Gazette 2006;:455–6. 29. Dorwart H. Irreducibility of polynomials. Am Math Monthly 1935;42 (6):369–81. 30. Wikipedia . Eisenstein’s Criterion 2017;URL: https://en.wikipedia.org/wiki/Eisenstein%27s_criterion. 31. Stewart I. Galois Theory. CRC Press, Boca Raton, FL 2015;:55–6. 32. Pettofrezzo A, Byrkit DR. Elements of Number Theory. Prentice Hall, Englewood Cliffs 1970;:110–1. 33. Edwards HM. Fermat’s Last Theorem: A genetic introduction to algebraic number theory. Graduate Texts in Mathematics, Springer-Verlag, New York 2000;:9–10. 34. Edwards HM 2000;:61–5. 35. Thangadurai R. Irreducibility of polynomials whose coefficients are integers. Math Newsletter, Ramanujan Mathematical Society 2007;17 (2):29–37. 36. Sastry S. Engineering Mathematics. PHI Learning 2004;:68.

23