Documentation

LeanPool.ErdosGinzburgZiv.EGZ.ZeroSum.Basic

Basic #

@[reducible, inline]
abbrev EGZ.FpVec (p d : ā„•) :

The vector space š”½_p^d, represented as d-tuples over ZMod p.

The definitions are total for every natural number p. Results using the field structure will carry a primality hypothesis.

Equations
Instances For
    def EGZ.HasZeroSumSubsequence {ι : Type u_1} (p : ā„•) {d : ā„•} (a : ι → FpVec p d) :

    A sequence contains p terms, at distinct positions, whose sum is zero.

    Equations
    Instances For
      def EGZ.EGZProperty (p d n : ā„•) :

      Every sequence of exactly n vectors in š”½_p^d has a zero-sum subsequence of length p.

      Equations
      Instances For
        def EGZ.IsPHollow (p : ā„•) {d s : ā„•} (v : Fin s → FpVec p d) :

        A family v₁, ..., vā‚› is p-hollow when the only nonnegative integer combinations of total weight p that sum to zero put all their weight on a single vector. For prime p, this condition forces v to be injective.

        Equations
        Instances For

          There is a p-hollow family of s vectors in š”½_p^d.

          Equations
          Instances For
            theorem EGZ.FpVec.card (p d : ā„•) [NeZero p] :
            Fintype.card (FpVec p d) = p ^ d

            The cardinality of š”½_p^d (when p is nonzero, as it is for primes).

            theorem EGZ.FpVec.characteristic_nsmul (p : ā„•) {d : ā„•} (x : FpVec p d) :
            p • x = 0

            Every vector in š”½_p^d is killed by p. This also holds for the degenerate value p = 0, for which ZMod 0 is represented by the integers.

            theorem EGZ.IsPHollow.injective {p d s : ā„•} {v : Fin s → FpVec p d} (hv : IsPHollow p v) (hp : 2 ≤ p) :

            A p-hollow parametrization has no repetitions once p ≄ 2.

            theorem EGZ.IsPHollow.card_le {p d s : ā„•} {v : Fin s → FpVec p d} (hv : IsPHollow p v) (hp : Nat.Prime p) :
            s ≤ p ^ d

            A prime-field p-hollow family has at most all the vectors in the space.

            theorem EGZ.IsPHollow.sum_eq_zero_iff_constant {p d s : ā„•} {v : Fin s → FpVec p d} (hv : IsPHollow p v) {Īŗ : Type u_1} [Fintype Īŗ] (hcard : Fintype.card Īŗ = p) (f : Īŗ → Fin s) :
            āˆ‘ x : Īŗ, v (f x) = 0 ↔ ∃ (i : Fin s), āˆ€ (x : Īŗ), f x = i

            Operational form of hollowness: a p-term sum of members of a hollow family vanishes exactly when all p selected members have the same index.

            The indexing type is arbitrary; the cardinality hypothesis is what records that the sum has exactly p terms.

            theorem EGZ.IsPHollow.sum_fin_eq_zero_iff_constant {p d s : ā„•} {v : Fin s → FpVec p d} (hv : IsPHollow p v) (f : Fin p → Fin s) :
            āˆ‘ x : Fin p, v (f x) = 0 ↔ ∃ (i : Fin s), āˆ€ (x : Fin p), f x = i

            The common special case of sum_eq_zero_iff_constant indexed by Fin p.

            theorem EGZ.AdmitsPHollowLength.le_pow {p d s : ā„•} (hp : Nat.Prime p) (h : AdmitsPHollowLength p d s) :
            s ≤ p ^ d

            The existence predicate for hollow families inherits the ambient cardinality bound.

            theorem EGZ.admitsPHollowLength_zero {p d : ā„•} (hp : 0 < p) :

            The empty family is hollow for every positive modulus.

            theorem EGZ.EGZProperty.mono {p d m n : ā„•} (hmn : m ≤ n) (hm : EGZProperty p d m) :

            Exact-length EGZ properties persist when more terms are appended.

            theorem EGZ.EGZProperty.pigeonhole_bound (p d : ā„•) :
            EGZProperty p d ((p - 1) * p ^ d + 1)

            A crude pigeonhole upper bound. It is not intended to be sharp; its role is to establish that the least EGZ length is well-defined.

            theorem EGZ.exists_egzProperty (p d : ā„•) :
            ∃ (n : ā„•), EGZProperty p d n

            Some exact length has the EGZ property, uniformly for all natural p.

            theorem EGZ.not_egzProperty_of_admitsPHollowLength {p d s : ā„•} (hp : 0 < p) (hadm : AdmitsPHollowLength p d s) :
            ¬EGZProperty p d (s * (p - 1))

            Repeating each member of a positive-modulus hollow family only p - 1 times gives a sequence with no p-term zero sum.