{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nEach natural number $n$ is a sum of four squares of integers: $n = a^2 + b^2 + c^2 + d^2$ for some integers $a$, $b$, $c$ and $d$.\n\n## Remarks\n\nFor example, $7 = 4 + 1 + 1 + 1$ and $15 = 9 + 4 + 1 + 1$.\nThree squares are not enough: $7$ is not a sum of three squares, by [[Legendre's three-square theorem|0B64Q7XNE3]].\nBy [[Euler's four-square identity|08WTN6SCQ6]], it is enough to prove the theorem for primes.\nOther proofs use [[Minkowski's theorem|0K387S2PKQ]] or the Hurwitz quaternions.\n\n## History\n\nDiophantus knew examples, and Bachet stated the theorem in his Latin translation of the Arithmetica of 1621.\nLagrange gave the first proof in 1770.\n\n## Explanations\n\n### L1 human\n\nEvery whole number is a sum of at most four perfect squares, if you allow $0$ as a square.\nSome numbers, such as $7$, $15$ and $23$, need all four.\n",
  "commit": "6ac761d40018146541484a9e8b9eafd6ecc303dc",
  "front": {
    "kind": "statement",
    "msc": [
      "11E25"
    ],
    "name": "Lagrange's four-square theorem",
    "role": "theorem",
    "same_as": {
      "wikidata": "Q756946",
      "wikipedia": "Lagrange's four-square theorem"
    },
    "sources": [
      {
        "locator": "lead section",
        "url": "https://en.wikipedia.org/wiki/Lagrange%27s_four-square_theorem"
      },
      {
        "locator": "Historical development",
        "url": "https://en.wikipedia.org/wiki/Lagrange%27s_four-square_theorem"
      }
    ],
    "tag": "0KYYSMEVHH",
    "uses": [
      "08WTN6SCQ6"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0KYYSMEVHH/",
  "links": [
    {
      "field": "uses",
      "target": "08WTN6SCQ6"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0KYYSMEVHH.md",
  "msc": [
    "11E25"
  ],
  "name": "Lagrange's four-square theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0KY/0KYYSMEVHH.md",
  "status": null,
  "tag": "0KYYSMEVHH",
  "uri": "m2://0KYYSMEVHH",
  "url": "https://math2.tamnd.com/wiki/lagranges-four-square-theorem/",
  "writing": {
    "tag": "0KYYSMEVHH",
    "kind": "statement",
    "level": "W1",
    "next": [
      {
        "what": "edge about out",
        "note": "the concepts that the statement is about",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge proves in",
        "note": "at least one proof node",
        "have": 0,
        "want": 1
      },
      {
        "what": "edge instance_of or illustrates in",
        "note": "one example that shows the statement at work",
        "have": 0,
        "want": 1
      },
      {
        "what": "explanation L2",
        "have": 0,
        "want": 1
      }
    ]
  }
}
