{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nLet $\\Z[i]$ be the ring of [[Gaussian integers|0K5W69AC0J]] and let $N(a + b i) = a^2 + b^2$ be its [[norm|03AN1V4ZFJ]]. For $u \\in \\C$, $\\abs{u}$ is the absolute value.\n\n1. The ring $\\Z[i]$ is a subring of the field $\\C$, so it is an [[integral domain|09S3PFBEPM]].\n2. For $z \\in \\Z[i]$, $N(z) = \\abs{z}^2$ is a natural number. If $z \\neq 0$, then $N(z) \\ge 1$.\n3. Let $z, w \\in \\Z[i]$ with $w \\neq 0$. In $\\C$, write $z / w = x + y i$ with $x, y \\in \\R$.\n4. Let $m = \\floor{x + \\tfrac12}$ and $n = \\floor{y + \\tfrac12}$. Then $m, n \\in \\Z$, $\\abs{x - m} \\le \\tfrac12$ and $\\abs{y - n} \\le \\tfrac12$.\n5. Put $q = m + n i \\in \\Z[i]$ and $r = z - q w$. Since $\\Z[i]$ is a ring, $r \\in \\Z[i]$, and $z = q w + r$.\n6. In $\\C$, $r = w (z/w - q)$. So $\\abs{r} = \\abs{w} \\, \\abs{(x - m) + (y - n) i}$.\n7. Squaring gives $N(r) = N(w) \\big((x - m)^2 + (y - n)^2\\big) \\le N(w) \\big(\\tfrac14 + \\tfrac14\\big) = \\tfrac12 N(w)$.\n8. Since $N(w) \\ge 1$ by step 2, $\\tfrac12 N(w) \u003c N(w)$. So $N(r) \u003c N(w)$.\n9. In particular, $r = 0$ or $N(r) \u003c N(w)$. With steps 1 and 2, $\\Z[i]$ is a [[Euclidean domain|0GJ2HRG95T]] with Euclidean function $N$.\n\n## Idea\n\nDivide in $\\C$ and round the real and imaginary parts of $z/w$ to the nearest integers. The rounding error is a complex number of absolute value at most $1/\\sqrt{2}$. Multiplying back by $w$ gives a remainder with at most half the norm of $w$.\n",
  "commit": "68a8c3dc73fd55004b2796431c607c30960d1a85",
  "front": {
    "kind": "proof",
    "msc": [
      "11R11"
    ],
    "name": "Proof that the Gaussian integers are a Euclidean domain",
    "proves": "0PN13BB7BT",
    "sources": [
      {
        "url": "https://proofwiki.org/wiki/Gaussian_Integers_form_Euclidean_Domain"
      }
    ],
    "tag": "6H8F8M6XWY",
    "uses": [
      "0K5W69AC0J",
      "03AN1V4ZFJ",
      "09S3PFBEPM",
      "0GJ2HRG95T"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/6H8F8M6XWY/",
  "links": [
    {
      "field": "proves",
      "target": "0PN13BB7BT"
    },
    {
      "field": "uses",
      "target": "0K5W69AC0J"
    },
    {
      "field": "uses",
      "target": "03AN1V4ZFJ"
    },
    {
      "field": "uses",
      "target": "09S3PFBEPM"
    },
    {
      "field": "uses",
      "target": "0GJ2HRG95T"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/6H8F8M6XWY.md",
  "msc": [
    "11R11"
  ],
  "name": "Proof that the Gaussian integers are a Euclidean domain",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/6H8/6H8F8M6XWY.md",
  "status": null,
  "tag": "6H8F8M6XWY",
  "uri": "m2://6H8F8M6XWY",
  "url": "https://math2.tamnd.com/wiki/proof-that-the-gaussian-integers-are-a-euclidean-domain/",
  "writing": {
    "tag": "6H8F8M6XWY",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
