{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\n1. Let $n$ be a positive integer, and let $a, b, c$ be integers with $c a \\equiv c b \\pmod n$. Let $d = \\gcd(c, n)$ be their [[greatest common divisor|02WF878BH1]].\n2. Since $n \\ne 0$, $c$ and $n$ are not both $0$. So $d$ is a positive integer that divides $c$ and $n$.\n3. Write $c = d c'$ and $n = d n'$ with integers $c'$ and $n'$. Since $n \u003e 0$ and $d \u003e 0$, $n' = n / d$ is a positive integer.\n4. By the definition of [[congruence|0TPW25CBN6]], $n$ [[divides|096PW7Q014]] $c a - c b = c (a - b)$. So there is an integer $k$ with $c (a - b) = n k$.\n5. By step 3, this reads $d c' (a - b) = d n' k$. Since $d \\ne 0$, we can divide by $d$ and get $c' (a - b) = n' k$. So $n'$ divides $c' (a - b)$.\n6. By [[Bézout's identity|0DQVHMYAGA]], there are integers $x$ and $y$ with $c x + n y = d$.\n7. By step 3, this reads $d (c' x + n' y) = d$. Dividing by $d$ gives $c' x + n' y = 1$.\n8. Let $e$ be a common divisor of $c'$ and $n'$. By step 7, $e$ divides $1$, so $e = \\pm 1$. Hence $\\gcd(c', n') = 1$, and $n'$ and $c'$ are [[coprime|0GFKP8F8AG]].\n9. By steps 5 and 8 and the [[generalized Euclid's lemma|03BAREW1Z5]], $n'$ divides $a - b$.\n10. Hence $a \\equiv b \\pmod{n / d}$.\n\n## Idea\n\nDivide the relation $n \\mid c (a - b)$ by the common factor $d$ of $c$ and $n$. What is left of $c$ shares no factor with what is left of $n$, so Euclid's lemma removes it.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "methods": [
      "0NTF6DMVAP"
    ],
    "msc": [
      "11A07"
    ],
    "name": "Proof of cancellation in congruences",
    "proves": "09RDZZGJZ9",
    "sources": [
      {
        "locator": "Basic properties",
        "url": "https://en.wikipedia.org/wiki/Modular_arithmetic"
      }
    ],
    "tag": "YBT5E9YJPX",
    "uses": [
      "0TPW25CBN6",
      "096PW7Q014",
      "02WF878BH1",
      "0GFKP8F8AG",
      "0DQVHMYAGA",
      "03BAREW1Z5"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/YBT5E9YJPX/",
  "links": [
    {
      "field": "proves",
      "target": "09RDZZGJZ9"
    },
    {
      "field": "uses",
      "target": "0TPW25CBN6"
    },
    {
      "field": "uses",
      "target": "096PW7Q014"
    },
    {
      "field": "uses",
      "target": "02WF878BH1"
    },
    {
      "field": "uses",
      "target": "0GFKP8F8AG"
    },
    {
      "field": "uses",
      "target": "0DQVHMYAGA"
    },
    {
      "field": "uses",
      "target": "03BAREW1Z5"
    },
    {
      "field": "methods",
      "target": "0NTF6DMVAP"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/YBT5E9YJPX.md",
  "msc": [
    "11A07"
  ],
  "name": "Proof of cancellation in congruences",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/YBT/YBT5E9YJPX.md",
  "status": null,
  "tag": "YBT5E9YJPX",
  "uri": "m2://YBT5E9YJPX",
  "url": "https://math2.tamnd.com/wiki/proof-of-cancellation-in-congruences/",
  "writing": {
    "tag": "YBT5E9YJPX",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
