Documentation

Mathlib.Combinatorics.Additive.ErdosGinzburgZiv

The Erdős–Ginzburg–Ziv theorem #

This file proves the Erdős–Ginzburg–Ziv theorem as a corollary of Chevalley-Warning. This theorem states that among any (not necessarily distinct) 2 * n - 1 elements of ZMod n, we can find n elements of sum zero.

Main declarations #

theorem Int.erdos_ginzburg_ziv {ι : Type u_1} {n : } {s : Finset ι} (a : ι) (hs : 2 * n - 1 s.card) :
ts, t.card = n n it, a i

The Erdős–Ginzburg–Ziv theorem for .

Any sequence of at least 2 * n - 1 elements of contains a subsequence of n elements whose sum is divisible by n.

theorem ZMod.erdos_ginzburg_ziv {ι : Type u_1} {n : } {s : Finset ι} (a : ιZMod n) (hs : 2 * n - 1 s.card) :
ts, t.card = n it, a i = 0

The Erdős–Ginzburg–Ziv theorem for ℤ/nℤ.

Any sequence of at least 2 * n - 1 elements of ZMod n contains a subsequence of n elements whose sum is zero.

theorem Int.erdos_ginzburg_ziv_multiset {n : } (s : Multiset ) (hs : 2 * n - 1 Multiset.card s) :
ts, Multiset.card t = n n t.sum

The Erdős–Ginzburg–Ziv theorem for for multiset.

Any multiset of at least 2 * n - 1 elements of contains a submultiset of n elements whose sum is divisible by n.

theorem ZMod.erdos_ginzburg_ziv_multiset {n : } (s : Multiset (ZMod n)) (hs : 2 * n - 1 Multiset.card s) :
ts, Multiset.card t = n t.sum = 0

The Erdős–Ginzburg–Ziv theorem for ℤ/nℤ for multiset.

Any multiset of at least 2 * n - 1 elements of contains a submultiset of n elements whose sum is divisible by n.