FormalConjectures/ErdosProblems/478.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

1 declarations, 1 contain sorry, 0 declared as axioms

Erdős Problem 478

References:

Imports (1)
  1. theorem Erdos478.erdos_478 Let $p$ be a prime and $$A_p = \{ k! \pmod{p} : 1\leq k<p\}.$$ Is it true that $$\lvert A_p\rvert \sim (1-\tfrac{1}{e})p?$$ sorry line 45 source

    Source documentation

    Let $p$ be a prime and $$A_p = \{ k! \pmod{p} : 1\leq k<p\}.$$ Is it true that $$\lvert A_p\rvert \sim (1-\tfrac{1}{e})p?$$

    depends on sorry what this means

    Statement uses: Iff, True, Filter.Tendsto, Nat, Real, HDiv.hDiv, Finset.card, Finset.image, HMod.hMod, Nat.factorial, Finset.Ico, OfNat.ofNat, Min.min, Filter, Filter.atTop, Filter.principal, Set.ofPred, Nat.Prime, nhds, HSub.hSub and 1 more

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

    38 instances, coercions and auxiliary constants left out.

    Tactic trace: 1 steps

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

    theorem erdos_478 : answer(sorry) ↔
        Filter.Tendsto
          (fun p : ℕ =>
            (((Finset.Ico 1 p).image (fun k => Nat.factorial k % p)).card : ℝ) / p)
          (Filter.atTop ⊓ Filter.principal {p : ℕ | p.Prime})
          (nhds (1 - 1 / Real.exp 1)) := by
    …