FormalConjectures/ErdosProblems/541.lean

GitHub source file

Explanation legend Lean4 Domain Explanation Language (L4DEL)

L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.

L4DEL
Lean4 Domain Explanation Language

Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.

Project sources: Pinned project documentation, Formal Conjectures paper, arXiv v1

3 declarations, 3 contain sorry, 0 declared as axioms

Erdős Problem 541

References:

Imports (1)
  1. theorem Erdos541.erdos_541 Documented declaration: erdos_541 sorry line 48 source

    Source documentation

    Let $a_1, \dots, a_p$ be (not necessarily distinct) residues modulo a prime $p$, such that there exists some $r$ so that if $S \subseteq [p]$ is non-empty and $$\sum_{i \in S} a_i \equiv 0 \pmod{p}$$ then $|S| = r$.

    Must there be at most two distinct residues amongst the $a_i$?

    This was formalized in Lean by Alexeev using Aristotle and ChatGPT.

    depends on sorry what this means

    Statement uses: Iff, True, Nat, Fact, Nat.Prime, Fin, ZMod, Exists, Finset, Ne, EmptyCollection.emptyCollection, Eq, Finset.sum, OfNat.ofNat, Finset.card, LE.le, Set.ncard, Set.range

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    20 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_541 : answer(True) ↔ (∀ p, Fact p.Prime → ∀ (a : Fin p → ZMod p),
        (∃ r, ∀ (S : Finset (Fin p)), S ≠ ∅ → ∑ i ∈ S, a i = 0 → S.card = r) →
          (Set.range a).ncard ≤ 2) := by
    …
  2. theorem Erdos541.erdos_541.variants.general_moduli Gao, Hamidoune, and Wang [GHW10] solved this for all moduli p (not necessarily prime) sorry line 55 source

    Source documentation

    Gao, Hamidoune, and Wang [GHW10] solved this for all moduli p (not necessarily prime).

    depends on sorry what this means

    Statement uses: Nat, Fin, ZMod, Exists, Finset, Ne, EmptyCollection.emptyCollection, Eq, Finset.sum, OfNat.ofNat, Finset.card, LE.le, Set.ncard, Set.range

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    20 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_541.variants.general_moduli (p : ℕ) (a : Fin p → ZMod p)
        (ha₀ : ∃ r, ∀ (S : Finset (Fin p)), S ≠ ∅ → ∑ i ∈ S, a i = 0 → S.card = r) :
          (Set.range a).ncard ≤ 2 := by
    …
  3. theorem Erdos541.erdos_541.variants.large_primes This was proved by Erdős and Szemerédi [ErSz76] for p sufficiently large sorry line 62 source

    Source documentation

    This was proved by Erdős and Szemerédi [ErSz76] for p sufficiently large.

    depends on sorry what this means

    Statement uses: Filter.Eventually, Nat, Nat.Prime, Fin, ZMod, Exists, Finset, Ne, EmptyCollection.emptyCollection, Eq, Finset.sum, OfNat.ofNat, Finset.card, LE.le, Set.ncard, Set.range, Filter.atTop

    Proof uses: sorryAx, Lean.Name, Bool.false, Lean.Name.num, Lean.Name.str, Lean.Name.anonymous

    22 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

    Open to load the checked before-and-after goal states.

    theorem erdos_541.variants.large_primes : ∀ᶠ p in atTop, p.Prime → ∀ a : Fin p → ZMod p,
        (∃ r, ∀ (S : Finset (Fin p)), S ≠ ∅ → ∑ i ∈ S, a i = 0 → S.card = r) →
          (Set.range a).ncard ≤ 2 := by
    …