{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $n$ be a positive integer.\nThen among any $2n - 1$ integers, not necessarily distinct, there are $n$ whose sum is divisible by $n$.\n\n## Remarks\n\nThe proof first treats a prime $n = p$, using the Chevalley–Warning theorem or the [[Cauchy–Davenport theorem|F7K7XFACSG]].\nFor composite $n = ab$, the cases $a$ and $b$ imply the case $n$.\nOne repeatedly extracts $2b - 1$ disjoint groups of $a$ elements, each with sum divisible by $a$.\nThen one applies the case $b$ to the $2b - 1$ group sums divided by $a$.\nThe number $2n - 1$ cannot be lowered.\nThe $2n - 2$ integers consisting of $n - 1$ zeros and $n - 1$ ones have no $n$ elements with sum divisible by $n$.\nIndeed, any $n$ of them contain $j$ ones with $1 \\le j \\le n - 1$, so their sum $j$ is not a multiple of $n$.\nFor $n = 2$: among any three integers, two have the same parity, so their sum is even.\n\n## Explanations\n\n### L1 human\n\nWrite down $2n - 1$ whole numbers.\nYou can always choose exactly $n$ of them whose sum is a multiple of $n$.\nFor example, among any $5$ integers, some $3$ add up to a multiple of $3$.\n\n### L2 human\n\nThe theorem is the starting point of zero-sum theory in [[additive combinatorics|3NM362A2JG]].\nIn the language of the [[integers modulo $n$|03VFZ2WETT]], every sequence of $2n - 1$ elements of $\\Z/n\\Z$ has a subsequence of length $n$ with sum $0$.\nRelated invariants, such as the Davenport constant, ask for the shortest length that forces a nonempty zero-sum subsequence.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "about": [
      "3NM362A2JG"
    ],
    "kind": "statement",
    "msc": [
      "11B30",
      "11P70",
      "05D99"
    ],
    "name": "Erdős–Ginzburg–Ziv theorem",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Zero-sum_problem"
      }
    ],
    "tag": "J00Z252GRE",
    "uses": [
      "03VFZ2WETT"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/J00Z252GRE/",
  "links": [
    {
      "field": "about",
      "target": "3NM362A2JG"
    },
    {
      "field": "uses",
      "target": "03VFZ2WETT"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/J00Z252GRE.md",
  "msc": [
    "11B30",
    "11P70",
    "05D99"
  ],
  "name": "Erdős–Ginzburg–Ziv theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/J00/J00Z252GRE.md",
  "status": null,
  "tag": "J00Z252GRE",
  "uri": "m2://J00Z252GRE",
  "url": "https://math2.tamnd.com/wiki/erdos-ginzburg-ziv-theorem/",
  "writing": {
    "tag": "J00Z252GRE",
    "kind": "statement",
    "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
      }
    ]
  }
}
