{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe argue by [[infinite descent|0EFYCFHYFG]]: we take a solution with smallest $x$ and build a smaller one.\n\n**Lemma.** If pairwise [[coprime|0GFKP8F8AG]] positive integers $u_1, \\dots, u_r$ have a square product, then each $u_i$ is a square.\n\n1. Let $p$ be a prime and $\\nu_p$ the [[p-adic valuation|04VCPS30ZE]]. By the [[valuation of a product|0850JJMJYZ]], $\\sum_i \\nu_p(u_i)$ is even. At most one $u_i$ is divisible by $p$, so each $\\nu_p(u_i)$ is even.\n2. By the [[fundamental theorem of arithmetic|084HH1NDCB]], each $u_i$ is the square of $\\prod_p p^{\\nu_p(u_i)/2}$.\n\n**The equation $x^4 - y^4 = z^2$ has no solution in positive integers.**\n\n3. Suppose there are solutions. By the [[well-ordering principle|01BX15HSRR]], choose one with $x$ smallest.\n4. If a prime $q$ divides $x$ and $y$, then $q^4 \\mid z^2$. So $2\\nu_q(z) \\ge 4$, and $q^2 \\mid z$. Then $(x/q, y/q, z/q^2)$ is a solution with smaller $x$. So $\\gcd(x, y) = 1$.\n5. Now $(y^2)^2 + z^2 = (x^2)^2$. A prime dividing $y^2$ and $x^2$ divides $y$ and $x$ by [[Euclid's lemma|051VYKA1EX]]. So this [[Pythagorean triple|01G1WY1GVX]] is primitive.\n6. Case 1: $y$ odd. In a primitive triple not both legs are odd, since a sum of two odd squares is $2$ modulo $4$. As $y^2$ is odd, $z$ is even.\n7. So by the [[classification of Pythagorean triples|0KF3J2KAER]] with $b = z$, there are coprime $m \u003e n \\ge 1$ with $y^2 = m^2 - n^2$, $z = 2mn$ and $x^2 = m^2 + n^2$.\n8. Then $m^4 - n^4 = (m^2 - n^2)(m^2 + n^2) = (xy)^2$. So $(m, n, xy)$ is a solution in positive integers.\n9. But $m^2 \u003c m^2 + n^2 = x^2$, so $m \u003c x$. This contradicts the choice of $x$.\n10. Case 2: $y$ even. Then $z$ is odd, since a primitive triple has not both legs even. So the classification with $b = y^2$ gives coprime $m \u003e n \\ge 1$, with $m - n$ odd, such that $z = m^2 - n^2$, $y^2 = 2mn$ and $x^2 = m^2 + n^2$.\n11. Exactly one of $m, n$ is even. Call it $e$ and the other one $o$. Then $o^2 + e^2 = x^2$, and this triple is primitive because $\\gcd(m, n) = 1$.\n12. By the classification with $b = e$, there are coprime $g \u003e h \\ge 1$ with $o = g^2 - h^2$, $e = 2gh$ and $x = g^2 + h^2$.\n13. Then $y^2 = 2oe = 4gh(g^2 - h^2)$, so $gh(g^2 - h^2) = (y/2)^2$ is a square.\n14. The factors $g$, $h$ and $g^2 - h^2$ are pairwise coprime. Indeed, a prime dividing $g$ and $g^2 - h^2$ divides $h^2$, hence $h$; similarly for $h$.\n15. By the lemma, $g = X^2$, $h = Y^2$ and $g^2 - h^2 = Z^2$ with positive integers $X, Y, Z$. Hence $X^4 - Y^4 = Z^2$.\n16. But $X \\le X^2 = g \\le g^2 \u003c g^2 + h^2 = x$. This contradicts the choice of $x$.\n17. Both cases are impossible. So $x^4 - y^4 = z^2$ has no solution in positive integers.\n\n**No right triangle with integer sides has square area.**\n\n18. Suppose a right triangle has integer legs $a, b$, integer hypotenuse $c$, and area $ab/2 = d^2$ with $d$ a positive integer. By the [[Pythagorean theorem|0VP3A1290K]], $a^2 + b^2 = c^2$.\n19. Then $c^4 - (2ab)^2 = (a^2 + b^2)^2 - 4a^2b^2 = (a^2 - b^2)^2$, and $2ab = 4d^2$. So $c^4 - (2d)^4 = (a^2 - b^2)^2$.\n20. If $a = b$, then $a^2 = 2d^2$. The exponent of $2$ in $a^2$ is even and in $2d^2$ is odd, which is impossible. So $a \\ne b$.\n21. Then $(c, 2d, \\abs{a^2 - b^2})$ is a positive solution of $x^4 - y^4 = z^2$, which contradicts step 17.\n22. Conversely, let $(x, y, z)$ be a positive solution. Put $L_1 = x^4 - y^4 = z^2$, $L_2 = 2x^2y^2$ and $L_3 = x^4 + y^4$. Then $L_1^2 + L_2^2 = L_3^2$.\n23. The triangle with vertices $(0, 0)$, $(L_1, 0)$ and $(0, L_2)$ in $\\R^2$ has a right angle at the origin, sides $L_1, L_2, L_3$, and area $L_1 L_2 / 2 = (xyz)^2$. So the two forms of the statement are equivalent, and both hold.\n\n## Idea\n\nA solution of $x^4 - y^4 = z^2$ gives a Pythagorean triple with legs $y^2$ and $z$. Parametrizing it, and if needed a second triple, produces a new solution with a smaller $x$. An infinite decreasing chain of positive integers is impossible, so there is no solution, and a right triangle with square area would give one.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11D25"
    ],
    "name": "Proof of Fermat's right triangle theorem by infinite descent",
    "proves": "086BE0J3FZ",
    "sources": [
      {
        "locator": "Fermat's proof",
        "url": "https://en.wikipedia.org/wiki/Fermat%27s_right_triangle_theorem"
      }
    ],
    "tag": "8195EFVX2N",
    "uses": [
      "01G1WY1GVX",
      "0KF3J2KAER",
      "0EFYCFHYFG",
      "01BX15HSRR",
      "0GFKP8F8AG",
      "051VYKA1EX",
      "04VCPS30ZE",
      "0850JJMJYZ",
      "084HH1NDCB",
      "0VP3A1290K"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/8195EFVX2N/",
  "links": [
    {
      "field": "proves",
      "target": "086BE0J3FZ"
    },
    {
      "field": "uses",
      "target": "01G1WY1GVX"
    },
    {
      "field": "uses",
      "target": "0KF3J2KAER"
    },
    {
      "field": "uses",
      "target": "0EFYCFHYFG"
    },
    {
      "field": "uses",
      "target": "01BX15HSRR"
    },
    {
      "field": "uses",
      "target": "0GFKP8F8AG"
    },
    {
      "field": "uses",
      "target": "051VYKA1EX"
    },
    {
      "field": "uses",
      "target": "04VCPS30ZE"
    },
    {
      "field": "uses",
      "target": "0850JJMJYZ"
    },
    {
      "field": "uses",
      "target": "084HH1NDCB"
    },
    {
      "field": "uses",
      "target": "0VP3A1290K"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/8195EFVX2N.md",
  "msc": [
    "11D25"
  ],
  "name": "Proof of Fermat's right triangle theorem by infinite descent",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/819/8195EFVX2N.md",
  "status": null,
  "tag": "8195EFVX2N",
  "uri": "m2://8195EFVX2N",
  "url": "https://math2.tamnd.com/wiki/proof-of-fermats-right-triangle-theorem-by-infinite-descent/",
  "writing": {
    "tag": "8195EFVX2N",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
