Formalizing a proof (the prime case of) Erdos problem #707 recently proven by Alexeev, ChatGPT, Lean, and Mixon at https://borisalexeev.com/papers/erdos707.html, following Theorem 8 proven on page 5
A perfect difference set is a set where every nonzero element is uniquely representable as a difference of two elements of the set.
Equations
Instances For
We will show that the following hypotheses are inconsistent; this is the bulk of the proof of Theorem 8.
- p : ℕ
- N : ℕ
- hdiff : IsPerfectDifferenceSet B
- h_inj : Function.Injective embed
Instances
Given a perfect difference set B and an element a not in B, the function f_a maps each b ∈ B to the unique c ∈ B such that a-b=c-d for some d ∈ B.
Equations
- Mainstep.f ha b = (Exists.choose ⋯).1
Instances For
Though not defined in Theorem 8, it is convenient to also introduce the companion function g_a, defined to be the d element.
Equations
- Mainstep.g ha b = (Exists.choose ⋯).2
Instances For
f_a is an involution.
Equations
- Mainstep.z2_vact ha = { vadd := fun (i : ZMod 2) (b : { x : ZMod Mainstep.N // x ∈ Mainstep.B }) => if i = 1 then Mainstep.f ha b else b, zero_vadd := ⋯, add_vadd := ⋯ }