{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe use the well-ordering principle. Let $\\Z$ be the [[ring of integers|0JHM6JK7FD]].\n\n1. The ring $\\Z$ is commutative and $1 \\neq 0$. If $a \\neq 0$ and $b \\neq 0$, then $\\abs{a b} = \\abs{a} \\abs{b} \\ge 1$, so $a b \\neq 0$. So $\\Z$ is an [[integral domain|09S3PFBEPM]].\n2. For $n \\neq 0$, $\\delta(n) = \\abs{n}$ is a natural number. So $\\delta$ is a function $\\Z \\setminus \\set{0} \\to \\N$.\n3. Let $a, b \\in \\Z$ with $b \\neq 0$. Let $S = \\set{a - b q : q \\in \\Z} \\cap \\N$, where $\\N$ contains $0$.\n4. Let $q_0 = -\\abs{a}$ if $b \u003e 0$ and $q_0 = \\abs{a}$ if $b \u003c 0$. In both cases $b q_0 = -\\abs{a} \\abs{b}$.\n5. Then $a - b q_0 = a + \\abs{a} \\abs{b} \\ge a + \\abs{a} \\ge 0$, because $\\abs{b} \\ge 1$. So $a - b q_0 \\in S$, and $S$ is nonempty.\n6. By the [[well-ordering principle|01BX15HSRR]], $S$ has a least element $r$. Write $r = a - b q$ with $q \\in \\Z$, so $a = b q + r$ and $r \\ge 0$.\n7. Suppose that $r \\ge \\abs{b}$. Let $e = 1$ if $b \u003e 0$ and $e = -1$ if $b \u003c 0$, so that $b e = \\abs{b}$.\n8. Then $a - b (q + e) = r - \\abs{b} \\ge 0$, so $r - \\abs{b} \\in S$. But $r - \\abs{b} \u003c r$, because $\\abs{b} \\ge 1$. This contradicts the choice of $r$.\n9. Hence $0 \\le r \u003c \\abs{b}$. This proves the division with remainder in the statement.\n10. If $r \\neq 0$, then $\\delta(r) = r \u003c \\abs{b} = \\delta(b)$. So $r = 0$ or $\\delta(r) \u003c \\delta(b)$.\n11. By steps 1, 2 and 10, $\\Z$ is a [[Euclidean domain|0GJ2HRG95T]] with Euclidean function $\\delta(n) = \\abs{n}$.\n\n## Idea\n\nAmong all the nonnegative numbers $a - b q$, take the smallest one. If it were at least $\\abs{b}$, we could subtract $\\abs{b}$ once more and stay nonnegative, which would give a smaller one. So the smallest one is less than $\\abs{b}$.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "11A05"
    ],
    "name": "Proof that the integers are a Euclidean domain",
    "proves": "000JFQGDXG",
    "sources": [
      {
        "locator": "Proof, Existence",
        "url": "https://en.wikipedia.org/wiki/Euclidean_division"
      }
    ],
    "tag": "GABXWM26TP",
    "uses": [
      "0JHM6JK7FD",
      "09S3PFBEPM",
      "0GJ2HRG95T",
      "01BX15HSRR"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/GABXWM26TP/",
  "links": [
    {
      "field": "proves",
      "target": "000JFQGDXG"
    },
    {
      "field": "uses",
      "target": "0JHM6JK7FD"
    },
    {
      "field": "uses",
      "target": "09S3PFBEPM"
    },
    {
      "field": "uses",
      "target": "0GJ2HRG95T"
    },
    {
      "field": "uses",
      "target": "01BX15HSRR"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/GABXWM26TP.md",
  "msc": [
    "11A05"
  ],
  "name": "Proof that the integers are a Euclidean domain",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/GAB/GABXWM26TP.md",
  "status": null,
  "tag": "GABXWM26TP",
  "uri": "m2://GABXWM26TP",
  "url": "https://math2.tamnd.com/wiki/proof-that-the-integers-are-a-euclidean-domain/",
  "writing": {
    "tag": "GABXWM26TP",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
