{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe argue by cases on whether $p$ divides $a$.\n\n1. Let $p$ be a [[prime number|0SN0MAEKYX]] and let $a$ be an integer.\n2. Case $p \\mid a$. Write $a = p s$ with an integer $s$. Since $p \\ge 2$, we have $a^p - a = p s (a^{p-1} - 1)$.\n3. So $p$ [[divides|096PW7Q014]] $a^p - a$, and $a^p \\equiv a \\pmod p$ by the definition of [[congruence|0TPW25CBN6]].\n4. Case $p \\nmid a$. By [[Fermat's little theorem|0M25PRN3WQ]], $a^{p-1} \\equiv 1 \\pmod p$.\n5. Since $a \\equiv a \\pmod p$, [[compatibility with multiplication|072D5G4SK6]] gives $a^{p-1} \\cdot a \\equiv 1 \\cdot a \\pmod p$, that is, $a^p \\equiv a \\pmod p$.\n6. In both cases, $a^p \\equiv a \\pmod p$.\n\n## Idea\n\nWhen $p$ divides $a$, both sides are multiples of $p$. Otherwise, multiply Fermat's congruence $a^{p-1} \\equiv 1$ by $a$.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "methods": [
      "0WCP0PVET6"
    ],
    "msc": [
      "11A07"
    ],
    "name": "Proof of Fermat's little theorem in the form a^p = a",
    "proves": "0BMXWXDVJZ",
    "sources": [
      {
        "locator": "lead section",
        "url": "https://en.wikipedia.org/wiki/Fermat%27s_little_theorem"
      }
    ],
    "tag": "ETNHNE0358",
    "uses": [
      "0M25PRN3WQ",
      "0SN0MAEKYX",
      "0TPW25CBN6",
      "096PW7Q014",
      "072D5G4SK6"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/ETNHNE0358/",
  "links": [
    {
      "field": "proves",
      "target": "0BMXWXDVJZ"
    },
    {
      "field": "uses",
      "target": "0M25PRN3WQ"
    },
    {
      "field": "uses",
      "target": "0SN0MAEKYX"
    },
    {
      "field": "uses",
      "target": "0TPW25CBN6"
    },
    {
      "field": "uses",
      "target": "096PW7Q014"
    },
    {
      "field": "uses",
      "target": "072D5G4SK6"
    },
    {
      "field": "methods",
      "target": "0WCP0PVET6"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/ETNHNE0358.md",
  "msc": [
    "11A07"
  ],
  "name": "Proof of Fermat's little theorem in the form a^p = a",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/ETN/ETNHNE0358.md",
  "status": null,
  "tag": "ETNHNE0358",
  "uri": "m2://ETNHNE0358",
  "url": "https://math2.tamnd.com/wiki/proof-of-fermats-little-theorem-in-the-form-a-p-a/",
  "writing": {
    "tag": "ETNHNE0358",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
